Author: Srijan Kishore <s [dot] kishore [at] ispconfig [dot] org>
Follow howtoforge on Twitter
Last edited 02/Sep/2014
This document describes how to install osCommerce in CentOS 7. 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. This tutorial describes the process of installing osCommerce on CentOS 7.
1 Preliminary Note
This tutorial is based on CentOS 7.0 server, so you should set up a basic CentOS 7 server installation before you continue with this tutorial. The system should have a static IP address. I use 192.168.0.100 as my IP address in this tutorial and server1.example.com as the hostname. We also require a working LAMP server before moving ahead. LAMP in CentOS 7 can be created from tutorial.
osCommerce is an open source solution for creating your own online store. It runs on a LAMP stack and is a strong alternative to Magento. We need a database for osCommerce.
2.1 Database Initialization
Create a database to be used by osCommerce as follows:
mysql -u root -p
At MySQL prompt use:
CREATE DATABASE osCommercedb;
CREATE USER [email protected] IDENTIFIED BY ‘osCommercepassword’;
GRANT ALL PRIVILEGES on osCommercedb.* to [email protected] ;
2.2 Download osCommerce and installation
Now we will download the latest stable version of the osCommerce from link. CentOS don’t comes with ifconfig command, so I will install net-tools and some other packages before osCommerce download. In my case the latest stable version available for osCommerce is v.2.3.4, so I will download it as follows:
yum install wget unzip net-tools
mv oscommerce-2.3.4 /var/www/html/eval(ez_write_tag([[580,400],’howtoforge_com-medrectangle-4′,’ezslot_1′,108,’0′,’0′]));
We need to give appropriate permissions for allowing web-installations.
chmod 777 /var/www/html/oscommerce-2.3.4/catalog/includes/configure.php
chmod 777 /var/www/html/oscommerce-2.3.4/catalog/admin/includes/configure.php
Additionally we need Selinux over-rides by using:
chcon -R -t httpd_sys_content_rw_t /var/www/html/oscommerce-2.3.4/
Now we will proceed for web-installation.
Now open a browser and open the link http://192.168.0.100/oscommerce-2.3.4/catalog/install/index.php:
Now enter the database entry as created before, in my case it was:
Database Server : localhost
Username : osCommerceuser
Password : osCommercepassword
Database Name : osCommercedb
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:
Store name : Test_store
Store Ownername : Test_owner
Store Owner email-address: [email protected]
Administrator Username : admin
Administrator Password: admin
The above screen-shot shows finalization of the installation. Now we can open the Online Store from link http://192.168.0.100/oscommerce-2.3.4/catalog/index.php and Administration Tool form link http://192.168.0.100/oscommerce-2.3.4/catalog/admin/login.php as follows:
We can login here with Username=admin and Password=admin, just created at the time of installation.
Congratulations we have a working osCommerce installed in CentOS 7 🙂
- CentOS : http://www.centos.org/
- osCommerce : http://www.oscommerce.com/