LAMS 2.4 for Production
The current LAMS 2.4 windows installer is not meant to be use for production servers.
Therefore these are instructions for installing LAMS 2.4 in a production environment.
See for the complete walkthru.
- MySQL 5.1 or 5.5 Server
- Oracle/Sun Java JDK 6 (not version 7)
- LAMS 2.4 Binary package
Installing MySQL Server
Download MySQL for your appropriate Windows version (32 or 64 bits) and follow the standard/tyical MySQL Server installation. Here are some screenshots for it
Make sure you include MySQL directory in the PATH. That will make things easier:
Set up a root password (and make sure you remember it!)
Installing Sun/Oracle JDK 6
Go to the Oracle JDK Downloads page and scroll down to get the Java SE 6 Update ## JDK. Make sure you get the JDK 6 and not the JRE 6. Ensure also that you get it from your appropriate Windows version (32 or 64 bits).
When running the installer, just make sure that you install the JDK in an easier to access directory. By default the JDK will try to install in "C:\Program Files\..." but when working with the command line it's always easier to have it more handly like C:\jdk1.6.0_37 for example.
7Zip is an open source implementation of zip and other compressors that is very very fast and efficient. You can download it from here.
LAMS Binary package
The LAMS Binary package contains all the rest you need to get LAMS up and running quickly in production. But make sure that you unzip this in the C: drive. So once you unzip this, your directory structure should look like this:
Tell LAMS the path to the JDK
Edit C:\lams2\jboss-5.1\bin\run.conf.bat file and set the JAVA_HOME path according to the one you set up while installing Java SE 6 JDK. In my case, this would look like:
Create the LAMS DB in MySQL, add the database and tell LAMS how to connect to it
Open a command line prompt and type
You'll be prompted with the password you set up while installing MySQL. Once you enter it correctly you will see:
In the mysql prompt enter the following commands to create the LAMS database:
Now we create the user and password to access this database. Note that we call the user lams and the password lamsdemo. But you can change as you wish/want:
Let's import the LAMS database model into the newly created mysql db. In the mysql prompt type:
Ok, so now we have created the database, populated with the LAMS data structure and now we need to tell the LAMS application how to connect to it. So edit the C:\lams2\jboss-5.1\server\default\deploy\mysql-ds.xml and edi the user-name and password
Starting/Stopping LAMS as service
Edit the file C:\lams2\jboss-5.1\bin\service.bat and set the JAVA_HOME appropriately again according to your setup:
Once you have set the JAVA_HOME, save the file and then open an command line prompt as Administrator and go to the c:\lams2\jboss-5.1\bin folder and enter type service.bat install to install LAMS as a Windows service. See pic:
Done! LAMS is now install as a service.
To test this, go to your service window and start LAMS:
By default, LAMS starts on http://localhost:8080/lams/, so point your browser there and you should be able to see the LAMS login page. The default user is sysadmin password sysadmin.
Changing Server URL, IP and port
By default, this installing instructions would start LAMS on http://localhost:8080/lams/. However, and most likely, you will need to run LAMS on another IP and port and change its domain name.
You can also have a look at this video tutorial on how you do these changes:
Bounding LAMS to an IP
By default, the application server LAMS uses (JBoss 5.1) bounds itself to the localhost IP address: 127.0.0.1 or localhost. In order to change this, you need to specify the IP you want JBoss to bound to.
To do this, here are the changes you need to do to c:\lams2\jboss-5.1\bin\service.bat (set the IP address to the one for your server):
In the same file, you will find two lines that contain the following text:
Change these lines to:
Save and restart your LAMS server. LAMS would now be bound to the specified IP address. Note that you will need to change the Server URL (see below in Changing domain name)
By default and in order to prevent LAMS to collide with another web server running, LAMS runs on port 8080. However, you might want to change this to port 80. Make sure that there's no other web server like IIS running on this port before you do this changes.
Change the file c:\lams2\jboss-5.1\server\default\deploy\jbossweb.sar\server.xml to read port="80" instead of port="8080":
Note that you will need to change the Server URL (see below in Changing domain name).
Changing domain name
If you have change the IP and/or port, you will also need to tell LAMS about the changes you have done by setting the new Server URL. To do this, you will need to login into LAMS as the sysadmin user, goto the sysadmin menu, then click on "Edit configuration settings" and change the server URL to your domain like
Make sure you don't forget to include the last / after lams.