In this tutorial we will show you how to install osCommerce on a CentOS 7 VPS
It can be used on any web server with PHP and MySQL installed and it allows you to setup and maintain e-stores very easily with almost no effort.
Before you start the installation, please make sure that you have LAMP stack installed on your server. If not, follow our excellent tutorial about installing LAMP (Linux Apache, MariaDB & PHP) on a CentOS 7 VPS
We are using our SSD 1 VPS hosting plan for this tutorial.
2. Update the system
Login to your server as user ‘root’ and make sure your Linux VPS is fully up-to-date:
# ssh root@hostname # yum update
3. Install osCommerce
Let’s navigate to a directory where we will download osCommerce. For the purposes of this tutorial we will use the opt directory.
# cd /opt
4. Install wget
Install wget and unzip:
# yum install wget unzip
5. Download osCommerce
The next thing to do is to download the latest stable version of osCommerce which is 2.3.4 during the writing of this article. Issue the following command:
# wget http://www.oscommerce.com/files/oscommerce-2.3.4.zip
5. Configure osCommerce
Unzip the installation file:
# unzip oscommerce-2.3.4.zip
Move the installation directory into your Apache web server’s document root:
# mv oscommerce-2.3.4 /var/www/html/
You can rename the directory according to your needs. In our case we will change the name to oscommerce.
# mv /var/www/html/oscommerce-2.3.4/ /var/www/html/oscommerce/
6. Configure web server
To make your web server able to save the installation parameters to its configuration files, you need to give appropriate permissions to the following files. Execute the following commands:
# chmod 777 /var/www/html/oscommerce/catalog/includes/configure.php # chmod 777 /var/www/html/oscommerce/catalog/admin/includes/configure.php
7. Create MySql database
Enter MySQL as root:
# mysql -u root -p mysql> CREATE DATABASE oscommerce; mysql> GRANT ALL PRIVILEGES on oscommerce.* to oscuser@localhost identified by 'your_password'; mysql> FLUSH PRIVILEGES; mysql> quit;
With this step the installation procedure from the command line is done.
8. Continue the installation via web browser
Now open your favorite web browser and navigate to http://your_IP_address/oscommerce/catalog/install/index.php and follow the on-screen instructions.
Please note that it is recommended to follow the post-installation steps after the completion of the installation procedure to secure your osCommerce Online Merchant online store. One of the steps is to delete the installation files and re-set the permissions. You can do that with the following commands:
# rm /var/www/html/oscommerce/catalog/install/ # chmod 644 /var/www/html/oscommerce/catalog/includes/configure.php # chmod 644 /var/www/html/oscommerce/catalog/admin/includes/configure.php
After you complete the web-based installation and follow the post-installation steps you will have a fully functional e-commerce and online store management system installed on your virtual server.
Of course you don’t have to install osCommerce on CentOS 7 if you use one of our eCommerce hosting services, in which case you can simply ask our expert Linux admins to install osCommerce for you.They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, on how to Install osCommerce on CentOS 7, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.