Unix Installer Help

LAMS 2.3 Deb Package
On Debian/Ubuntu systems, you can get LAMS 2.3 up and running by downloading and running the package found here.
This is the quickest way to get LAMS running on your system.

Unix Installation and Updating Help

In this page you'll find all the necessary software you need to install and update LAMS 2.0.x versions using the unix installer. If you need to restore the backup created by the updater, see Revert to Other Backup.

If you want to build LAMS from source, you can follow the instructions in Building LAMS.

Before You Run the Installer/Updater...

Make sure you have the software LAMS needs! If you are unsure of what software is needed to run LAMS, go to the Development Environmentpage.

Installing all Pre-required Software

MySQL Database Server

See the Installing MySQL page. You can install MySQL on another server to the one running LAMS - the Unix/Linux installer will install LAMS on one server with MySQL running on another server.

Java SE Development Kit (JDK)

LAMS requires the Sun JDK 5 or 6. See the Installing Java page for more details.

Wildfire Jabber Server

For our Chat tool, we use the Wildfire Jabber Server. See the Installing Wildfire page.

JBOSS

Version: 4.0.2
Suggested Location /usr/local/jboss-4.0.2
Source www.jboss.org    http://www.jboss.org/jbossas/downloads.html
Comments 4.0.3SP1 and 4.0.4 have problems running LAMS, so 4.0.2 is your best bet until we fix the problem.

After installing JBOSS, check that the script bin/run.sh is executable. If it is not then it must be made executable.

To check, go to /usr/local/jboss-4.0.2/bin and do "ls -l run.sh". The result should be something like - the "x"s are the important bit:

-rwxr-xr---  1 root  agroup  4681 Sep  9 19:30 run.sh

If it is just:

-rw-r--r--   1 root  agroup  4681 Sep  9 19:30 run.sh

then you need to do "chmod ug+x *.sh" to change it.

Installing all Pre-required Software in Ubuntu

We tent to use Ubuntu server and these are the quick steps we take to set up LAMS:

Ubuntu Feisty (7.04)

This will install Sun Java JDK 1.5, Ant and MySQL 5.0 Server

Packages required for LAMS2
apt-get install ant sun-java5-jdk  mysql-server-5.0

Now, let's get JBoss Appserver

Get JBoss
cd /usr/local 
wget http://superb-west.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.2.tar.gz tar xvzf  jboss-4.0.2.tar.gz

Wildfire Jabber server:

Get JBoss
cd /usr/local 
wget http://www.igniterealtime.org/builds/wildfire/wildfire_2_6_2.tar.gz tar xvzf wildfire_2_6_2.tar.gz

See instructions on how to install WildFire

Downloading LAMS for Unix

Check that you have the latest LAMS 2 Unix installer

See the downloads page.

If you are updating LAMS

Make sure you have the previous version of LAMS installed. You can find out what version you can update to on the downloads page

You are strongly recommended  to backup your LAMS installation before updating to prevent losing any of the data you may have saved while using your current LAMS installation. The updater will prompt you to ask whether you want an automatic backup, otherwise you can backup manually by following the steps.

If your MySQL database is on a different server then you must backup yourself manually as the updater cannot do it for you!

  1. Backup the JBoss directory that contains your current LAMS installation
  2. Backup you repository directories. These are the directories specified by the $LAMS_DIR variable in lams.properties
  3. Backup /etc/lams2 if it exists
  4. Dump the LAMS database by using the following MySql command, filling in the fields inside the brackets.
> mysqldump \-u(database username) \-p(password) (lams database name) > (backup dir)/lams.dump

Running the installer/updater

Once you have your installer, extract it into any desired location eg: /tmp/installer;

Editing the lams.properties File

The lams.properties file outlines where and how you will install LAMS, It also configures some of the settings you want for the install.

If you have an existing lams.properties file from a previous LAMS installation in /etc/lams2, then you do not need to change the lams.properties file - the installer will pick up the file in /etc/lams2 and use it automatically.

Most of the default configurations in lams.properties can be left, but you will need to change some to suit the setup of your personal machine. The lams.properties file comes with directions on what you need to alter and what needs to be left unchanged. Pay particular attention to "Essential Settings" section because LAMS will not install or run properly if these are incorrect. Below is the skeleton for the lams.properties file.

# Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
# License Information: http://lamsfoundation.org/licensing/lams/2.0/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.0
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
#
# http://www.gnu.org/licenses/gpl.txt
#
 
#########################################################################################
# Installation Options #
#########################################################################################
 
# The lamshome directory, will contain repository, temp and dump files
# Make sure this location has suffiecient disk space as several files will be stored
# here during run time
LAMS_DIR=/var/opt/lams
 
