How to install Magento 2.4.2 on Centos 7.x with cPanel? Print

  • 0

Magento is an open-source e-commerce application that written in PHP language. Magento also uses other PHP frameworks like Symfony and Laminas. Please refer to the following steps to install Magento 2.4.2 on Centos 7.x with cPanel using softaculous.

System Requirements for Magento 2.4.2 in cPanel

  • RAM: Minimum 2 GB RAM Required

  • WebServer: Apache 2.4 with module mod_version enabled.

  • MySQL 8.0 or MariaDB 10.4 for Magento Commerce Cloud projects

  • PHP 7.4

  • PHP Extention: ext-bcmath, ext-curl, ext-gd, ext-iconv, ext-intl, ext-mbstring, ext-openssl, ext-pdo_mysql, ext-simplexml, ext-soap, ext-xsl, ext-zip, ext-sockets, php-opcache, libsodium 

  • PHP Memory Limit: 512MB

You may not found the libsodium inside EasyApach 4.0 PHP Extention. Please go with the below steps to install libsodium in Centos 7.x

How to Install libsodium to Install Magento 2.4.2 on Centos 7.x?

  1. At the first step, install the Linux EPEL package with the below command.

    sudo yum install epel-release
  2. Install the required library for the libsodium with the below command. 

    yum install libsodium libsodium-devel -y
  3. Run the below command to install the libsodium PHP extension.

    find /opt/cpanel/ -iname pecl | grep bin
    /opt/cpanel/ea-php74/root/usr/bin/pecl install libsodium
  4. We have successfully installed the PHP Extention libsodium.

Now, we have completed installing all the prerequisites for Magento 2.4.2.  Let's move forward towards the Magento installation. Please note that we will install Magento from Softaculous. Ensure that your cPanel account has softaculous installed. Please refer to how to install softaculous on Linux server with cPanel server?

  1. Login to your cPanel account. 

  2. Go to the Softaculous installer and search for the Magento and click on it.

  3. Click on the Install Now button. 

  4. Fill in all the details like the Magento version, admin path. We suggest you keep blank for the admin path.

  5. At the admin account section, enter your admin credentials and email account. Make sure you enter the correct email account. You can select the database name, table prefix, and backup policy for the Magento at the advanced options. Finally, click on the Install button. You will see the Downloading packages option once you click on the Install button.

  6. After the successful installation, you will get the below screen. 

  7. Open your website in the browser, and you will see the below screen.

  8. You can open your admin account using in the browser. 

  9. We have successfully installed the Magento, so let us login with our admin credentials that we have entered while installation. 

  10. Oops, Here you will face a challenge. By default, Magento enables the two-factor authentication, but it doesn't ask it during installation.

How to Disable Magento Admin Two-Factor Authentication?

To disable Magento Admin two-factor authentication, you need to run the below command at the Magento installation root. For cPanel, you need to go to the public_html of your domain and run the below command.

php bin/magento module:disable Magento_TwoFactorAuth

We have fixed the Mangento 2 factor authentication. Log in to the Magento Admin Panel. But, you may face the next hurdle. When you log in to the Magento Admin panel, you will see that it is loading continuously.  

How to Fix Magento Admin Keep Loading Issue?

After installing the Magento Admin, you will face an issue that Magento Admin is keep loading. 

Run the below command at the Magento root directory. It will deploy the static content and fix the Magento Admin loading issue, 

php bin/magento setup:static-content:deploy -f

Now, clear the browser cache, and you should be able to login to the Magento Admin now without any issue. 

Was this answer helpful?

« Back