install osCommerce on Ubuntu

install osCommerce on Ubuntu

osCommerce, is a free eCommerce software that allows you set up your very own complete and self-hosted online stores to sell your products and services. This brief tutorial is going to show students and new users an easy way to get osCommerce working on Ubuntu

PHP based applications that also requires a web and database servers. The LAMP stack is a requirement. LAMP is a acronym for Linux, Apache2, MySQL and PHP. Many reputable online stores and brick and mortar establishments are using this software to run their businesses.

This post covers installing the latest version of

To get started with installing, follow the steps below:

STEP 1: INSTALL APACHE2
requires a webserver to function and the most popular webserver in use today is Apache2. So, go and install Apache2 on Ubuntu by running the commands below:

sudo apt-get install apache2

After installing Apache2, run the commands below to disable directory listing.

sudo sed -i “s/Options Indexes FollowSymLinks/Options FollowSymLinks/” /etc/apache2/apache2.conf

Next, run the commands below to stop, start and enable Apache2 service to always start up with the server boots.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

STEP 2: INSTALL MARIADB
osCommerce also requires a database server to function.. and MariaDB database server is a great place to start. To install it run the commands below.

sudo apt-get install mariadb-server mariadb-client

After installing, the commands below can be used to stop, start and enable MariaDB service to always start up when the server boots.

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

After that, run the commands below to secure MariaDB server.

sudo mysql_secure_installation

Restart MariaDB server

sudo systemctl restart mariadb.service

STEP 3: INSTALL PHP AND RELATED MODULES
also requires PHP to function. To install PHP and related modules run the commands below

sudo apt-get install php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-mcrypt php-ldap php-zip php-curl

STEP 4: CREATE DATABASE
Now that you’ve installed all required packages, continue below to create osCommerce database.

Run the commands below to logon to the MariaDB server. When prompted for a password, type the root password you created above.

sudo mysql -u root -p

Then create a database called oscdb

CREATE DATABASE oscdb;

Create a database user called oscuser with new password

CREATE USER ‘oscuser’@’localhost’ IDENTIFIED BY ‘new_password_here’;

Then grant the user full access to the database.

GRANT ALL ON oscdb.* TO ‘oscuser’@’localhost’ IDENTIFIED BY ‘user_password_here’ WITH GRANT OPTION;

Finally, save your changes and exit.

FLUSH PRIVILEGES;
EXIT;

STEP 5: DOWNLOAD LATEST RELEASE
Next, visit site to download the latest version

After downloading, run the commands below to extract the download file into Apache2 root directory.

unzip oscommerce-2.3.4.1.zip
sudo mv oscommerce-2.3.4.1 /var/www/html/oscommerce

Change or modify the directory permission to fit Apache2 configuration.

sudo chown -R www-data:www-data /var/www/html/oscommerce
sudo chmod -R 755 /var/www/html/oscommerce

STEP 6: CONFIGURE APACHE2
Finally, configure Apahce2 site configuration file for osCommerce. This file will control how users access osCommerce content. Run the commands below to create a new configuration file called oscommerce.conf

sudo nano /etc/apache2/sites-available/oscommerce.conf

Then copy and paste the content below into the file and save it. Replace the highlighted line with your own domain name and directory root location.

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/oscommerce/
     ServerName example.com
     ServerAlias www.example.com

     <Directory /var/www/html/oscommerce/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save the file and exit.

STEP 7: ENABLE THE REWRITE MODULE
After configuring the VirtualHost above, enable it by running the commands below

sudo a2ensite oscommerce.conf
sudo a2enmod rewrite

STEP 8 : RESTART APACHE2
To load all the settings above, restart Apache2 by running the commands below.

sudo systemctl restart apache2.service

Then open your browser and browse to the server domain name. You should see setup wizard to complete. Please follow the wizard carefully.

ex. http://example.com/catalog

install osCommerce on Ubuntu

Begin the installation.. You will be prompted for the database server info.. type it as shown below.

install osCommerce on Ubuntu

Next, enter the store name and admin username and password and continue

install osCommerce on Ubuntu

Complete the installation.

install osCommerce on Ubuntu

Enjoy!

POST-INSTALLATION STEPS:
It is recommended to follow the following post-installation steps to secure your Online Merchant online store:

Delete the /var/www/html/oscommerce/catalog/install directory.

Rename the Administration Tool directory located at /var/www/html/oscommerce/catalog/admin.

Set the permissions on /var/www/html/oscommerce/catalog/includes/configure.php to 644 (or 444 if this file is still writable).

Set the permissions on /var/www/html/oscommerce/catalog/admin/includes/configure.php to 644 (or 444 if this file is still writable).

Review the directory permissions on the Administration Tool -> Tools -> Security Directory Permissions page.

The Administration Tool should be further protected using htaccess/htpasswd and can be set-up within the Configuration -> Administrators page.

That’s it!

sudo rm -rf /var/www/html/oscommerce/catalog/install
sudo chmod 644 /var/www/html/oscommerce/catalog/includes/configure.php
sudo chmod 644 /var/www/html/oscommerce/catalog/admin/includes/configure.php

Android app development company
ecommerce app development company
iPhone app development company
Ionic development

2 Comments
  1. I went over this internet site and I conceive you have a lot of wonderful information, saved to fav (:.

  2. Google

    Always a big fan of linking to bloggers that I adore but do not get a great deal of link adore from.

Leave a reply

Corundum
Logo
Register New Account
Reset Password
Compare items
  • Total (0)
Compare
0