LAMS installation and configuration

The educational technology and digital learning wiki
Jump to navigation Jump to search

This article or section is currently under construction

In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")

Definition

This page contains installation tips for LAMS

LAMS is a JAVA/JBoss-based application and needs some installation skills on Windows and good installation skills for Unix.

LAMS 2RC2 Windows XP PC

Do not try to install LAMS if you lack basic installation experience and technical reading skills. Here are just a few remarks in addition to the LAMS installation instructions. I also strongly suggest to look at the Problems Installing LAMS Forum.

Other Software

To run it on windows you need to install other software.

  • Java JSE 5.0 (update 9), not just the JRE. Get it from Sun.
  • MySQL: Get it directly from MySQL and take the Installer version (not the zip installation).
    • Install it and remember the password
    • I suggest not installing/using a WAMP environment for LAMS 2RC 2. The LAMS installer 2Rc2 could not find MySQL in my WampServer environment even if it was told where to look for in the LAMS installer.
    • Hack would be to manually edit the registry with this information from MySQL AB and this posting and picture by Ernie Ghiglione. Basically one needs to reproduce the MySQL entry from the official MySQL AB installer:
HKEY_LOCAL_MACHINE
  SOFTWARE
    MySQL AB
      MySQL Server 5.0  
                         Location c:\wamp\mysql
                         Version  5.0.27

... but this still didn't work for me. Something I did not try was to add mysqladmin.exe to the bin directory which is missing (see: Jun-Dir Liew's question and try it ... I don't have the time to do it right now. E.g. this file may be part of the simple zip / no registry version from the MySQL site).

MySQL

  • If you use a WAMP package you must know where MySQL sits. E.g. c:\wamp\mysql if you work with "WampServer" (but see above that I failed, rather work with an "official MySQL installer from MySQL AB). If you use the official MySQL installer, there will be no problem.

LAMS

  • Has an installer and if you got the above right it will install without problems. You may have a firewall. In this case make sure to open the necessary ports. Also pay attention to popup blockers in your navigator. LAMS worked fine with both IE 6 and Firefox 1.5x.

Lams 2.0.x on On Solaris

Lams 2.0 was released on december 6 2006. Since then there very several minor upgrades. On March 2008, the current releases are 2.0.4 (stable) and 2.1 (RC1).

First, read the instructions in:

Java software

Java + ant
  • Solaris 10 ought to have the right java + ant installed.

Check if java can be found, i.e. type:

java -version

... you should have java 1.5.x or better. If you don't, check the system for another java or install a new one. If you do so, make sure to specify the right path according to instructions from the LAMS install page.

Wildfire

This is a XMPP (Jabber) chat server, that actually is called Openfire now. See:

You don't really need open/wildfire (but then either your students can't chat or else you have to find an available server).

  • If you install one, make sure to get an old 2.6.2. version. Links are available from the LAMS page, you won't find it at Ignite realtime
  • Since this server is written in Java you can take the Mac OSX and others version (i.e. a tar ball).

Steps: 1) Uncompress in /usr/local/wildfire

2) Start it with ./bin/wildfire start

  • This is a typical starup script. You later can copy this script to /etc/init.d/ etc.

3) Configure through the web interface (if you are lucky you will have a web browser on your server and an X11 connection).

http://localhost:9090/ 
  • Use "embedded database" if you want to make it shorter, else you have to set up mysql

Fill in a few forms, just make sure that you use the right server names. You then can log as administrator and you will have access to an administration console.

  • Tick "Don't Show History" (Group Chat -> History Settings)

4) Test it, e.g.

Configure MySQL

1) Make sure to have a MySQL 5.x server.

2) Configure it according to the instructions

Edit file my.cnf according to the instructions

  • This cnf file may be in different locations
  • Type mysql --help for a list of the places MySql will look for this config file
  • The file may not exist, in this case create it. Start by copying a *.cfn model from /usr/local/mysql/share/mysql or some other place. I took my-medium.cnf.

In particular, my.cnf should include this (no idea what it means and why):

