Skip to end of metadata
Go to start of metadata

Installing LAMS v 2.4 on CentOS

These are manual instructions to install LAMS v2.4 into Unix. For this particular example we have chosen CentOS 5.8

Confirm CentOS version

Install Java JDK 1.6

You have two options for Java JDK 1.6:

  • OpenJDK or
  • Oracle Java JDK

Note that you need the JDK (not just the JRE) and the version must be 1.6.

With RedHat Enterprise Linux, we recommend you use the Oracle Java JDK instead as some sysadmins have reported problems with OpenJDK.

Option: OpenJDK 1.6

You can use CentOS repositories to get this one and it's quite straight forwar

Option: Oracle Java JDK 1.6

Go to Oracle Java Download and download the RPM for Oracle's Java JDK 1.6. You will need to agree to their terms and conditions, so most likely you would want to use a browser and the copy the file over to your server.

Remember that you need the JDK and not just the JRE.

Once you downloaded the file, proceed to the installation as follows:

Check that everything is installed properly:

Installing MySQL Server

Start MySQL Server

Create a LAMS user within MySQL

Download LAMS v2.4 for Linux/Unix

Prepare LAMS 2.4 installation

Copy JBoss and LAMS Binaries to app directory

Within the lams installer, copy the jboss-5.1 folder to /usr/local

Create a nonlogin user for LAMS

and set permissions

Import LAMS Db into MySQL

Customizing LAMS settings

The default settings for LAMS are:

LAMS ear folder


Repository directory


Temp directory


Server URL


If you want to change any of these settings, you can copy paste the text below, do the modifications necessary, save it as a file and then import it into mysql.

Example: /tmp/config-lams.sql

Then you can run this into the db as we did before:

Set permissions to repository and tmp folders

Start LAMS

If you seen something like this, you now have LAMS running.

Login as sysadmin (u: sysadmin p: sysadmin) and you are ready to go.

Start on boot

If you need LAMS to start on boot (as service) then get start-stop-daemon to help you with this.

Now create a file called lams2 in /etc/init.d folder (as root) and modify the script below according to your setup (specifically the IP):

Now, make this file executable:

Set this and mysql up for startup on boot:

And you are done!

For further details, please check out the Sysadmin Guide

Need help?

Check out the technical forums in the LAMS Community