This brief tutorial is going to show you how to easily install osCommerce in Ubuntu 14.04 , if you haven’t already done and wish to open an online shop to sell your stuff.
Open Source Commerce (osCommerce) is a popular e-Commerce and online store-management software program that may be easily used on any web server with PHP and MySQL installed. osCommerce is available to users as a free software under the General Public License (GNU) The versatile and fuss-free software enables easy setting up and maintenance of e-stores using minimal effort. Now, here are the steps below that you'll need to follow to setup and ready your osCommerce in Ubuntu 14.04 LTS "Trusty"
1. Installing LAMP Stack
osCommerce relies on the LAMP stack which include Linux, Apache or other web server, MySQL and PHP. So, before installing osCommerce, lets’ go ahead and install the LAMP stack in Ubuntu. To do that, run the commands below.
$ sudo apt-get install apache2, mysql-server mysql-client php5 php5-dev php5-mysql php5-gd php5-xmlrpc
2. Configuring MySQL Server and osCommerce database
During LAMP installation, you’ll be prompted to create a new root password for the MySQL database server. When prompted, type and confirm the root password.
You’ll need the root password to sign onto the database server after installing.
After installing LAMP, go and begin configuring each server. Since OsCommerce uses databases to host and store data, let’s go and create a new database for it.
For our tutorial, we’re going to create a database called oscommerce
Now, creating OsCommerce database
First, run the commands below to start MySQL database server if it isn’t started. To do that, run the commands below
$ sudo service mysql start
Then run the commands below to sign onto the database server as root.
$ mysql -u root -p
Next, run the SQL statement below to create a new database called oscommerce
mysql> CREATE DATABASE oscommerce;
Next, create a database user, the user who database account will be used to connect to the database. To create a database user called oscommerceuser, run the SQL statement below.
mysql> CREATE USER oscommerceuser@localhost IDENTIFIED BY '123';
Then grant the user all privileges to the database by running the commands below.
Exit and you’re done.
3. Install osCommerce
Now that you’ve created the database, it’s now time to download OsCommerce files. To do that, run the commands below.
$ cd /tmp/ && wget http://www.oscommerce.com/files/oscommerce-2.3.4.zip
Next, run the commands below to unzip the downloaded file.
$ unzip oscommerce*.zip
Next, run the commands below to copy OsCommerce files to Apache2 default root directory.
$ sudo cp -rf oscommerce*/* /var/www/html/
4. Configuring File Permissions
Then run the commands below to change the configuration files permissions so that you’ll be able to configure its initial settings. To do that, run the commands below.
$ sudo chmod 777 /var/www/html/catalog/includes/configure.php $ sudo chmod 777 /var/www/html/catalog/admin/includes/configure.php
We'll wanna give
$ sudo chown www-data:www-data -R /var/www/html/
Next, run the commands below to start up Apache2 web server.
$ sudo service apache2 start
5. Web Installation
Now open a browser and open the link http://ip_address/catalog/install/index.php:
Now enter the database entry as created before, in my case it was:
Database Server : localhost
Username : oscommerceuser
Password : type_password_here
Database Name : oscommerce
After filling the values press Continue:
It will ask for your attention for the entries of the Document-root and web address for the site. Just press continue:
Again it will ask for some details for the web-store. Please fill the values of your choice and requirement. In my case I used:
After installing, we'll want to remove the installation directory to protect our site.
sudo rm -rf /var/www/html/catalog/install
Now, change the permissions of these files back to 644.
sudo chmod 644 /var/www/html/catalog/includes/configure.php
sudo chmod 644 /var/www/html/catalog/admin/includes/configure.php
Hurray, we're done, our all time favorite osCommerce has been successfully installed in our Ubuntu 14.04 . You can download anf install different beautiful templates from their official template partners. You can setup payment methods, add new products, sale, integrate Amazon and much more. -:) Enjoy osCommerce !