Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Installation fixes - sqlsplit, shared-setup


Guest

Recommended Posts

Hi

We at inode.at (one of the larger ISP's) will support osCommerce for our customers to replace the current shop based on hybris.

 

Therefore I overworked the installation procedure.

In the Contributions - Templates I added a feature to split the current oscommerce.sql into the required part oscommerce.sql and the optional part sample-products.sql, plus the required changes to the templates.

 

We also have a shop-setup script to install the shop for each customers on one of our webservers. We currently host about 2000 cuustomers per webserver.

There's a shared /usr/local/tep installation and per user we symlink the catalog and admin files, copy the stylesheets and .htaccess and a local includes directory plus a local languages. Everything else is shared.

 

It looks like this:

cd /home/$user/www/home

if [ -d catalog ]; then 

 echo "error: /home/$user/www/home/catalog already exists"; exit

fi



mkdir catalog

cd catalog

mkdir -p images download download admin includes-local/languages

# symlinks

ln -s /usr/local/tep/catalog/catalog/*.php .

ln -s /usr/local/tep/catalog/catalog/includes

ln -s /usr/local/tep/catalog/catalog/install

# local copies

cp -b /usr/local/tep/catalog/catalog/.htaccess .

cp -b /usr/local/tep/catalog/catalog/*.css .

cp -br /usr/local/tep/catalog/catalog/images/* images/

cp -br /usr/local/tep/catalog/catalog/download/* download/

cp -br /usr/local/tep/catalog/catalog/pub/* pub/

cp -br /usr/local/tep/catalog/catalog/includes/languages/*  

   includes-local/languages/

chown $user.$user .htaccess

chmod -R g+w includes-local admin

cp /usr/local/tep/admin/admin/.htaccess .

install -d -m0770 -o$user -g$wwwgroup backups

# only symlinks, no local copies

ln -s /usr/local/tep/admin/admin/*.php .

ln -s /home/$user/www/home/catalog/includes-local includes-local

ln -s /usr/local/tep/admin/admin/includes

ln -s /usr/local/tep/admin/admin/images

# todo: protect

cat >> .htaccess <<EOF



AuthType Basic

AuthName Admin

AuthUserFile /home/$user/www/conf/.htpasswd

Satisfy All

Require valid-user

EOF

chown $user.$user .htaccess

chown -R $user.$user ..



cd /home/$user/www



# will not be overwritten by install.php

cat > home/catalog/includes-local/configure.php <<EOF2

<?php



define('DB_SERVER_USERNAME', '$user');

define('DB_SERVER_PASSWORD', '$dbpass');

define('DB_DATABASE', DB_SERVER_USERNAME . '_shop');



define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false');         

// secure webserver for catalog module



// shared dirs

define('DIR_WS_ADMIN',   '/catalog/admin/');   // www.shop.at/catalog/admin/

define('DIR_WS_CATALOG', '/catalog/');         // www.shop.at/catalog/



define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes-local/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes-local/languages/');



define('TMP', '/home/$user/tmp');

?>

EOF2

chown -R $user.$user home/catalog



mysqladmin -uroot -p$dbrootpass create $dbname

mysql $dbname < /usr/local/tep/catalog/catalog/install/oscommerce.sql

 

--

BTW: After one year pause working at tep, I saw that there's still not much advance, compared to my old tepb2b_pre3 version. well oh well.

Link to comment
Share on other sites

In the Contributions - Templates I added a feature to split the current oscommerce.sql into the required part oscommerce.sql and the optional part sample-products.sql, plus the required changes to the templates.

Sorry, The url for the tep_splitsql contribution is

http://www.oscommerce.com/community/contributions,1427

or http://xarch.tu-graz.ac.at/home/rurban/sof...ep_sqlsplit.zip

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...