How to Install Opencart on Linuxmint 19
Installation of Open cart on Linux Mint 19
Open cart is a free and open-source e-commerce platform for online shopping application and it provides a professional and reliable foundation from which we can build a successful online store. This foundation to use, to shop a variety of users and ranging from seasoned web developers looking for a user-friendly interface for using the shop owners will just launch their online business. This tutorial covers the installation of the Open cart on Linux Mint 19
Requirements for Open cart:
Apache
Mysql
Php and its module
(php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap php-imap php-common php-dev libmcrypt-dev php-pear)
Installation procedure
Check the Linux Mint version by using the following command.
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19 Tara
Release: 19
Codename: tara
Configure the MySQL database. Log into MySQL as a root user and make the necessary settings.
root@linuxhelp:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database opendb;
Query OK, 1 row affected (0.00 sec)
mysql> create user 'openuser'@localhost identified by 'Linuxc#4';
Query OK, 0 rows affected (0.07 sec)
mysql> grant all privileges on opendb.* to 'openuser'@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
Once the database configuration is done, Download the Open Cart Installation package by using the wget command.
root@linuxhelp:~# wget https://github.com/opencart/opencart/archive/master.zip
--2019-06-22 10:26:52-- https://github.com/opencart/opencart/archive/master.zip
Resolving github.com (github.com)... 13.234.210.38
Connecting to github.com (github.com)|13.234.210.38|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/opencart/opencart/zip/master [following]
--2019-06-22 10:26:52-- https://codeload.github.com/opencart/opencart/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’
master.zip [ <=> ] 19.76M 815KB/s in 36s
2019-06-22 10:27:30 (558 KB/s) - ‘master.zip’ saved [20721204]
Once the download is completed extract the downloaded package using unzip command.
root@linuxhelp:~# unzip master.zip -d opencart
Archive: master.zip
afd573543640315d66a4710400619a2f02822a56
creating: opencart/opencart-master/
creating: opencart/opencart-master/.github/
creating: opencart/opencart-master/.github/ISSUE_TEMPLATE/
inflating: opencart/opencart-master/.github/ISSUE_TEMPLATE/bug_report.md
inflating: opencart/opencart-master/CHANGELOG.md
inflating: opencart/opencart-master/CHANGELOG_AUTO.md
inflating: opencart/opencart-master/README.md
inflating: opencart/opencart-master/build.xml
.
.
.
inflating: opencart/opencart-master/upload/system/storage/vendor/zoujingli/wechat-php-sdk/Wechat/WechatScript.php
inflating: opencart/opencart-master/upload/system/storage/vendor/zoujingli/wechat-php-sdk/Wechat/WechatService.php
inflating: opencart/opencart-master/upload/system/storage/vendor/zoujingli/wechat-php-sdk/Wechat/WechatUser.php
inflating: opencart/opencart-master/upload/system/storage/vendor/zoujingli/wechat-php-sdk/composer.json
inflating: opencart/opencart-master/upload/system/storage/vendor/zoujingli/wechat-php-sdk/include.php
inflating: opencart/opencart-master/upload/system/storage/vendor/zoujingli/wechat-php-sdk/test.php
Enter into the Open cart directory.
root@linuxhelp:~# cd opencart
List out the files
root@linuxhelp:~/opencart# ls
opencart-master
Move the Open Cart directory to the apache root directory.
root@linuxhelp:~/opencart# mv opencart-master /var/www/opencart
Set the ownership and permission for Open cart by using the following command.
root@linuxhelp:~# chown -R www-data.www-data /var/www/opencart
root@linuxhelp:~# chmod -R 755 /var/www/opencart
Configure the virtual host for accessing the Open cart.
root@linuxhelp:~# vim /etc/apache2/sites-available/opencart.conf
<Virtualhost *:80>
Servername www.linuxhelp1.com
Documentroot /var/www/opencart/upload
<directory /var/www/opencart/upload>
allowoverride all
allow from all
</directory>
</Virtualhost>
Disable the default site access.
root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
Enable the site access for accessing the Open cart.
root@linuxhelp:~# a2ensite opencart.conf
Enabling site opencart.
To activate the new configuration, you need to run:
systemctl reload apache2
Enable the rewrite module.
root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2
Restart the apache service by using the following command.
root@linuxhelp:~# systemctl restart apache2
Switch to your browser and enter the domain name.
root@linuxhelp:~# cd /var/www/opencart
root@linuxhelp:/var/www/opencart# cd upload
List out and Rename the filename.
root@linuxhelp:/var/www/opencart/upload# ls
admin catalog config-dist.php image index.php install php.ini system
root@linuxhelp:/var/www/opencart/upload# mv config-dist.php config.php
Enter into the admin directory.
root@linuxhelp:/var/www/opencart/upload# cd admin
List out and Rename the filename.
root@linuxhelp:/var/www/opencart/upload/admin# ls
config-dist.php controller index.php language model view
root@linuxhelp:/var/www/opencart/upload/admin# mv config-dist.php config.php
Restart the apache service by using the following command.
root@linuxhelp:/var/www/opencart/upload/admin# systemctl restart apache2
Now the installation setup is complete and to access Open cart admin panel click on login as Admin.
Now login with the Admin user credential.
After a successful login, you will see the admin dashboard of the Open cart.
with this, the method to install Opencart on Linuxmint 19 comes to an end.
PrestaShop
WooCommerce
Shopify
# /etc/hosts
Errorlog /var /log /opencartdomain/error_log
Customlog /var /log /opencartdomain/access_log