$Id: INSTALL,v 1.13 2003/07/12 09:38:07 hpdl Exp $ osCommerce 2.2 Milestone 2 Installation Guide Copyright (c) osCommerce 2003 *** The information presented here is old. It will be updated throughout *** *** the osCommerce 2.2 Milestone path. *** ------------------------------------------------------------------------------ Quick Installation Steps ------------------------------------------------------------------------------ Once having downloaded the archive from the downloads page, follow these steps to get the online shop running: 1. Extract the files from within the package unzip oscommerce-2.2ms2.zip -- or -- tar -xzf oscommerce-2.2ms2.tar.gz -- or -- use your favourite graphical application to extract the files, such as WinZip (http://www.winzip.com) 2. This creates a directory called 'oscommerce-2.2ms2'. Enter this directory and copy the 'catalog' directory to the webroot path of your webserver: cd oscommerce-2.2ms2 cp -R catalog /usr/local/apache/htdocs/ For this example, '/usr/local/apache/htdocs/' is used as the webroot path of the Apache webserver. Do the same for the 'admin' directory but rename the directory to a unique and secret name. This directory does not have to reside inside the catalog directory, though may need to be manually configured. 3. Using your favourite browser, go to the following address: http://[your site]/catalog/install and follow the instructions on the screen. IF YOU PREFER TO DO IT MANUALLY READ HERE: 1. Create the 'osCommerce' database and import the sample data: mysqladmin create osCommerce mysql osCommerce < ./install/oscommerce.sql To check if the tables have been successfully imported, you can list them by using mysqlshow: mysqlshow osCommerce 4. View the file catalog/includes/configure.php and make necessary changes. Now you can use your browser to view the pages which should be located at 'http://localhost/catalog/'. You can also use your browser, or a graphics viewer/editor, to view the database model which is located in the directory where you extracted the files 'oscommerce-2.2ms2/tep_database_model-pr2.1.gif'. ------------------------------------------------------------------------------ Apache/SSL/PHP Installation ------------------------------------------------------------------------------ This is a quick guide to install PHP as a dynamic apache module with SSL features. It is recommended to read through the documentation of each package for a more in-depth installation guide. The individual packages are available at: OpenSSL.......: http://www.openssl.org MOD_SSL.......: http://www.modssl.org Apache........: http://www.apache.org PHP...........: http://www.php.net Zend Optimizer: http://www.zend.com 1. Extract the files from their packages: tar -xzf openssl-0.9.6.tar.gz tar -xzf mod_ssl-2.8.1-1.3.19.tar.gz tar -xzf apache_1.3.19.tar.gz tar -xzf php-4.0.4pl1.tar.gz tar -xzf ZendOptimizer-1.0.0-PHP_4.0.4-FreeBSD4.0-i386.tar.gz 2. To install SSL support in Apache, we need to first install the OpenSSL package: cd openssl-0.9.6 ./config make make test make install cd .. 3. Once OpenSSL is installed, it is now possible to install Apache with MOD-SSL: cd mod_ssl-mod_ssl-2.8.1-1.3.19 ./configure --with-apache=../apache_1.3.19 --with-ssl=../openssl-0.9.6 cd ../apache_1.3.19 ./configure --enable-module=ssl --enable-module=so make make certificate make install cd .. 4. Once Apache is installed, PHP can be installed as a dynamic module (DS0): cd php-4.0.4pl1 ./configure --with-mysql=/usr/local/mysql --disable-debug \ --with-apxs=/usr/local/apache/bin/apxs make make install cp php.ini-dist /usr/local/lib/php.ini cd .. 5. Edit the configuration files for Apache (httpd.conf) and PHP (php.ini). Make sure the following is in the httpd.conf file: LoadModule php4_module libexec/libphp4.so AddType application/x-httpd-php .php If you have ClearModuleList somewhere in the httpd.conf file, then you must add this line: AddModule mod_php4.c 6. To install ZendOptimizer v1.0, you must be using atleast PHP 4.0.4 with debugging disabled: cd ZendOptimizer-1.0.0-PHP_4.0.4-FreeBSD4.0-i386 mkdir /usr/local/Zend mkdir /usr/local/Zend/lib cp ZendOptimizer.so /usr/local/Zend/lib Add the following to the php.ini zend_optimizer.optimization_level=15 zend_extension="/usr/local/Zend/lib/ZendOptimizer.so" 7. To start Apache with SSL: /usr/local/apache/bin/apachectl startssl Or, without SSL: /usr/local/apache/bin/apachectl start After the installation, you can create a file in the webroot directory which contains to see the php configuration variables.