rogue780 wrote:How do I go about doing this?
a) Unpack the Xampp Tar Package on to USB drive (let's call it /media/usb), which results in an installation of Xampp in /media/usb/lampp.
b) whenever you unplug and plub your USB stick, it will be mounted to /media/usb (or whatever you choose). At next step, create a symbolic link from /media/usb/lampp to /opt/lampp
- Code: Select all
sudo ln -s /media/usb/lampp /opt/lampp
This link step is most important, as lampp only runs from /opt/lampp on Linux!c) finally start lampp as usual by typing
- Code: Select all
sudo /opt/lampp/lampp start
rogue780 wrote:Also, if there is a way to have both a linux and a windows lampp stack share a mysql database that would be great.
There is no problem about that. The "datadir" directive of MySQL (either in my.cnf or a command line parameter to mysqld, the mysql server) determines the folder where the databases are stored. Simply provide the appropriate value to datadir, depending on the OS which you are currently running. The command line option overrides the directives of the my.cnf file.
The Linux pathname of the MySQL database may look like /opt/lampp/var/mysql (or similar - I dont remember exactly; dont forget - the USB stick is linked to /opt/lampp via symbolic link) and the Windows Pathname for MySQL might look like U:/lampp/var/mysql (this is the Windows Pathname for the Linux MySQL Data Folder). You must put as well the Windows Xampp as well as the Linux Xampp onto the stick (for the binary executables), but simply use only one of the two MySQL Data Folders for both "views". In a fresh installed environment, the databases are identically.
You may as well share the DocumentRoots (same logic). Only the binaries (httpd.exe, DLLs etc.) are different between WIndows and Linux.