|
Installation is no different than installing stock osCommerce MS2. It is a simple matter up uploading, unzipping, or un-taring the osCommerce archive on your server, moving the files where you want them, and running the installation script.
Requirements: - register_globals must be on in the directory that you run osCMax
- register_long_arrays must be on
- PHP4+, MySql 4.1+, Apache 1.3+ compatible
- PHP5+, mysql 5+, Apache 2+ have been tested and work fine if register globals and register long arrays is on. If register globals is off, RC3.01 installer will not run and several features will break.
The installation script is a fairly easy process, but there is a lot of user input that is needed. You will need to know the following information:
Now that you have the above information handy, you can install osCMax using whatever below method you like:
Installing via FTP: Upload the /catalog and sub-directories to your server. The files and directory structure must be uploaded to your web server. This can accomplished in several different ways. Use whatever method is most familiar to you, i.e., unzipping the zip archive to your local computer and using your favorite FTP program to upload those files, or using SSH to tar/unzip on your server to avoid the tedium of downloading and re-uploading.
The files can be uploaded to the document root, or any other subdirectory, like /catalog. Note: If you are using FTP to upload files, you must upload all PHP files in ASCII mode, not binary. In our examples, we upload the files to the /catalog subdirectory. If you have never looked at the oscommerce archive before, the basic directory structure looks like this: osCommerce2.2MS1.zip
...../catalog
......../admin |
First, upload the /catalog directory and all the directories and files it contains to your document root (public_html or www). When you are finished uploading, your basic directory tree should look like this:
/public_html
...../catalog
......./admin
........../images
........../includes
......./download
......./images
......./includes
......./install |
Set the permissions on /catalog/includes/configure.php and /catalog/admin/includes/configure.php to chmod 777 if on a Unix/Linux system.
Setting file permissions correctly will allow the installation script to write to the configure.php files. So, after they are uploaded you can use telnet, ssh, or your favorite FTP client to set the file permissions. CHMOD 777 will set the correct permissions for installation. If on a Windows based system, you will not need to change file permissions yet.
Using phpMyAdmin or other tool, create your database and user, and assign that user to the database.
This section provides instructions using phpMyAdmin to create a database and user, and assign that user to the database. These steps are necessary BEFORE you run the install script. Note:You do not need to create the database beforehand if your MySQL account has permissions to create new databases. -
On the opening screen of phpMyAdmin, under the MySql heading, you will see a text box. Enter the name of your database here, and click the create button. This creates your database.
-
Click the Home link in the left frame. Then click the users link. On the next page, select the database that you want to assign this user to. Enter the host name (usually localhost), enter the username, and password. Check all the privileges available and click go. This creates the user and assigns the user to the correct db.
Note: Many virtual hosts do not allow this type of access through phpmyadmin, and instead provide you with another way to create your databases and users through your hosting control panel. Check with your host.
Run the install script, filling in all the required information.
The install script is included in the osCommerce package and is located in the /catalog/install directory. Open your web browser, and point it to http://yourserver.com/catalog/install/index.php and the installer will begin. Replace ‘yourserver’ with your domain name or ip address. This will start the osCommerce installation script.
See the steps below to complete the installation script:
-
Select the 'New Install' button
-
Next, check the "import catalog database" and "automatic configuration" checkboxes.
-
Make sure all the Webserver Information on this page is correct in section 2
-
Next, enter your correct database information in section 3 of the install page
-
Click the "Continue" Button
-
Next, the script will confirm a connection to your database, if it all works, click the continue button. If you get an error, you have made a mistake in your database info. Click the back button and correct your mistake.
-
Next, you will get a confirmation of successful database import. Click the continue button.
-
Next, the install script will attempt to access your configure.php files. If the permissions are wrong, you will get error messages, and a "Retry" button. Set the permissions correctly and retry.
-
The next page has more options. This is step 2 of the installation. Enter the correct web server information.
-
If you want to enable SSL, check the checkbox, and confirm that all info is correct.
-
If you are on shared hosting, make sure the "persistent connections" box is unchecked.
-
Choose to store sessions as files or in the database and click continue.
-
You have reached the conclusion of the install script. Before you continue, click each button, "Catalog" and "Administration Tool" to test the install.
-
Login to the admin panel with the default credentials: email : admin@localhost.com pw: admin
Re-set the permissions on /catalog/includes/configure.php and /catalog/admin/includes/configure.php to chmod644 This is important to ensure security of your configuration. CHMOD 644 the above files. This can be done through telnet, ssh, or an FTP client. If on a Windows server, you will need to right click the configure.php files and select 'properties' in the context menu. Once on the properties page, check the 'Read Only' chekbox, click Apply, and OK.
Set the permissions on /catalog/images dir to 777
In order to properly upload images through the admin section, the images directory must have world writable permissions set. CHMOD 777 this directory.
Create the dir /catalog/admin/backups and set the permissions to 777
In your /catalog/admin directory, create the subdirectory /backups and set the permissions to 777. This will allow you to use the database backup function without receiving error messages. With this permissions configuration, it is not secure to keep backups on your server. You should download the backup to your local computer, and never store the backup on the web server.
**Optional** Password protect your /catalog/admin dir using .htaccess
Your admin section should be password protected. The easiest way to do this is to use .htpasswd and .htaccess to secure the directory. If you are not sure how to do this, please follow the procedure outlined below:
AuthType Basic
AuthName "Locked Area"
AuthUserFile /home/youraccount/.htpasswds/admin/passwd
require valid-user
See Also .htaccess Instructions
Add to your DirectoryIndex statement and include the following : index.php This can be done in the Apache httpd.conf file if you have root access, or can be done in an .htaccess file in your /catalog dir.
This is the .htaccess method for adding the DirectoryIndex statement.
-
Create a plain text file using a text editor.
-
Add this statement : DirectoryIndex index.php index.htm index.html -
Save the file as .htaccess (note the period before the h)
-
Upload it to your /catalog directory
This tells the server to look for index.php as the index page in the /catalog directory, so you can access your catalog by the url http://www.yoursite.com/catalog/ instead of having to include the filename like this http://www.yoursite.com/catalog/index.php.
Delete your /catalog/install directory
Congratulations, you have completed all the necessary steps to successfully installing OSCommerce on your web server. You should be able to access your catalog at http://yoursite.com/catalog and your admin at http://yoursite.com/catalog/admin .
Installing via SSH
This section details how to install osCommerce using your SSH client as an alternative to the above method. 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.
This guide assumes the following path /home/public_html/catalog as your base install directory. If your path is different, adjust the below instructions accordingly. I also assume that you have uploaded the zip file to your server already and it is in your public_html directory.
Installation -
Log into your server using your ssh client
-
cd public_html and unzip the osCMax zip file by typing the following command: unzip oscmax_v1.7.zip -
Set the correct Pre-Install file permissions (See the table below). You may be able to skip this step, as the permissions should aready be preset in the zip file.
-
Create the admin/backups dir and set its permissions to 777 using the following commands mkdir catalog/admin/backups and chmod 777 catalog/admin/backups -
pico .htaccess . Add this: DirectoryIndex catalog/index.php index.php.
-
Now, using phpMyAdmin or other mysql tool, create your osCommerce database, and user.
-
Run the osCommerce installation script through your browser. The url is http://www.yourserver.com/catalog/install/ -
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.
-
Test to make sure your catalog and admin sections are working using the buttons on the final page of the install process.
-
Using your SSH client, remove the install directory rm -Rf catalog/install -
Set file permissions to Post-Install levels (See table below)
-
Password protect your admin directory using .htaccess and .htpasswd if you so desire. This step is optional as the Admin is already password protected by default.
-
Login to the admin at http://yoursite.com/catalog/admin/index.php and change the default login credentials. Instructions for this are HERE You are finished with the installation. Pre - Install File Permissions: | 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 | Post - Install File Permissions: | 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 | Default Login You are now ready to login to the admin panel for the first time.
Go to :
http://www.yoursite.com/catalog/admin/
You will be presented with a login screen. The default, preconfigured login is: User name: admin@localhost.com Password: admin It is advised that once you login, you immediately change these credentials to something that only you know. See this document for instructions on how to do this: Changing Default Login
|