Install osCommerce e-commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

Overview

osCommerce Online Merchant is a complete self-hosted online store solution that contains both a catalog frontend and an administration tool backend which can be easily installed and configured through a web-based installation procedure. It is an Open Source online shop e-commerce solution that is available for free under the GNU General Public License, it features a rich set of out-of-the-box online shopping cart functionality that allows store owners to setup, run, and maintain online stores with minimum effort and with no costs, fees, or limitations involved. Also there are hundreds of add-ons that are available for free to customize osCommerce Online Merchant online stores.

Install osCommerce e-commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

Install some prerequisites
On CentOS, RHEL, Fedora


# yum install mysql mysql-server httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-soap php-intl

On Debian, Ubuntu


# apt-get install mysql-client mysql-server apache2 php5 php5-mysql php5-gd php5-imap php5-ldap php5-odbc php-pear php-xml-parser php5-xmlrpc chkconfig php-soap php5-intl

On CentOS, RHEL


# /etc/init.d/httpd start
# /etc/init.d/mysqld start
# chkconfig httpd on
# chkconfig mysqld on

On Debian, Ubuntu


# /etc/init.d/apache2 start
# /etc/init.d/mysqld start
# chkconfig httpd on
# chkconfig mysqld on

Set the root password for mysql and login to create database and a user for elgg


# /usr/bin/mysqladmin -u root password 'root@123'
# mysql -uroot -proot@123

mysql> create database oscommerce;
mysql> grant all on oscommerce.* to commerceuser@localhost identified by 'commerce@123';
mysql> flush privileges;

Head over to the website here and download the latest zipped package and unzip it


# unzip oscommerce-2.3.3.zip

Move the oscommerce directory to document root of the web server.
On CentOS, RHEL


# mv oscommerce-2.3.3/catalog /var/www/html/
# cd /var/www/html/catalog

On Debian, Ubuntu


# mv oscommerce-2.3.3/catalog /var/www/
# cd /var/www/catalog

Change the permissions of the following file, if not performed the installation will fail and will ask you to do it before you can continue.


# mkdir catalog/cache
# chmod 777 includes/configure.php
# chmod 777 admin/includes/configure.php
# chmod 777 catalog/cache
# chmod 777 catalog/admin/backups/
# chmod 777 catalog/admin/images/graphs/
# chmod 777 catalog/images/

oscommerce01 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

Open the browser and point it to

http://ipaddress-or-domainname/oscommerce

oscommerce02 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

oscommerce03 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

oscommerce04 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

oscommerce00 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu


# rm -rf catalog/install
# chmod 775 catalog/includes/configure.php

Next open the .htaccess file using an editor of choice


# vi catalog/admin/.htaccess

Append the following to it. Change the AuthUserFile to /var/www/catalog/admin/.htpasswd_oscommerce for Debian or Ubuntu.


##### OSCOMMERCE ADMIN PROTECTION - BEGIN #####
AuthType Basic
AuthName "osCommerce Online Merchant Administration Tool"
AuthUserFile /var/www/html/catalog/admin/.htpasswd_oscommerce
Require valid-user
##### OSCOMMERCE ADMIN PROTECTION - END #####

Create the password file and add a user admin


# htpasswd catalog/admin/.htpasswd_oscommerce admin

oscommerce06 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu

Once done change the permissions back to something sane.


# chmod 644 includes/configure.php
# chmod 644 admin/includes/configure.php
# chmod 644 catalog/cache
# chmod 644 catalog/admin/backups/
# chmod 644 catalog/admin/images/graphs/
# chmod 644 catalog/images/

oscommerce09 300x176 Install osCommerce e commerce solution on CentOS, RHEL, Fedora, Debian, Ubuntu