OpenCart is an open source storefront designed to give you flexibility and fine-grained control over your online storefront. Before getting started, you should have already set up a LAMP stack on your Linode. You should have also set the hostname.
In order to use OpenCart, you will need to ensure that PHP is configured properly. Make sure the settings below match the values in your /etc/php.ini file:
register_globals = Off magic_quotes_gpc = Off file_uploads = 1 session_auto_start = 0
Additionally, you will need to make sure that the following PHP extensions are installed:
yum install php-mysql php-gd php-curl php-pecl-zip
You will also need to create a database and a database user for OpenCart. To create a database and grant your users permissions on it, issue the following command. Note, the semi-colons (;) at the end of the lines are crucial for ending the commands. Your command should look like this:
create database mystore; grant all on mystore.* to 'opencart' identified by 'p@$$w0rD'; flush privileges;
In the example above, mystore is the name of the database for your store, opencart is the username, and p@$$w0rD is the password.
Issue the following commands to download and unpack OpenCart:
cd /opt wget http://opencart.googlecode.com/files/opencart_v184.108.40.206.zip unzip opencart_v220.127.116.11.zip
You will now need to move the files located in the "Upload" directory to your web root. For example, if you wanted your OpenCart installation to be located at http://www.example.com, your document root might look something like /srv/www/example.com/public_html.
Next, you will need to make sure that OpenCart has access to write to specific folders and files. Issue the following commands:
chmod 755 image/ chmod 755 image/cache/ chmod 755 image/data/ chmod 755 cache/ chmod 755 download/ chmod 755 config.php chmod 755 admin/config.php chmod 755 system/cache/ chmod 755 system/logs/
You may then visit your OpenCart instance via a web browser to continue with the installation process. In our example, this would be http://www.example.com.
Read and accept the license agreement, and make sure that the pre-installation checks are passed on the second page. Configure the database connection details by providing OpenCart with the MySQL credentials that you created earlier. Additionally, you will also create your administrator user at this time. Be sure to type your password and email address correctly!
Once you have completed the installation, be sure to delete the install directory by issuing the following command:
rm -rf /srv/www/example.com/public_html/install
Congratulations! You are now ready to manage your own online storefront!
This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.
Last edited by Amanda Folson on Tuesday, September 20th, 2011 (r2518).