Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 19 February 2017

How to Configure Online Shopping Store Using osCommerce on CentOS/RHEL 6x & Ubuntu 14.04

How to Configure Online Shopping Store Using osCommerce on CentOS/RHEL 6x & Ubuntu 14.04


Q. What is osCommerce ?

-- OsCommerce (Online Shopping Store) is an e-commerce and Online Store-Management Software program. It can be used on any web server that has PHP and MySQL installed. It is available as free software under the GNU General Public License.

Step: 1. Bind Hosts File :


# vi /etc/hosts

192.168.72.221    ser2.domain.com    ser2

-- Save & Quit (:wq)

Step: 2. Stop Firewall :

For CentOS/RHEL Users :

# service iptables stop
# chkconfig iptables off

For Debian Users :

# service ufw stop

Step: 3. Disable Selinux :

Important: This 3rd Step, is only Applicable for RedHat & CentOS Based Systems only, Debian & Ubuntu users skip this Step.

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

Important: In Case you Don’t want to Disable Selinux you can use the Following Command to over-ride policy :

# chcon -R -t httpd_sys_content_rw_t /var/www/html/

Step: 4. Reboot the System :

# init 6

Step: 5. Install Apache Server :

For CentOS/RHEL Users :

# yum -y install httpd httpd-devel

For Debian Users :

# apt-get -y install apache2

Step: 6. Install PHP :

For CentOS/RHEL Users :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel \
    php-xml php-imap php-ldap php-mbstring php-odbc php-pear php-xmlrpc php-soap php-cli \
    php-pdo php-intl mod_ssl
 
For Debian Users :

# apt-get -y install php5 php5-mysql libapache2-mod-php5

Step: 7. Restart Apache Service :

For CentOS/RHEL Users :

# service httpd restart
# chkconfig httpd on

For Debian Users :

# service apache2 restart

Step: 8. Install MySQL Server :

For CentOS/RHEL Users :

# yum -y install mysql mysql-server mysql-devel

For Debian Users :

# apt-get -y install mysql-client mysql-server

Step: 9. Start MySQL Service & Set MySQL Root Password :

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 10. Create Database For osCommerce :

# mysql -u root -predhat

mysql> create database commercedb;
mysql> grant all privileges on commercedb.* to commerce@localhost identified by 'password';
mysql> grant all privileges on commercedb.* to commerce@'%' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 11. Install Following System Utilities :

For CentOS/RHEL Users :

# yum -y install wget unzip

For Debian Users :

# apt-get -y install wget unzip

Step: 12. Download OsCommerce Online Shopping Package :

# cd /var/www/html
# wget http://www.oscommerce.com/files/oscommerce-2.3.4.zip
# unzip oscommerce-2.3.4.zip
# mv oscommerce-2.3.4/catalog /var/www/html/commerce
# rm -rf oscommerce-2.3.4 oscommerce-2.3.4.zip

Step: 13. Give Appropriate Permission :

# chmod 777 /var/www/html/commerce/includes/configure.php
# chmod 777 /var/www/html/commerce/admin/includes/configure.php

Step: 14. Installing OsCommerce Online Shopping Package through Web Browser :

http://<ip_or_domain>/commerce/install

-- Click on "Start"
-- Database Server:
     Database Server: localhost
     Username: commerce
     Password: password
     Database Name: commercedb
  
-- Click on "Continue"
-- Web Server:
     WWW Address: http://192.168.72.221/commerce/
     Webserver Root Directory: /var/www/html/commerce/
  
-- Click on "Continue"
-- Online Store Settings:
     Store Name: Your Store Name
     Store Owner Name: Koushik Chatterjee
     Store Owner E-Mail Address: kchatterjee@domain.com
     Administrator Username: admin
     Administrator Password: Passw0rd
     Time Zone: select Kolkata

-- Click on "Continue"

Step: 15. Secure the osCommerce Online Shopping Store :

# rm -rf /var/www/html/commerce/install/
# chmod 644 /var/www/html/commerce/includes/configure.php
# chmod 644 /var/www/html/commerce/admin/includes/configure.php

Step: 16. To Check & Set the Appropriate Permission :

http://192.168.72.221/commerce/admin/login.php
Username: admin
Password: Passw0rd

-- Click on "Tools"
-- "Security Directory Permissions".

# chmod -R 775 /var/www/html/commerce/images/
# chown -R root:apache /var/www/html/commerce/images/
# chmod -R 775 /var/www/html/commerce/pub/
# chown -R root:apache /var/www/html/commerce/pub/
# chmod -R 755 /var/www/html/commerce/includes/
# chmod -R 755 /var/www/html/commerce/admin/
# chown -R root:apache /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/includes/work/
# chown -R root:apache /var/www/html/commerce/includes/work/

# chmod -R 775 /var/www/html/commerce/images/
# chown -R root:apache /var/www/html/commerce/images/
# chmod -R 775 /var/www/html/commerce/pub/
# chown -R root:apache /var/www/html/commerce/pub/
# chmod -R 755 /var/www/html/commerce/includes/
# chmod -R 755 /var/www/html/commerce/admin/
# chown -R root:apache /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/includes/work/
# chown -R root:apache /var/www/html/commerce/includes/work/

-- Click on "Configuration"
-- Click on "Administrator"

# chmod 775 /var/www/html/commerce/admin/.htpasswd_oscommerce
# chmod 775 /var/www/html/commerce/admin/.htaccess
# chgrp apache /var/www/html/commerce/admin/.htpasswd_oscommerce
# chgrp apache /var/www/html/commerce/admin/.htaccess
   
-- Again Click on "Administrator"
-- Click on "Edit" Button.
-- Give Admin User Name & Password.
-- Check on "Protect With htaccess/htpasswd".
-- Finally Click on "Save" Button.

http://192.168.72.221/commerce/

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog


2 comments:

  1. online shopping,online store,,mes clothes,womens clothes,traditional items,international shopping buy and sale

    ReplyDelete

Copyright © 2016 Kousik Chatterjee's Blog