How To Install Magento 2.4 on Rocky Linux 8

Click here for Govt Schemes

How To Install Magento 2.4 on Rocky Linux 8

in This Tutorial you will Learn "  How To Install Magento 2.4 on Rocky Linux 8"
Magento is a free, open-source, PHP-based eCommerce platform and cloud solution to grow your online business rapidly. It is built on open-source technology, with a flexible shopping cart system and an admin control panel that helps you start your online store easily. Magento also offers many plugins and themes to enhance a customer’s experience.
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -        |     Hostname -
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install httpd httpd-tools mariadb-server -y
systemctl start httpd mariadb ; systemctl enable httpd mariadb
dnf module reset php ; dnf module enable php:7.4

dnf install php php-cli php-mysqlnd php-opcache php-xml php-gd php-soap php-pdo php-bcmath php-intl php-mbstring php-json php-iconv php-zip unzip git -y

gedit  /etc/php.ini &>/dev/null
memory_limit = 1024M
upload_max_filesize = 256M
zlib.output_compression = on
max_execution_time = 18000
date.timezone = Asia/Kolkata

dnf install
dnf install php-cli libsodium php-pear php-devel libsodium-devel make
pecl channel-update
pecl install libsodium
nano /etc/php.ini
php -i | grep sodium

CREATE USER 'magento'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON magento.* TO 'magento'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

curl -sS | php
mv composer.phar /usr/local/bin/composer

unzip ; mv magento2-* /var/www/html/magento2

cd /var/www/html/magento2
composer install
chown -R apache:apache /var/www/html/magento2

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R apache:apache .  && chmod u+x bin/magento

nano /etc/httpd/conf.d/magento.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/magento2/
DirectoryIndex index.php
<Directory /var/www/html/magento2/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
ErrorLog /var/log/httpd/magento_error.log
CustomLog /var/log/httpd/magento_access.log combined

systemctl restart httpd
sudo -u apache bin/magento module:disable {Magento_Elasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}

sudo -u apache bin/magento setup:install --admin-firstname="test" --admin-lastname="tests" --admin-email="[email protected]" --admin-user="admin" --admin-password="secure@123" --db-name="magento" --db-host="localhost" --db-user="magento" --db-password="password" --language=en_US --currency=USD --timezone=Asia/Kolkata --cleanup-database --base-url=http://""

nano /etc/hosts/

cd /var/www/html/magento2
sudo -u apache  bin/magento cron:install

Share on Pinterest
Share on LinkedIn
Share on WhatsApp
Share on Telegram