How To Install OpenCart on Rocky Linux 8

How To Install OpenCart on Rocky Linux 8

 in This Tutorial you will Learn " How To Install OpenCart on Rocky Linux 8"

OpenCart is an open-source e-commerce platform written in PHP. It is simple, lightweight, user-friendly, and provides a web interface to manage it from the web browser. It allows you to easily manage product inventory, orders, affiliates, discounts, product reviews, payment gateways, and more.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y

dnf install httpd mariadb-server -y
dnf install epel-release -y
dnf install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module reset php
dnf module enable php:remi-8.0
dnf install php php-gd php-ldap php-zip php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mysqlnd php-snmp php-soap curl curl-devel unzip git -y
systemctl start httpd ; systemctl enable httpd ; systemctl start mariadb ; systemctl enable mariadb
mysql_secure_installation

mysql -u root -p
CREATE DATABASE opencart;
CREATE USER 'opencart'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON opencart.* TO 'opencart'@'localhost';
FLUSH PRIVILEGES;
EXIT;

git clone https://github.com/opencart/opencart.git
cd opencart ; mv upload /var/www/html/opencart
cp /var/www/html/opencart/config-dist.php /var/www/html/opencart/config.php
cp /var/www/html/opencart/admin/config-dist.php /var/www/html/opencart/admin/config.php
chown -R apache:apache /var/www/html/opencart ; chmod -R 755 /var/www/html/opencart

nano /etc/httpd/conf.d/opencart.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/opencart/
ServerName www.yourdomain.com
<Directory /var/www/html/opencart/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/yourdomain.com-error_log
CustomLog /var/log/httpd/yourdomain.com-access_log common
</VirtualHost>

systemctl restart httpd
echo "192.168.1.20 www.yourdomain.com" >> /etc/hosts
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload  
www.yourdomain.com

mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf_backup




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