Installing OpenCart on Ubuntu Server

OpenCart is an open source online store engine.

Before starting the installation, the following must be installed on the server:
Web server, for example Apache2, PHP, MySQL and Curl.

I will describe the installation procedure by points:

1) Download the latest version of OpenCart from the official website www.opencart.com. Unzip it to the web server directory, for example /var/www/test/.

2) Connect to the MySQL database, create a table and a user with full rights to the created table. This can be done via phpmyadmin or the console by running the following commands (where test is the name of the database and user):

mysql -u root -p
CREATE DATABASE test;
CREATE USER test@localhost;
SET PASSWORD FOR test@localhost= PASSWORD("password");
GRANT ALL PRIVILEGES ON test.* TO test@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

3) Rename the two config-dist.php configuration files to config.php:

mv /var/www/config-dist.php /var/www/config.php
mv /var/www/admin/config-dist.php /var/www/admin/config.php

4) Set the owner and group on all files and directories on behalf of which the web server is working, usually it is “www-data”:

sudo chown www-data:www-data /var/www/ -R

5) Open the browser address http://hostname/install and follow the instructions. Upon completion, delete the installation directory:

rm -rf /var/www/install/

In case of missing extensions during installation, install them, for example, with the command:

sudo apt-get install php-curl php-mcrypt php-gd
sudo phpenmod mcrypt
sudo service apache2 restart

Rights 0755 must also be set to the following directories and files:
image/
image/cache/
image/data/
system/cache/
system/logs/
download/
config.php
admin/config.php

The crack for the latest version, modules, templates can be found on the official site opencart.com in the “Extensions” section.

See also my article:
Transfer OpenCart to another hosting

Leave a comment

Leave a Reply