Link to LAMS manual install guide -
http://www.lamsinternational.com/documentation/LAMS%201.0.2%20Manual%20Installation.html
The commands in it are linux oriented, but only because linux users don't have a handy installer to take care of things - that's just how I did it though. You could just as easily copy the lams folder from an existing LAMS install to your USB stick - as long as you also copy the database with it. Let me explain:
1. So you've setup LAMS on your Windows PC - Java, MySQL, then LAMS.
2. copy C:\Program Files\MySQL\MySQL Server 4.1 to your USB stick (it may take a few minutes to copy all the files).
3. copy C:\j2sdk1.4.2_10 to your USB stick.
4. Create a new 'lams' directory on the USB drive - copy C:\lams\jboss and C:\lams\lamsdata to this new directory.
Now, when you take your USB drive to another machine, LAMS will need to know that it should use the Java that is on the USB drive, and not some other Java on the host machine (which may be 1.5, or some other incompatible version).
5. Open C:\lams\jboss\bin\run.bat using Notepad/Wordpad, and just after the 8th line where it says
'set JVM_MEM=-Xms256m -Xmx256m'
paste this line (without the quotes):
'set JAVA_HOME=Q:\j2sdk1.4.2_10'
6. Open a new file in Notepad, and insert this line into it (omit the quotes):
'subst Q: j2sdk1.4.2_10'
and save it as 'path.bat' on your USB drive.
Note: this means that 'Q:' will need to be available in the host machine you use the USB drive in (you can use any letter, but using 'd:' for example wouldn't be wise as it is likely to be occupied already on most machines).
Note: the drive letter *must* be the same as the drive letter in step 5.
Now say you're testing the USB drive on a new machine where it has been given the drive letter 'K'.
7. Start MySQL by double-clicking K:\MySQL Server 4.1\bin\mysqld.exe (if that doesn't work, open a command prompt and type in 'K:\MySQL Server 4.1\bin\mysqld.exe').
8. Double-click K:\path.bat.
9. Start LAMS by double-clicking K:\lams\jboss\bin\run.bat.
And that should be it. Your folder names/drive letters may vary, etc.
To close LAMS before taking out the USB drive, press Ctrl-C in the console windows of MySQL and LAMS. You should also make a 'undopath.bat' to undo the change to the system made by 'path.bat' earlier.
To create undopath.bat, just paste this line into the new file:
'subst Q: /d'
and double-click it whenever you're done with LAMS on a foreign machine.
Posted by Jun-Dir Liew