# Username and password for the system admin for LAMS
LAMS_USER=sysadmin
LAMS_PASS=sysadmin
 
# Default language locale and text direction for LAMS, see section 3 of the readme
LOCALE=en_AU
LOCALE_DIRECTION=LTR
 
 
# Database name, username and password for your LAMS database
DB_NAME=lams
DB_USER=lams
DB_PASS=lamsdemo
 
 
# Wildfire configuration, used for chat tools. see the documentation under
# "Configuring the Chat Server" at:
# http://wiki.lamsfoundation.org/display/lams/Building+LAMS
WILDFIRE_DOMAIN=localhost
WILDFIRE_CONFERENCE=conference.localhost
WILDFIRE_USER=admin
WILDFIRE_PASS=
 
#########################################################################################
 
 
 
 
#########################################################################################
# Essential Settings #
# These setting must be correct in order for the install to complete successfully #
#########################################################################################
 
# The port through which you want jboss to run
LAMS_PORT=8080
 
# The url you intend to use to run LAMS
# NOTE: Make sure the URL ends with a "/" or you will have problems running LAMS
SERVER_URL=http://localhost:8080/lams/
 
# Where your home directory of JBoss is
# This will contain your LAMS installation
JBOSS_DIR=/usr/local/jboss-4.0.2
 
# The directory that contains your JDK. (Must be 1.5 or higher)
JDK_DIR=/usr/bin/java/jdk1.6.0_01/
 
# The location of your mysql executable (Must be 5.0 or higher)
# If you are running mysql on another server, this would be blank.
SQL_DIR=/usr/bin/
 
# The URL that you jdbc driver will be running through
SQL_URL=jdbc:mysql://localhost/${DB_NAME}?characterEncoding=utf8
 
# The root password to access the database
DB_ROOT_PASSWORD=
 
#########################################################################################
 
 
 
#########################################################################################
# Installation Settings #
# DO NOT CHANGE unless you require more disk space for repository, temp or dump dir #
#########################################################################################
 
# Locations of the repository, temporary, and dump directories
# Used as storage locations for LAMS files
REPOSITORY_DIR=${LAMS_DIR}/repository
TEMP_DIR=${LAMS_DIR}/temp
DUMP_DIR=${LAMS_DIR}/dump
 
# Execution directiories must be within the jboss-4.0.2 directory structure
BINDIR=${JBOSS_DIR}/bin
TOMCATDIR=${DEPLOY_DIR}/jbossweb-tomcat55.sar
DEPLOY_DIR=${JBOSS_DIR}/server/default/deploy
SERVER_DIR=${JBOSS_DIR}/server
DEFAULT_DIR=${JBOSS_DIR}/server/default
EAR_DIR=${DEPLOY_DIR}/lams.ear
 
# Location of installation files within the package
LAMS_BUILD=${basedir}/lams_build
CONF_DIR=${basedir}/conf/unix
JBOSS_CONF=${CONF_DIR}/jboss
AUTH_CONF=${CONF_DIR}/authentication
 
# Drivers for MySql during installation
SQL_DRIVER=com.mysql.jdbc.Driver
SQL_JAR=mysql-connector-java-3.1.12-bin.jar
 
########################################################################################

Setting up the Language Locale

You will see about a quarter of the way through the lams.properties file there is a line that says: 

LOCALE=en_AU
LOCALE_DIRECTION=LTR

In LAMS you can set the defualt language of your server to be one of many languages, and more to come, see the internationalization page. Look out for unix language packs to add to your list of language locales.

The locale options for LAMS-2.0 available are listed below, simply put in your lams.properties file (under Installation Options):

LOCALE - (locale)
LOCALE_DIRECTION - (locale direction)

Language       
Locale   
Locale-Direction
English    (Australia)                  
en_AU LTR
Español    (Spanish) es_ES LTR
Deutsch    (German) de_DE LTR
???? (Chinese Simplified) zh_CN
LTR
Français (French) fr_FR LTR
Italiano (Italian)
it_IT LTR
Norsk (Norwegian) no_NO LTR
Svenska    (Swedish) sv_SE LTR
??? (Korean) ko_KR LTR
Polski (Polish) pl_PL LTR
Português (Portuguese Brazil) pt_BR LTR
Ti?ng Vi?t (Vietnamese) vi_VN LTR
Chinese (Taiwan) zh_TW LTR
Arabic (????) (Jordan) ar_JO RTL
???????? (Greek) el_GR LTR

Running the Installer

