OPENCART INSTALLATION

Install OpenCart

Permalink

Download OpenCart and configure permissions

Permalink

Issue the following commands to download and unpack OpenCart into your web root directory:

cd /var/www/html/example.com/public_html/

curl -OL https://github.com/opencart/opencart/releases/download/2.3.0.2/2.3.0.2-compiled.zip

unzip 2.3.0.2-compiled.zip ‘upload/*’

cp upload/config-dist.php upload/config.php

cp upload/admin/config-dist.php upload/admin/config.php

sudo chown -R apache:apache upload

shopt -s dotglob

mv upload/* .

rm -rf upload

In the above example, replace /var/www/html/example.com/public_html/ with your virtual host’s web root and 2.3.0.2-compiled.zip with the file name of the latest OpenCart release.

Note

You can find the latest version of OpenCart from their Download Page.

Next, run the following commands to make sure these directories are writable.

chmod 0755 system/storage/cache/

chmod 0755 system/storage/logs/

chmod 0755 system/storage/download/

chmod 0755 system/storage/upload/

chmod 0755 system/storage/modification/

chmod 0755 image/

chmod 0755 image/cache/

chmod 0755 image/catalog/

chmod 0755 config.php

chmod 0755 admin/config.php

Run the OpenCart Installer

Permalink

Visit your website in your browser. You should be redirected to the OpenCart Installer in a page that looks like this:

https://www.linode.com/docs/websites/ecommerce/install-opencart-on-centos-7/opencart-1.png

Press CONTINUE and you will see the Pre-Installation page.

https://www.linode.com/docs/websites/ecommerce/install-opencart-on-centos-7/opencart-2.png

Make sure that you see the green checkmark for every section before proceeding. If you see any red marks, please go back and make sure all of the instructions in this guide were followed properly. Once you’ve confirmed that every section has a green checkmark, press the CONTINUEbutton to see the OpenCart configuration page:

https://www.linode.com/docs/websites/ecommerce/install-opencart-on-centos-7/opencart-3.png

Here, select the MySQLi driver and fill out the form with the relevant information from the Create a Database and User section of this guide. You also need to select a username and password for the default administrator account for this OpenCart installation.

Finally, press the CONTINUE button and you should now see the Installation complete screen. You will also see a warning box telling you to remove your installation directory. We can do this by going back to your web root directory and running:

rm -rf install

Once you’ve done that, the installation is complete. Browse to

http://example.com/admin

In the above example, example.com is your domain name.

You can now login using the administrator account details you entered previously.

 

Recommended Next Steps

Permalink

Now that you have your OpenCart installation up and running, there are a few more steps that we recommend. Because of the security-sensitive nature of ecommerce websites, you will want to make sure your system is secure.

  1. Make sure you follow our Securing Your Server guide.
  2. Secure your website with SSL/TLS. Learn to Install a SSL certificate with Apache on CentOS 7. Once you’ve installed a certificate, enable Use SSL by following the Opencart Documentation on SSL.
  3. Follow the Basic Security Practices from the OpenCart documentation.

Install vQmod if you wish to use 3rd party extensions.

You May Also Like

About the Author: admin

Leave a Reply

Your email address will not be published. Required fields are marked *