[mysqld]
....
transaction-isolation=READ-COMMITTED 
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 

Then restart mysql !

3) Create a lams database.

If you upgrade, you may want to make a dump for safeguarding or alternatively kill all tables if you want a fresh start. I personally enjoy destroying whole databases.

Then create:

  • a database named "lams"
  • a user "lams"
  • Make to sure to have it run in UTF-8 mode !

Best way to to this is to use a terminal client and type something this:

mysql -u root -p

Then enter the following lines (alternatively read them from a file)

SET FOREIGN_KEY_CHECKS=0; 
DROP DATABASE IF EXISTS lams; 
CREATE DATABASE lams DEFAULT CHARACTER SET utf8; 
SET FOREIGN_KEY_CHECKS=1; 
GRANT ALL PRIVILEGES ON *.* TO lams@localhost IDENTIFIED BY 'secretpassword'; 
REVOKE PROCESS,SUPER ON *.* from lams@localhost;
quit
JBOSS

JBOSS is a Java application server.

  • Unpackage into /usr/local
gtar xzf jboss-4.0.2.tar.gz -C /usr/local 
  • Copy some jar files
cp /usr/local/jboss-4.0.2/server/all/lib/jboss-cache.jar /usr/local/jboss-4.0.2/server/default/lib/
cp /usr/local/jboss-4.0.2/server/all/lib/jgroups.jar /usr/local/jboss-4.0.2/server/default/lib/

LAMS source file download

Get the archive from the downloads page.

Direct links: this may change !

Note: If you want to play with a release candiate, it's an option to get a more recent version from the CVS software archive. Some bug already may have been fixed. On the other hand, you may encounter a new one. You can browse the lams cvs repository. To get the code from CVS, consult building lams) and then build from source.

Preinstall configuration

(tested with LAMS 2.1 RC1)

1) Firstly, decide where the files go. Either use a typical unix installation with files all over the place or put all LAMS related in some directory, e.g. /usr/local/lams. I prefer the second solution, since this way you can get rid of unwanted software easily...

2) Dezip the installer some place:

gtar -xvf lams-unix-installer-2.1-RC1.tar.gz

3) Then edit the lams.properties file according to unix installer help. This file sits in the install directory.

Make a backup first

cp lams.properties lams.properties.ORI

Then I did this (as I said I prefer all files in one place for experimental systems). Make sure that you correctly enter db and user names, locations and so forth !

LAMS_DIR=/usr/local/lams/lams
DB_NAME=lams
DB_USER=lams
DB_PASS=secret

I ignored wildfire.

Using the installer


Legacy notes for solaris

When I installed LAMS for the first time, the install had to be done manually. At some point I'll try again a manual install. For now, understand please that some things may have changed.

LAMS pre-build configuration

I configured the following entries in the following files. Most entries are related to file paths.

In lams_build directory:

File: lams/lams_build/shared.properties
  (nothing to change)
 
File: lams/lams_build/common.properties
  osPropertiesName=unix
  db.password=XXXX
File: lams/lams_build/unix.properties
  contentrepository.directory=/usr/local/lams/repository

Change this in three locations !!

File: lams_build/conf/unix/jboss/service/mysql-ds.xml
   <password>XXXX</password>

In lams_common directory:

File: lams/lams_common/db/sql/insert_unix_config_data.sql
  ('ServerURL','http://tecfasun1.unige.ch:8080/lams/');
  ('TempDir','/usr/local/lams/temp');
  ('DumpDir','/usr/local/lams/dump');
  ('SMTPServer','mail.tecfa.unige.ch');
  ('LamsSupportEmail','webmaster@tecfa.unige.ch');
  ('ContentRepositoryPath','/usr/local/lams/repository');   

... Don't miss the port number for the server URL (e.g. 8080) !

In the same directory you may change the admin login and password (not tested !)

File: lams/lams_common/db/sql/insert_users.sql  

Note: I did not find an LamsHome property in any file (this conflicts with the installation instructions).

What if you have another server running on port 8080 ?

You can run JBOSS on a different port, but need to edit a few files. Read this:

