Chapter7: SSH Installation

This section details how to install osCommerce using a SSH client. This is an advanced technique and requires that you fully understand what you are doing. If you are comfortable working from the Linux command line, this is a breeze, and you can have a fully functional osCommerce installation in about 15 minutes. This is the fastest method to install osCommerce if you know what you are doing. If you do not know how to use SSH, I recommend using the standard FTP installation method, unless you are willing to take extra time to learn this process.
 
  1. Log into your server using your ssh client
  2. In your home directory, make the directory /shop  using this command : mkdir shop
  3. Navigate to /shop and using zmodem transfer, upload the latest osCommerce snapshot
  4. Un tar the archive using this command : tar -zxvf filename.tar.gz (replace filename with the actual snapshot filename)
  5. Navigate to /shop/catalog and copy the /shop/catalog/catalog directory to your public_html dir using the command cp -r catalog /path/to/public_html
  6. Navigate to /shop/admin and copy the /shop/admin/admin directory to your  /public_html/catalog  dir using the command cp -r admin /path/to/public_html/catalog
  7. Delete the shop directory
  8. Set permissions per the table below:

     

    Directory Permission Level
    /admin/includes chmod 755
    /catalog/includes chmod 755
    /admin/includes/configure.php chmod 777
    /catalog/includes/configure.php chmod 777

    /catalog/images

    chmod 777

  9. Create the /admin/backups dir and set its permissions to 777
  10. Navigate to /catalog and pico .htaccess . Add this:  DirectoryIndex default.php index.php
  11. Now, using phpMyAdmin or other mysql tool, create your osCommerce database, and user.
  12. Run the osCommerce installation script through your browser. The url is http://www.yourserver.com/catalog/install/
  13. Confirm that all information in the setup fields is correct, and add the correct mysql database, username and password. Import the sample data and complete the installation.
  14. Test to make sure your catalog and admin sections are working using the buttons on the final page of the install process.
  15. Using your SSH client, remove the install directory
  16. Re-Set the permissions per the table below:

     

    Directory Permission Level
    /admin/includes chmod 755
    /catalog/includes chmod 755
    /admin/includes/configure.php chmod 644
    /catalog/includes/configure.php chmod 644
    /catalog/images chmod 777
  17. Password protect your admin directory using .htaccess and .htpasswd
 
You are finished with the installation.