This is how I have produced a Live Linux based Demo CD.
With this CD you can demonstrate or distribute a mambo website directly from a cd. Nothing is installed on the users hard drive. All they have to do is to reboot their computer from the CD.
Note that any changes you make whilst runing the CD will be lost when you reboot.
This CD is created using LAMPPIX a Live CD with the web server Apache, the databases MySQL and PostgreSQL and the programming languages PHP and Perl. It's based on Klaus Knopper's KNOPPIX and Damn Small Linux.
Designed for demonstrating and testing dynamic websites, Lamppix is ideally suited for creating self booting demo CD-Roms of your latest website or php based application. All in a little over 150Mb which leaves plenty of room for your site.
Imagine, your boss wanted you to create a mambo website. You got everything running, everything works. Now, he wants you to show him the site on his PC. You take your Mambo Demo CD, let it boot and show him everything off the CD! There's no need to change anything on his PC.
Best of all because your site is on a read-only CD you can play with at much as you like and all you have to do to get back to the original is to reboot.
Everything is pre-configured, so you can simply insert the CD, and watch as Linux boots and Firefox is started with Mambo running. Firefox is configured so that when it is closed the PC shuts down, so that the user doesn't even have to know anything about linux to see your demo.
If you want to test with php5 instead of php4 start lamppix with lamppix php5 at the boot prompt.
1. Create your mambo website on your development system.
2. Create a work directory on your local machine
3. Save the database
Export your mambo database as a MySQL dump. To do this, you could use a program such as mysqldump or PHPMyAdmin. Save the dump, following the scheme: name_of_the_database.sql
eg mysqldump datenbank > database.sql
pack the MySQL dumps into a tarball mysql-dumps.tar.gz (Note the tarball must have this name)
tar czf mysql-dumps.tar.gz *.sql .
Now move the tarball to the work directory.
4. Edit configuration.php
With your favourite text editor you should make the following changes
$mosConfig_host = 'localhost';
$mosConfig_user = 'root';
$mosConfig_password = '';
$mosConfig_absolute_path = '/var/www';
$mosConfig_live_site = 'http://localhost';
$mosConfig_cachepath = '/var/www/cache';
5. Save the website to a tarball
Pack all your documents into the tarball htdocs.tar.gz,(Note the tarball must have this name) i.e.:
tar czf htdocs.tar.gz /var/www/htdocs/*
Make sure you do not include any backup files or your original configuration.php
Now move the tarball to the work directory.
5. Download lamppix-mini-iso-1.1.iso
http://ibiblio.org/pub/linux/distributions/lamppix/ it is 150Mb in size.
6. create a new directory on your local machine called source
7. mount the .iso image of lamppix
mount -o loop lamppix-mini.iso source
8. create a new directory on your local machine called master
9. Copy the contents of source to master
cp -a source/* master/
10 Copy the tarballs from your work directory to the master/www directory
cp htdocs.tar.gz mysql-dumps.tar.gz master/www/
11. Create a new .iso image
mkisofs -V "LAMPPIX" -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o my-mambo-demo.iso master
This should be all on one line
12. You are now ready to burn the CD
eg cdrecord -v -eject dev=0,0,0 my-mambo-demi.iso
13. Test.
reboot the PC and boot of the newly burnt CD and it should automaticaly start and load your mambo website.
14. Clean up
remove the master and work directories
unmount the lamppix iso (umount source)
DONT forget to change the configuration.php file on your server back to its original settings