Make directories for lams (they must match the above of course)

mkdir /usr/local/lams
mkdir /usr/local/lams/temp
mkdir /usr/local/lams/dump
mkdir /usr/local/lams/repository

I don't know who runs JBoss, so I just deprotected

chmod -R 777 /usr/local/lams

Build

Type the following commands in this order. (You don't need Ecplise to build LAMS). But stop the JBOSS server when you do this.

cd /src/lams/lams_build
ant rebuild-db
ant assemble-ear
ant deploy-ear
ant deploy-tools
ant copyfiles

Run it

cd /usr/local/jboss-4.0.2/bin/
./run.sh &

The adminstrator login is sysadmin (don't forget this)

The sysadmin login password is in the SQL file below. You may change it before you build, I was quite frustrated not to able to log in ;)

/src/lams/lams_common/db/sql/insert_users.sql

Server configuration

See Configuring your LAMS Server.

  • Java may not have enough heap space (it runs out of memory). Replace the 256 with something bigger. I think that the run.sh has to be fixed. Otherwise it may be the Tomcat config somewhere.
File: /usr/local/jboss-4.0.2/bin/run.sh

Around line 150 insert:

JAVA_OPTS="$JAVA_OPTS -Xms500m -Xmx500m -Dprogram.name=$PROGNAME"
# Display our environment

Things I did wrong

Now for some human touch ....

  • Forget to specify the OS
  • Forgot to add the port number of the server URL
  • Forgot to create the lams directory
  • Only changed password in one location in lams_build/conf/unix/jboss/service/mysql-ds.xml

Debuging

Look at files in:

/usr/local/jboss-4.0.2/server/default/log/

Then stop JBoss,

cd /usr/local/jboss-4.0.2/bin/shutdown -S &

Repair misconfigurations above, rebuild with ant and run it again :) I don't know if global cleaning up is an efficient idea, but I do it anyhow as a last resort when I get stuck, e.g.:

  1. Execute ant clean
  2. Drop the lams database (and don't forget to create it again)
  3. Empty the JBoss server/default/deploy/lams.ear/ directory ?


To Do list

(I will report on this later, for the moment I got other things to do - DSchneider 20:10, 6 December 2006 (MET))

  • Install the chat server
  • Test and tweak
  • Integrate with Moodle

Moodle - LAMS integration

The LAMS v2.0 Integration Setup Step-by-Step Guide is fairly well done :)

Short installation summary (see the above guide)

This article or section is currently under construction

In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")

I didn't manage to get this going yet. Moodle somehow complains about not being able to make a second instance of LAMS... Probably this has to do with the fact that I run LAMS on an other server and that I need some bridge from JBOSS to an Apache server on port 80 which I need to install :(

On the Moodle side

First of all make sure that you do no skip step 4 below (you need the LAMS v2 module and not LAMS !)

1. Unzip the file 2. Move the lamstwo directory to moodle/mod/ 3. Move the lamstwo.php file to moodle/lang/en_utf8/ 4. Login as admin and go to http://yourmoodle/admin, LAMS tables will be created automatically. 5. Go to modules and click settings for LAMS2 module and put the proper values in, I used:

server_url:     http://tecfasun1.unige.ch:8080/lams
server_id:      moodle
server_key:     .....
request_source: Moodle
On the LAMS side
  1. Made a "moodle" Group and added a test lesson
  2. The integrated server setup is:
Id:           moodle
Key: .        ....
Description:  TECFA Moodle
Prefix:       mdl
Organisation: moodle
User Information: URL: http://tecfax.unige.ch/moodle/mod/lamstwo/userinfo.php?ts=%timestamp%&un=%username%&hs=%hash%
Timeout URL:      http://tecfax.unige.ch/lams/timeout.html
Notes
  • Make sure that you do not mix up case: E.g. if your group is called "moodle" in LAMS use "moodle" and not "Moodle" (I got stuck with this)
  • Your JBOSS server may need yet more memory space allocated (see above)

Documentation

General
LAMS 1 (you rather should use LAMS 2)
LAMS 2