Before you run the script, you need to ensure that your $JAVA_HOME is set to your java 1.5 or higher directory, also you will need to set the $PATH variable
to include the path to the java binaries. The steps to do this are listed below.

# JAVA_HOME="(path to java installation directory)"
# export JAVA_HOME
# PATH="(path to java bin directory):$PATH"
# export PATH

If you are running MySQL on a separate server, then you will need to set up the database before doing the installation. See "Setting up MySql on a Different Server" in the readme file for the details on creating the database and setting up the appropriate privileges.

If you are running MySQL on the same server as LAMS, you do not need to do any further database configuration - the installer will do it for you.

Once you have finished editing lams.properties file you are ready to run the
install script. Go to the root directory of the package and type:

> sudo ./install-lams.sh

The installer will ask you if you wish to set up lams as a service, this will make lams start automatically each time you boot your machine. The installer will attempt to detect the wrapper jar that is suitable for you, if it cannot you can choose the wrapper that is the closest to suiting your architecture

You can find out your architecture types by typing

> uname \-a    to get all the information
> uname \-m    to get the architecture type

wrapper-linux-ppc-64-3.2.3    Linux    PPC
wrapper-linux-x86-32-3.2.3    Linux    i386    
wrapper-linux-x86-64-3.2.3    Linux     IA64

More information about setting the wrapper up in unix can be found here.

Running the Updater

Before you run the script, you need to ensure that your $JAVA_HOME is set to your java 1.5 or higher directory, also you will need to set the $PATH variable
to include the path to the java binaries. The steps to do this are listed below.

> JAVA_HOME="(path to java installation directory)"
> export JAVA_HOME
> PATH="(path to java bin directory):$PATH"
> export PATH

Check that you still have your lams.properties file in \etc\lams2. If you do, you do not need to modify the lams.properties file in the installation directory. If the lams.properties file is not in \etc\lams2, then you will need to edit the lams.properties file that comes with the upgrader.

Go to the root directory of the package and type:

> sudo ./update-lams.sh

The installer will ask you whether you want to stop LAMS before updating. Unless you have already done so yourself, it is HIGHLY RECOMMENDED that you let the updater run the shutdown script for LAMS, otherwise the update will not run correctly. Also it is recommended that you backup LAMS before the upgrade, the upgrade script gives you this option, or you are also free to do so yourself.

If you are having trouble shutdown LAMS sometimes (and it has happened on some servers) then see the readme file for instructions on stopping LAMS manually.

Note: You should leave MySQL and Wildfire running.

Running Lams

If you chose to installed LAMS 2.0 without the wrapper, you should be able to run LAMS 2.0.2 by simply going into the <jboss-4.0.2 dir>/bin and typing:

>sudo ./run-lams.sh

This is a new script added by LAMS 2.0.2. It was not in LAMS 2.0.

After a couple of minutes LAMS 2.0 will have started. In your browser type the server URL that you specified in the lams.configuration file, and you should be at the lams homepage.

To shutdown LAMS 2.0 go to (jboss directory)/bin and type:

> sudo ./shutdown.sh \-S

LAMS 2.x will take a few moments to shut down. To check if LAMS 2.0 has shut down correctly, type the following on Linux:

> ps \-ef \| grep java

Or type the following on Macintosh

> ps \-A \| grep Java

Using the Java Wrapper

If you chose to install the Java Service Wrapper, LAMS will start automatically when you boot your machine and stop when you turn off your machine.

You can also start and stop LAMS manually by going to the jboss-4.0.2/bin directory and using these commands.

> sudo ./lams2 start&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; (starts LAMS)
> sudo ./lams2 console&nbsp;&nbsp; (start LAMS in current shell, to stop do ctrl+C)
> sudo ./lams2 stop &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (stops LAMS)
> sudo ./lams2 restart&nbsp;&nbsp; &nbsp;(restarts LAMS)
> sudo ./lams2 status&nbsp;&nbsp; &nbsp; (tells you if LAMS is currently running)
> sudo ./lams2 dump &nbsp;&nbsp; &nbsp;(send a kill \-3 signal to the wrapper causing the JVM to do a full thread dump)

For more information about using the Jave Service Wrapper with LAMS, go to the web tutorial

Help With Solaris Installation      

For further help on general installations and specifically for Solaris installations, visit Daniel Schneider's wiki on LAMS installations.  It contains lots of helpful tips and ideas for installations for linux, Windows and Solaris. We thank Daniel Schneider for his help and tips on this subject.

Help with Ubuntu Installation

by Eric Evans Elek Tech Solutions:

Help with CentOS 5.2

All other Unix flavours

During the testing phase we installed LAMS in a large variety of scenarios. If you need help you might find a solution in there.


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.