# ssh root@server_ip<\/pre>\nYou can check whether you have the proper Debian version installed on your server with the following command:<\/p>\n
# lsb_release -a<\/pre>\nYou should get this output:<\/p>\n
Distributor ID: Debian\r\nDescription: Debian GNU\/Linux 8.3 (jessie)\r\nRelease: 8.3\r\nCodename: jessie<\/pre>\n<\/span>3. UPDATE THE SYSTEM<\/span><\/h2>\nMake sure your server is fully up to date using:<\/p>\n
# apt-get update && apt-get upgrade<\/pre>\nNow create a database that will be needed for the osCommerce installation. Log into MySQL as root and execute the below queries:<\/p>\n
# mysql -u root -p\r\n\r\nmysql> CREATE DATABASE oscommerce;\r\nQuery OK, 1 row affected (0.00 sec)\r\n\r\nmysql> GRANT ALL PRIVILEGES on oscommerce.* to oscommerceuser@localhost identified by 'your_password';\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nmysql> FLUSH PRIVILEGES;\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nmysql> quit;\r\nBye<\/pre>\n<\/span>4. INSTALL OSCOMMERCE<\/span><\/h2>\nNavigate to Apache’s default document root ( \/var\/www\/html\/<\/strong><\/em> ) and download the latest osCommerce version (during the writing of this article the latest version is 2.3.4) :<\/p>\n# cd \/var\/www\/html\/\r\n\r\n# wget http:\/\/www.oscommerce.com\/files\/oscommerce-2.3.4.zip<\/pre>\nUnzip the archive:<\/p>\n
# unzip oscommerce-2.3.4.zip<\/pre>\nRename the unpacked directory:<\/p>\n
# mv oscommerce-2.3.4\/ oscommerce\/<\/pre>\nGive appropriate permissions to the below files so your web server can save the installation parameters accordingly. Execute the following commands:<\/p>\n
# chmod 777 \/var\/www\/html\/oscommerce\/catalog\/includes\/configure.php\r\n\r\n# chmod 777 \/var\/www\/html\/oscommerce\/catalog\/admin\/includes\/configure.php<\/pre>\n<\/span>5. Continue the installation in web broweser<\/span><\/h2>\nNow open your favorite web browser and navigate to: http:\/\/your_IP_address\/oscommerce\/catalog\/install\/index.php<\/strong> . You will be welcomed by the osCommerce installation page as shown in the picture below:<\/p>\n<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
Of course the PHP settings and required PHP extensions need to be enabled\/installed so you can proceed with the installation. If everything is OK, click on Start<\/strong> to proceed with the installation. Next are the database settings. Enter the database credentials which if you followed our instructions in the database creation part should be as the ones in the below image:<\/p>\n<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
Next, a page where you can configure your store settings will be opened. Fill the fields according to your needs and finish the installation.<\/p>\n
Your store can be accessed at: http:\/\/your_server_IP\/oscommerce\/catalog\/index.php<\/strong> and the osCommerce administration backend at: http:\/\/your_server_IP\/oscommerce\/catalog\/admin\/login.php<\/strong><\/p>\nYou are probably noticing the post-installation notes which say that you should delete the install<\/strong><\/em> directory, set correct permissions on some files and protect the administration tool. Execute the underneath commands:<\/p>\n# rm -rf \/var\/www\/html\/oscommerce\/catalog\/install\/\r\n\r\n# chmod 644 \/var\/www\/html\/oscommerce\/catalog\/includes\/configure.php\r\n\r\n# chmod 644 \/var\/www\/html\/oscommerce\/catalog\/admin\/includes\/configure.php<\/pre>\nNow let’s password protect the osCommerce administration tool with the htpasswd utility. Execute:<\/p>\n
# htpasswd -c \/var\/www\/html\/oscommerce\/catalog\/admin\/.htpasswd your_user<\/pre>\nYou will now be prompted to enter a password, twice. After you enter the password you can check whether the credentials have been entered as expected:<\/p>\n
# cat \/var\/www\/html\/oscommerce\/catalog\/admin\/.htpasswd<\/pre>\n