OsCommerce
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Contents |
About OsCommerce
Quote from http://www.oscommerce.org/ :
- osCommerce is the leading Open Source online shop e-commerce solution that is available for free under the GNU General Public License. It features a rich set of out-of-the-box online shopping cart functionality that allows store owners to setup, run, and maintain their online stores with minimum effort and with no costs, license fees, or limitations involved.
Installing backend (apache2, php4, mysql)
First, we need to install apache. Then both mod_php, that comes with the package php, and mysql, then do some quick setup. Don't forget to add the apache2 USE flag.
# emerge -av php mysql
register_globals (/srv/www/shop/.htaccess)
And in /etc/mysql/my.cnf, set:
| File: /etc/mysql/my.cnf |
datadir = /srv/mysql |
Be sure to create /srv.
# mkdir /srv
Create the mysql database, set the proper permissions on it and start it!
# ebuild /var/db/pkg/dev-db/mysql-4.0.23/mysql-4.0.23.ebuild config # /etc/init.d/mysql start # /usr/bin/mysqladmin -u root password 'new-password'
If it denies access, such as:
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
You might want to try with -p, which will prompt you for the previous password.
# /usr/bin/mysqladmin -u root -p password 'new-password'
Main instalation
Retriving
main page:
wget http://www.oscommerce.com/redirect.php/go,34
sourceforge:
wget http://downloads.sourceforge.net/tep/oscommerce-2.2ms2-060817.tgz?modtime=1155775512&big_mirror=0
unpack to /srv/www/shop/
chmod a+r /srv/www/shop/* -Rv chmod -v a+x `find /srv/www/shop/ -type d`
Initial configuring
| File: /etc/apache2/conf/modules.d/990_oscommerce.conf |
Alias /shop /srv/www/shop <Directory /srv/www/shop/> Order allow,deny Allow from all </Directory> |
chmod 777 /srv/www/shop/images chmod 706 /srv/www/shop/includes/configure.php chmod 706 /srv/www/shop/admin/includes/configure.php chmod 777 /srv/www/shop/admin/backups (create if doesn't exist)
Optional
chmod 666 /srv/www/shop/includes/languages/polish/mainpage.php chmod 777 /srv/www/shop/admin/images/graphs
| File: /srv/www/shop/install/oscommerce.sql |
insert into counter (startdate, counter) values ('20050116', '0');
http://myhost.mydomain.net/shop/
localhost, root, new-password, dbname, persistent, database
|
| File: /srv/www/shop/include/configure.php |
define('HTTP_SERVER', 'https://host.mydomain.com');
define('HTTPS_SERVER', 'https://host.mydomain.com');
|
| File: /srv/www/shop/admin/include/configure.php |
define('HTTP_SERVER', 'https://host.mydomain.com');
define('HTTP_CATALOG_SERVER', 'https://host.mydomain.com');
define('HTTPS_CATALOG_SERVER', 'https://host.mydomain.com');
|
Configuration and securing
| File: /etc/apache2/conf/modules.d/41_mod_ssl.default-vhost.conf |
<Directory /srv/www/shop/admin> AllowOverride None AuthType Basic AuthName "My Shop" AuthUserFile /srv/www/pass AuthGroupFile /srv/www/group Require group shop </Directory> |
| File: /srv/www/group |
shop: user1 user2 |
htpasswd -c /srv/www/pass user1 htpasswd /srv/www/pass user2
rm -rv /srv/www/shop/install chmod 704 /srv/www/shop/includes/configure.php chmod 704 /srv/www/shop/admin/includes/configure.php
Login to administration panel with admin@localhost.pl admin
rc-update add mysql default
Browse categories > Applications > Webapplication
Browse categories > Gentoo Linux Wiki > Wiki maintenance > Stub
Last modified: Mon, 08 Sep 2008 17:11:00 +1000 Hits: 17,218
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and list their apartments, townhouses and units.
