Ruben
09-02-2004, 09:59 AM
Hi,
I just found a howto i posted in the old forum and am placing it back here now.
This howto lets your potential new customers test a soholaunch version and it features and will install everyday a fresh install, so your demo does not get corrupted by users changing settings, passwords, place weird text, because above all, you want your demo to look nice as well, right?
I will see if i have time to place everything in a file and make it more detailed if nobody understands this. (but then i recommend you not use this in the first place :-) )
here is the howto:
---------------------
asuming you have your demo installed on a dir on an existing domain like http://www.yourdomain.com/sohodemo/
as root
put in the folder /home/virtual/testdomain.com/var/www/ your tar'ed demo (soho-demo.tar.gz)
create in this same folder a file called sohodemodrop.sql ( which will delete all soho tables, see below) and chmod it to 777:
put this contect (without the ----) in this file.
----------------------------------------
DROP TABLE `BLOG_CATEGORY`, `BLOG_CONTENT`, `CAMPAIGN_MANAGER`, `STATS_BROWSER`, `STATS_BYDAY`, `STATS_BYHOUR`, `STATS_REFER`, `STATS_TOP25`, `STATS_UNIQUE`, `UDT_BLOG`, `UDT_CONTENT_SEARCH_REPLACE`, `UDT_KONTAKTFORM_EMAIL`, `UNSUBSCRIBE`, `calendar_category`, `calendar_display`, `calendar_events`, `cart_category`, `cart_customers`, `cart_invoice`, `cart_options`, `cart_paypal`, `cart_products`, `cart_shipping_opts`, `cart_tax`, `login`, `photo_album`, `sec_codes`, `sec_users`, `site_pages`;
-------------------
save the following file (i call it 'setsohodemo' in /etc/cron.daily (or weekly or monthly)
and chmod it to 755
change the following:
change testdomain.com --> the domain you have the demo installed on
change testdomain_com --> the database you have the mysql files installed on
--------------------
#!/bin/sh
cd /home/virtual/testdomain.com/var/www/html/
rm -rf sohodemo/
cd /home/virtual/testdomain.com/var/www/
cp soho-demo.tar.gz html/sohodemo/
cd html/sohodemo
tar -xvzf soho-demo.tar.gz
rm -rf soho-demo.tar.gz
cd /home/virtual/testdomain.com/var/www/
mysql -uroot -pyourdatabasepassword testdomain_com < /home/virtual/testdomain.com/var/www/sohodemodrop.sql
mysql --force -uroot -pourdatabasepassword testdomain_com < /home/virtual/testdomain.com/var/www/sohodemoSQL.sql
I just found a howto i posted in the old forum and am placing it back here now.
This howto lets your potential new customers test a soholaunch version and it features and will install everyday a fresh install, so your demo does not get corrupted by users changing settings, passwords, place weird text, because above all, you want your demo to look nice as well, right?
I will see if i have time to place everything in a file and make it more detailed if nobody understands this. (but then i recommend you not use this in the first place :-) )
here is the howto:
---------------------
asuming you have your demo installed on a dir on an existing domain like http://www.yourdomain.com/sohodemo/
as root
put in the folder /home/virtual/testdomain.com/var/www/ your tar'ed demo (soho-demo.tar.gz)
create in this same folder a file called sohodemodrop.sql ( which will delete all soho tables, see below) and chmod it to 777:
put this contect (without the ----) in this file.
----------------------------------------
DROP TABLE `BLOG_CATEGORY`, `BLOG_CONTENT`, `CAMPAIGN_MANAGER`, `STATS_BROWSER`, `STATS_BYDAY`, `STATS_BYHOUR`, `STATS_REFER`, `STATS_TOP25`, `STATS_UNIQUE`, `UDT_BLOG`, `UDT_CONTENT_SEARCH_REPLACE`, `UDT_KONTAKTFORM_EMAIL`, `UNSUBSCRIBE`, `calendar_category`, `calendar_display`, `calendar_events`, `cart_category`, `cart_customers`, `cart_invoice`, `cart_options`, `cart_paypal`, `cart_products`, `cart_shipping_opts`, `cart_tax`, `login`, `photo_album`, `sec_codes`, `sec_users`, `site_pages`;
-------------------
save the following file (i call it 'setsohodemo' in /etc/cron.daily (or weekly or monthly)
and chmod it to 755
change the following:
change testdomain.com --> the domain you have the demo installed on
change testdomain_com --> the database you have the mysql files installed on
--------------------
#!/bin/sh
cd /home/virtual/testdomain.com/var/www/html/
rm -rf sohodemo/
cd /home/virtual/testdomain.com/var/www/
cp soho-demo.tar.gz html/sohodemo/
cd html/sohodemo
tar -xvzf soho-demo.tar.gz
rm -rf soho-demo.tar.gz
cd /home/virtual/testdomain.com/var/www/
mysql -uroot -pyourdatabasepassword testdomain_com < /home/virtual/testdomain.com/var/www/sohodemodrop.sql
mysql --force -uroot -pourdatabasepassword testdomain_com < /home/virtual/testdomain.com/var/www/sohodemoSQL.sql