Talk:LAMS installation and configuration: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
 
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The discussion page contains outdated stuff that I deleted from the page.
No discussion so far :)
''''Legacy stuff is below. this is only of interest to LAMS historians ....''''
== LAMS 2.4 on Debian/Ubuntu ==
Use the official installer. It's very easy.
add-apt-repository "deb http://downloads.lamsinternational.com/debian web/"
apt-get update
apt-get install lams2 --force-yes --assume-yes
; Start up/stop script
/etc/init.d/lams2 start
/etc/init.d/lams2 stop
; Files
* JBoss is located in /usr/share/jboss-5.1
** /usr/share/jboss-5.1/server/default/deploy/lams.ear/
* Log files: /var/log/jboss/
* Main log file: /var/log/jboss/lams.log
* LAMS home (data files): /usr/share/lams2
** '''However''', data files for stuff uploaded with the fckeditor are (unfortunately) in /usr/share/jboss-5.1/server/default/deploy/lams.ear/lams-www.war/secure
; Patches
* You also should add the official patches (see below)
== LAMS 2.3 on Debian/Ubuntu ==
I tested this with Ubuntu 10.04 LTS - the Lucid Lynx (i.e. on my personal desktop machine)
Become root or prefix each command with "sudo"
; Install Java if not already done so
add-apt-repository "deb http://archive.canonical.com/ lucid partner"
apt-get update
apt-get install sun-java6-jdk
Notes:
* You may have to install add-apt-repository first
apt-get install python-software-properties
* The java JDK installer will ask two questions (OK and accept license). Use the TAB key to navigation between response items and then hit ENTER.
* (Short) testing if Java is ok, type:
java -version
: You should see something like:
: java version "1.6.0_26"
: ava(TM) SE Runtime Environment (build 1.6.0_26-b03)
; Install LAMS + JBoss
add-apt-repository "deb http://downloads.lamsinternational.com/debian web/"
apt-get update
apt-get install lams2 --force-yes --assume-yes
During the installation process, you may be asked a few questions, ie:
* password for MySQL server,
* LAMS admin name (default = sysadmin) plus password for the LAMS server
* the Java/LAMS server port (default is 8080).
The installer will start up LAMS. Check for the following line at the end of the log file after a few minutes:
tail /usr/share/jboss-4.0.2/server/default/log/server.log
2011-08-29 14:06:45,522 INFO  [org.jboss.system.server.Server] JBoss (MX MicroKernel)
[4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:27s:654ms
; Start up/stop script
/etc/init.d/lams2 start
/etc/init.d/lams2 stop
; Files
* JBoss is located in /usr/share/jboss-4.0.2
** /usr/share/jboss-4.0.2/server/default/deploy/lams.ear/
* Log files: /var/log/jboss/
* Main log file: /var/log/jboss/lams.log
* LAMS home: /usr/share/lams2
== LAMS extensions on Debian/Ubuntu ==
I tested this with Ubuntu 10.04 LTS - the Lucid Lynx
=== Big blue button ===
The documentation below is outdated. As of May 2015, BigBlueButton is much easier to install under Ubuntu (and maybe other systems too)
------ outdated ------
The software and its dependencies is rather large. The BigBlueButton is comprised of many open source components, e.g. a [http://wiki.nginx.org/ Nginx] webserver, a Tomcat servlet container, red5. The only easy way to run this, is using a separate machine (or a virtual machine). If you want this next to an Apache Web server, you will have to manually edit configuration files.
See:
* http://wiki.lamsfoundation.org/display/lamsdocs/labbb10
* http://code.google.com/p/bigbluebutton/wiki/InstallationUbuntu
* Then read [http://ubuntuguide.org/wiki/BigBlueButton BigBlueButton] at UbuntuGuide.org
Become root or add "sudo" in front of each
(1) Make sure that you have multiverse
more /etc/apt/sources.list | grep multiverse
Else, else add it, e.g. I use the Swiss server, replace by your own
add-apt-repository "deb http://ch.archive.ubuntu.com/ubuntu/ lucid multiverse"
(2) Add the BigBluebutton archive
add-apt-repository "deb http://ubuntu.bigbluebutton.org/lucid/ bigbluebutton-lucid main"
(3) Install a Voice Conference Server, FreeSWITCH is recommended
Maybe needed:
sudo apt-get install python-software-properties
Needed (I ignored security warnings)
add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers
apt-get update
apt-get install bbb-freeswitch-config
(4) Install BigBlueButton
apt-get install bigbluebutton
* Use TAB for navigation in the dialogs
* The installation also might install a mysql server if you don't have own, else it will ask for the root password.
(5) Run it
* For testing purposes, you will have to shut down your normal web server.
bbb-conf --clean
You should see:
<pre>
bbb-conf --clean
Doing a clean restart of BigBlueButton ...
* Stopping Red5 Server red5  [ OK ]
* Stopping Tomcat servlet engine tomcat6  [ OK ]
Stopping nginx: nginx.
* Stopping Apache ActiveMQ service activemq  [ OK ]
Stopping OpenOffice headless server.
Cleaning Log Files ...
* Apache ActiveMQ service is not running.
* could not access PID file for nginx
* Red5 Server is not running.
* Tomcat servlet engine is not running.
Starting FreeSWITCH
2948 Backgrounding.
* Starting Apache ActiveMQ service activemq  [ OK ]
Waiting for ActiveMQ to start:
Waiting for FreeSWITCH to start: ....................
Starting OpenOffice headless server
Starting nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful
nginx.
* Starting Red5 Server red5  [ OK ]
* Starting Tomcat servlet engine tomcat6  [OK]
Waiting for BigBlueButton to finish starting up (this may take a minute):  done
** Potential problems described below **
</pre>
Then type:
bbb-conf --check
(6) Configure
Setting another port requires two operations:
(6a) Change BigBlueButton port
bbb-conf --setip YOUR_IP_OR_DOMAIN_NAME:81
(6b) Change the Nginx webserver port too (or nothing will work)
* Verify/edit both /etc/nginx/sites-available/default '''and'''/etc/nginx/sites-available/bigbluebutton
/etc/init.d/nginx restart
(7) Stop / start
bbb-conf --stop
bbb-conf --start
Will clean, then restart. However, I did not check yet if all servers are always stopped and configurations redone, etc.
bbb-conf --clean
(8) LAMS Integration (not yet tested !)
For LAMS, you may have to know the salt (some key used for security)
bbb-conf --salt
=== Red5 ===
Currently (March 2012, Ubuntu Lucid), it will not install, since Java 1.6 was removed from the distribution. However, BigBlueButton includes a red5 server (see above)
== Small LAMS patches ==
Before patches are integrated into a new release, you could retrieve them from [http://wiki.lamsfoundation.org/display/lams/Patches http://wiki.lamsfoundation.org/display/lams/Patches] and then apply them manually as explained in the same page.
For example, to patch LAMS 2.4 under Unix
<source lang="bash">
cd /tmp
mkdir lams
cd lams
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-2993_lams-tool-laasse10.war.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-3019_lams-tool-lawiki10.war.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-2867_lams-central.war.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-3008_IE10-fix.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-3401_lams-tool-laasse10.war.zip
/etc/init.d/lams2 stop
unzip LDEV-2867_lams-central.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-2993_lams-tool-laasse10.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-3008_IE10-fix.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-3019_lams-tool-lawiki10.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-3401_lams-tool-laasse10.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
rm -r  /usr/share/jboss-5.1/server/default/tmp
rm -r  /usr/share/jboss-5.1/server/default/work
/etc/init.d/lams2 start
</source>
== Migrating LAMS to another machine / OS ==
LAMS uses two places for keepting data:
* The MySQL database
* A repository directory outside of a web tree. E.g. on Solaris it was in:
: /usr/local/lams/lams
Finally, there is '''configuration file''' that will tell you where things are and what user/password combinations you used for admin and the database.
E.g. on Solaris it was in
: /etc/lams2/lams.properties
The procedure:
(1) '''Lams repository directory'''
Copy all the files. E.g. to migrate from Solaris to Linux, I
* created a tar ball on the solaris side
cd /usr/local/lams/lams
gtar zcf lams-dir.tgz dump repository temp
* unpacked on the Linux side
cd /usr/share/lams
sftp ...
tar zxf lams-dir.tgz
* make sure that the directories are writable by the UID that runs LAMS, e.g. you may have to
chown -R lams:lams *
''scp'' would be easier but more complicated to learn and if I remember well there can be some problems with links.
(2) '''Database'''
* Find it on the source machine (in all likelyhood you called it 'lams')
mysqlshow -p
* Dump it
mysqldump lams -p > lams.sql
gzip lams.sql
* Move it to the target machine (linux in our case) and find the name of the lams db
mysqlshow -p
gunzip lams.sql.gz
mysql -p lams < lams.sql
(3) '''IMPORTANT:''' fix the config section in the LAMS server administration
* http://yours.x.y:8080/lams/admin/config.do
You must get this right or you are half dead !
* Now it's probably a good idea to restart the server
'''(4) Test'''
* See if the old stuff is there, in particular try to open a sequence from the db, monitor an old class, etc.
... the above worked with me :)
'''(5) Fix the Moodle Interface'''
* Read the section on LAMS-Moodle integration below
== LAMS on Solaris ==
.... more difficult :)
=== LAMS 2.2 on Solaris ===
Lams 2.0 was released on December 6 2006. Since then, there were very several "minor" upgrades and some of them include substantial changes. On March  2009, the current release is 2.2 and compared to 2.1. there are a whole lot of new features.
These installation notes refer mostly to the 2.2 install. Official LAMS instructions are a bit Linux centric and this is main reason why you might have a look at this. My notes also should work with older Solaris versions (just make sure to upgrade Java if needed and in this case to set the Java path) and other Unix systems.
First, read the instructions in:
* [http://wiki.lamsfoundation.org/display/lamsdocs/Unix+Installer+Help Unix Installation and Updating Help] (if you plan to use the Unix installer)
* [http://wiki.lamsfoundation.org/display/lams/Building+LAMS Building LAMS] (if you plan a source install, not recommended if you just want to use LAMS ...)
* [http://wiki.lamsfoundation.org/display/lams/Development+Environment Development Environment], a list of software needed for running and/or building LAMS.
'''Upgrading''' from previous versions: I always start from scratch. Since we only have our students create LAMS scenarios as exercises I had them save the zip file in their work portfolio and they could import it again (I hope). Anyhow: you might want to export all scenarios from your LAMS server as LAMS zip files (not LD) before you do a new install.
Disclaimer: I am not a good sysadmin nor is it my idea of fun. This is not a manual, but '''just''' my private installation notes I am willing to share. - [[User:Daniel K. Schneider|Daniel K. Schneider]] 14:02, 4 March 2009 (UTC)
I got this machine and OS:
SunOS tecfax.unige.ch 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Fire-V240
So, open a terminal under root ....
==== Download and checksum ====
Check the [http://wiki.lamsfoundation.org/display/lams/Downloads download page] at LAMS. Make sure to get the right version ! Also you may have to get a patch that you will have to apply after the main install (e.g. that was the case for LAMS 2.1.1. which you had to apply on top of 2.1)
I took the lams-unix-installer-2.2.tar.gz. This would be the wrong version if you have Ubuntu. I run Ubuntu as my desktop machine and indeed life is easier on Ubuntu ....
Then you may checksum the downloaded archive. In some very rare cases there exist transmission errors or someone managed to upload a bad archive to the download server. So type:
md5sum lams-unix-installer-2.2.tar.gz
And then compare the number that will show like this with the one on the download page:
2f29d60147bf1328d3a044a66ea8b083  lams-unix-installer-2.2.tar.gz
==== Prerequisite 0: Infrastructure ====
* Make sure your organization doesn't stifle your creativity with Firewalls. If they do, expect '''a lot''' of extra work.
* Also the 8080 port should be free. Some software like Skype just randomly take up ports. If you run an other server, read [http://wiki.lamsfoundation.org/display/lamsdocs/Changing+Server+Ports+for+LAMS  Changing Server Ports for LAMS]
* Hardware and OS: Any Windows, Linux, MacOS X, Solaris etc. machine will do since LAMS is programmed in JAVA. You just need some disk space, substantial memory and a not too old JAVA. Also, you may have to adapt some scripts to your special Unix brand.
==== Prerequisite 1: Java software ====
; Java + ant
Solaris 10 ought to have the right Java + Ant installed. Ant is an installation program like make. Note: You need the JDK/JSE or whatever Sun decided to rename it (i.e. the compiler, not just the runtime)
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.
I have ''Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)'', i.e. the default thing installed in this machine. It's easy to have another Java version, but I suggest from past experience to install it somewhere else, e.g. in /usr/local.
So just for the fun of it you can get another from SUN. No links, since Sun not only changes naming of Java edition but also their web sites at regular intervals. You just have to understand that JDK "6" == JDK "1.6" and that "SDK == JDK". Do not install anything that is called "JRE". Then, you can either take the small SE version or larger EE version. Both work with JBoss. It takes some time to find the right thing. Also you won't find installation instructions on the final download screen (you have to backtrack). Branding managers and website designers at Sun should reassigned to other tasks like designing the cafeteria at the head quarters. Do '''not''' go to http://java.com but try http://java.sun.com/
In case you download something like the ''jdk-6u11-solaris-sparc.sh'' version you have to know that it will just unpack the whole thing as a subdirectory.
cd /usr/local
mv /path_where_you_put_it/jdk-6u11-solaris-sparc.sh .
chmod a+x jdk-6u11-solaris-sparc.sh
./jdk-6u11-solaris-sparc.sh
ln -s jdk1.6.0_011 jdk6
rm jdk-6u11-solaris-sparc.sh
Now you have a Java6 in the symbolic link ''/usr/local/jdk6''. See if it works:
./jdk6/bin/java -version
Should show:
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
Let's try installing it with this one.
==== Prerequisite 2: Wildfire ====
This is a [http://en.wikipedia.org/wiki/Xmpp XMPP] (Jabber) chat server, that actually is called Openfire now.  See:
* [http://wiki.lamsfoundation.org/display/lamsdocs/Installing+Wildfire+for+LAMS Installing Wildfire for LAMS]
* Also read [http://www.igniterealtime.org/builds/wildfire/docs/latest/documentation/install-guide.html Installation guide] (at Igniterealtime).
You don't really need open/wildfire (but then your students can't chat). You also may try to use an existing server that works with LAMS. I guess that there ought to be free servers you can use.
* LAMS folks say to install an '''old''' 2.6.2. version. Links are available from the LAMS page, you won't find it at [http://www.igniterealtime.org/ Ignite realtime]. Note: I have to see whether this is still true, but for the moment I just complied.
* Since this server is written in Java you can take the [http://www.igniterealtime.org/builds/wildfire/wildfire_2_6_2.tar.gz Mac OSX and others] version (i.e. a tar ball). I ran it with java 5 (Solaris 10 default java engine).
Installation steps:
1) Uncompress in /usr/local/wildfire or some other place
gtar zxf wildfire_2_6_2.tar.gz
2) Start the server with ''./bin/wildfire start''. You should see:
testing JVM in /usr ...
Starting wildfire
* This is a typical startup script. You later can copy this script to /etc/init.d/ etc.
3) Configure this server through the web interface. If you are lucky you will have a web browser on your server and an X11 connection.
http://localhost:9090/
Else use an URL like:  http://yourhost.org:9090/
Anyhow, do the config as fast as possible since you have to set passwords and stuff.
* Use "embedded database" if you want to make the install shorter, else you can set it up with mysql
The configuration process will ask you to 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), but you can do this later
4) Test it. You may want to install a [http://en.wikipedia.org/wiki/List_of_Jabber_client_software jabber client], e.g. gajim (Ubuntu users can read an article on [https://wiki.ubuntu.com/Jabber Jabber]
5) Security:
You may restrict login to given set of IP addresses or even disable account creation. Chat servers may be taken over by not so friendly people.
* Edit Server -> Server Settings-> Registration and Login
Installing wildfire should be easy, it was for me. It's a fairly popular product...
Note on server parameters: They '''must''' match !
Wildfire:
: Server domain (e.g. test.example.com)
LAMS:
: Xmpp server domain (e.g. test.example.com)
: Xmpp conference (e.g. conference.test.example.com)
==== Prerequisite 3: Configure MySQL for LAMS ====
Here are the steps:
1) Make sure to have a MySQL '''5.x''' server. Else install it (and come back)
2) Configure it according to the LAMS [http://wiki.lamsfoundation.org/display/lamsdocs/Installing+MySQL+on+Windows+for+LAMS instructions], i.e. make changes to file my.cnf:
* This cnf file may not exist (it wasn't in our binary distribution). Also, it can be in different locations
* Type ''mysql --help'' to get a list of the places the MySQL server will look for this config file
* So, create my.cnf if you don't have one. Start by copying a *.cfn model from /usr/local/mysql/share/mysql or some other place. I took my-medium.cnf.
Changes to make: file my.cnf should include these lines (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 (optional)
This step is '''not needed''', the installation script will do it
However, there is a mistake in the script. It will grant global privileges to the lams user. Remove them either with these SQL commands or with some MySQL administration tool.
REVOKE ALL PRIVILEGES ON * . * FROM 'lams'@'localhost';
REVOKE GRANT OPTION ON * . * FROM 'lams'@'localhost';
Then add these just for the lams database
GRANT ALL PRIVILEGES ON `lams` . * TO 'lams'@'localhost' WITH GRANT OPTION ;
==== Prerequisite 4: JBOSS ====
JBOSS is a Java application server. LAMS is programmed with this application framework.
* I simply got the 4.0.2 binary from [http://labs.jboss.com/portal/jbossas/download Jboss.org]
* Unpack into /usr/local (or wherever else you like it)
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/
==== Pre-install ====
1) Unpack the archives some place, e.g. in /src/. Use gtar to unpack !
gtar zxf lams-unix-installer-2.2.tar.gz
So you should have something like:
<pre>
drwxr-xr-x  3 schneide tecfa          4 Mar  4 10:19 ./
drwxrwxr-x  36 schneide tecfa          48 Mar  4 11:43 ../
drwxr-xr-x  14 schneide tecfa          18 Dec  4 02:19 lams-unix-installer-2.2/
-rw-r--r--  1 schneide tecfa    54485042 Mar  4 10:19 lams-unix-installer-2.2.tar.gz
</pre>
2) If you use a non-standard JAVA make sure that installer script can find it. Remember this for later also ! If you use csh, type:
setenv PATH (path to java bin directory):$PATH
setenv JAVA_HOME (path to java installation directory)
For example:
setenv PATH /usr/local/jdk6/bin:$PATH
setenv JAVA_HOME /usr/local/jdk6
Or in a bash shell:
JAVA_HOME="(path to java installation directory)"
export JAVA_HOME
PATH="(path to java bin directory):$PATH"
export PATH
Then control:
which java
java -version
3) You should kill older lams data and config directories and/or make a backup, e.g.
mv /usr/local/lams/lams /usr/local/lams/lams.old
mv /etc/lams2 /etc/lams2.old
4) If you already got an old LAMS in JBoss, also get rid of it (not sure if this is really needed)
rm -r /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
5) If you use a non-standard Java (see above) you also should change the JAVA configuration in JBOSS. Edit file /usr/local/jboss-4.0.2/bin/run.conf and change:
JAVA_HOME=/usr/local/jdk6
JAVA="/usr/local/jdk6/bin/java
You also can add some extra memory for startup, but the LAMS startup script also will
do it for you (see below).
# JAVA_OPTS="-server -Xms512m -Xmx512m -XX:MaxPermSize=512m"
The just test it once, execute:
/usr/local/jboss-4.0.2/bin/run.sh &
You should see something like:
JBoss Bootstrap Environment
  JBOSS_HOME: /usr/local/jboss-4.0.2
  JAVA: /usr/local/jdk6/bin/java
  JAVA_OPTS: -server -Xms512m -Xmx512 -Dprogram.name=run.sh
  CLASSPATH: /usr/local/jboss-4.0.2/bin/run.jar:/usr/local/jdk6/lib/tools.jar
Check in a browser if its alive for real:
http://xxxx.yyy.zz:8080/
Then kill it, execute:
/usr/local/jboss-4.0.2/bin/shutdown.sh --shutdown
==== Edit the installer configuration file ====
Go to the lams-unix-installer directory, e.g. ''/src/lams/lams-unix-installer-2.2/''
cp lams.properties lams.properties.ORI
I did the following (roughly)
; Installation Options on top of the file
LAMS_DIR=/usr/local/lams/lams
LAMS_USER=admin
LAMS_PASS=secretX
DB_NAME=lams
DB_USER=lams
DB_PASS=secretY
; Wildfire installation
# If it sits on different machine you got to configure, else you can leave the defaults
# WILDFIRE_DOMAIN=tecfasun1.unige.ch
# WILDFIRE_CONFERENCE=conference.tecfasun1.unige.ch
WILDFIRE_DOMAIN=localhost
WILDFIRE_CONFERENCE=conference.localhost
WILDFIRE_USER=admin
WILDFIRE_PASS=secretZ
; Essential settings (Set the server_url with the '''right''' port, localhost won't do !)
LAMS_PORT=8080
# In case LAMS is on a different machine:
SERVER_URL=http://tecfax.unige.ch:8080/lams/
JBOSS_DIR=/usr/local/jboss-4.0.2
JDK_DIR=/usr/local/jdk6
SQL_DIR=/usr/local/mysql/bin
SQL_HOST=localhost
SQL_PORT=3306
SQL_URL=jdbc:mysql://${SQL_HOST}/${DB_NAME}?characterEncoding=utf8&autoReconnect=true
DB_ROOT_PASSWORD=secretmysql
==== Using the installer ====
This may not work in old Solaris installations. You may have to install bash or try the simpler shell (sh).
cd /src/lams/lams-unix-installer-2.2
bash install-lams.sh
Then answer the questions. Do not answer "yes" or "no", etc. just "y" etc.
I answered yes to all questions, except the wrapper one since it wont work for Solaris.
Do you wish to install LAMS as a Java Service Wrapper? (y)es, (n)o, (q)uit: n
The install should complete with:
Configuring JBoss with your settings.
Buildfile: ant-scripts/configure-deploy.xml
LAMS 2.2 Configuration completed!
Please view the "readme" file for instructions on how to run LAMS.
Now LAMS is installed within the jboss server. LAMS related files in my system were:
* Start-up script:  /usr/local/jboss-4.0.2/bin/run-lams.sh
* Repository files:  /usr/local/lams/lams   
* Configuration file: /etc/lams2/lams.properties
* LAMS server:        /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
==== Run LAMS ====
Go to the bin directory
cd /usr/local/jboss-4.0.2/bin/
Inside this jboss bin directory type. Basically this just calls the jboss run.sh script you have tested above. It just will add more memory to Java and set the Java path according to instructions you gave in the config file.
./run-lams.sh
Then, wait some time (a few minutes) and check the server log from time to time
tail /usr/local/jboss-4.0.2/server/default/log/server.log
If you see this in the log file:
2009-03-04 13:04:39,052 INFO  [org.apache.jk.server.JkMain] Jk running ID=0 time=0/179  config=null
2009-03-04 13:04:39,098 INFO  [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 3m:7s:885ms
then you are lucky :)
Check the URL, e.g.
http://tecfax.unige.ch:8080/lams
You will see the LAMS Logo, Latest News & Updates page and a login form and a friendly Australian young lady working on her laptop. If you just get ugly HTML you made a mistake in the lams.properties file (forgot to specify the server name, see trouble shooting) and you will have to run the installation script again (database tables will be droped !).
==== Trouble shooting ====
For installation/startup trouble, look at the log files:
Directory:
/usr/local/jboss-4.0.2/server/default/log/
If you forgot the admin login/ password:
* It's in the configuration file
/etc/lams2/lams.properties
LAMS wont respond after some time
* Probably you need to increase memory. For 2.1RC0 I needed about 1.5GB. With 2.2 much less :). Edit Java server options in either of these two files:
/usr/local/jboss-4.0.2/bin/run.conf
/usr/local/jboss-4.0.2/bin/run-lams.sh
Some LAMS links will redirect to "localhost" on a server installation
* Fix the lams.properties file, i.e. insert your server name, e.g.
SERVER_URL=http://tecfax.unige.ch:8080/lams/
* Then redeploy the whole thing (restart the installation script as above)
==== Legacy notes for installing the 2.1.1 patch ====
('''ignore''' for 2.2)
1) Shutdown the jboss server:
/usr/local/jboss-4.0.2/bin/shutdown.sh --shutdown
To see if it's down:
tail /usr/local/jboss-4.0.2/server/default/log/server.log
2) Read the doc and make a fix
cd /src/lams/lams-unix-patch-2.1.1
a) Read the "readme" file
b) Fix the script if you want (not really needed). Replace the line
du -chs $LAMS_DIR $JBOSS_DIR
with
du -hs $LAMS_DIR $JBOSS_DIR
3) Run the installer and answer questions. Since I did a fresh 2.1 install just minutes before I did not test any of the backup features. Didn't test the shutdown either.
bash install-lams-patch.sh
4) Fix the startup script a bit, i.e. change line 1 with something like line 2
# nohup ./run.sh > /dev/null &
nohup /usr/local/jboss-4.0.2/bin/run.sh > /dev/null &
4) Test the new version
/usr/local/jboss-4.0.2/bin/run-lams.sh
Wait a while and/or play with:
tail /usr/local/jboss-4.0.2/server/default/log/server.log
==== Configuration of LAMS ====
Once your server is up and running, go to the Administration "Edit Configuration Settings":
1) Essential:
* add email (e.g. yours)
* add the smtp server (but you have to make sure that your institution lets machines post to it. There might be some anti-spam censorship). e.g.
mail.your_org.org
2) Uploaded files
* I kept the defaults
3) [[LDAP]]
* I am intrigued by this. It should not show since I didn't ask for it....
* Basically I think that we will use LAMS only from Moodle ... and all our platforms should use LDAP but they don't ;)
4) Look and feel
* I suggest making screen sizes a bit bigger (unless your students work with ultra-light portable computers)
5) Language
* You can change the locale, e.g. for french, use:
fr_FR
==== Tweaking for production ====
(later)
==== Discussion / Problems ====
Compared to older LAMS installations and the 2.1RCx version, the 2.1 install + 2.1.1 patch install went rather flawlessly and the dec 2009 LAMS 2.2 installation was easy. There was nothing I had to fix for Solaris...
* Only missing thing in the distribution is a /etc/init.d/ startup/shutdown script (later)
=== LAMS upgrade from 2.2 to 2.3.3 on Solaris ===
==== Preparation ====
Remark: LAMS knows where it is installed (file: /etc/lams2/lams.properties)
* Download and unpack the following four patches from http://wiki.lamsfoundation.org/display/lams/Downloads
lams-unix-updater-2.3.tar.gz
lams-unix-patch-2.3.1.tar.gz
lams-unix-patch-2.3.2.tar.gz
lams-unix-patch-2.3.3.tar.gz
Unpack these like this in some source director, e.g. /src/lamgs (for each of these four archives)
gtar zxf lams-unix-patch-2.3.1.tar.gz
Make sure that your systems finds the Java that you used in version 2.2. E.g.
in C Shell you might type:
setenv PATH /usr/local/jdk6/bin:$PATH
setenv JAVA_HOME /usr/local/jdk6
echo $JAVA_HOME
    /usr/local/jdk6
java -version
    java version "1.6.0_11"
==== Installation of LAMS 2.3 patch ====
(1) Go to the source dir
cd lams-unix-updater-2.3
(2) Use bash (and not sh) to launch the install script
bash update-lams.sh
..... answer the questions (in particular shut down LAMS and create a backup), then wait a few minutes
Note: there is a script error about a "du" flag, that you may ignore ...
(3) Run LAMS
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh
* Wait a few minutes and then see if it runs, e.g. look at the log
tail /usr/local/jboss-4.0.2/server/default/log/server.log
* check for a string like "JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:54s:54ms"
* Continue with the next patch
popd
==== Install 2.3.1 ====
(same principle as above)
cd lams-unix-patch-2.3.1
bash install-lams-patch.sh
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh
tail /usr/local/jboss-4.0.2/server/default/log/server.log
popd
==== Install 2.3.2 ====
(different install)
* '''Stop''' LAMS first
pushd /usr/local/jboss-4.0.2/bin/
shutdown.sh --shutdown
tail /usr/local/jboss-4.0.2/server/default/log/server.log
popd
* Copy all the files in the distro to JBOSS
cd lams-unix-patch-2.3.2/
cp -r * /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
* Restart again
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh
==== Install 2.3.3 ====
(same principle as above)
* '''Stop''' LAMS first
pushd /usr/local/jboss-4.0.2/bin/
./shutdown.sh --shutdown
tail /usr/local/jboss-4.0.2/server/default/log/server.log
popd
* Copy files
cp -r lams.ear/* /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
* Destroy old working directories
rm -r /usr/local/jboss-4.0.2/server/default/work
rm -r /usr/local/jboss-4.0.2/server/default/tmp
* Restart again
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh
... Enjoy. It now can speak french too. I caught up with all the missing labels since 2.something and also made an effort to test each tool. Btw. for LAMS 2.4 I'll try to have a quite perfect translation. For now, it's at least usable :)
==== Installation of add-ons ====
; Mediaplayer
A mediaplayer is now integrated (no need for the flv player)
; GMAP
You need to install an API Key to use this
* Read: http://wiki.lamsfoundation.org/display/lamsdocs/Google+Map+Key
** Make sur to include the right URL for LAMS.
; DIMDIM
* Not done yet
* http://wiki.lamsfoundation.org/display/lamsdocs/laddim10
; Video Recorder
* Not done yet
* http://wiki.lamsfoundation.org/display/lamsdocs/lavidr10
==== Configuration settings ====
You may read the  [http://wiki.lamsfoundation.org/display/lamsdocs/LAMS+Configuration LAMS Configuration] instructions again ...
=== Upgrade from 2.3.4 to 2.3.5 ===
Upgrading script needs two fixes (SunOS 5.10), i.e. two options of ''du'' and ''cp'' don't exist under Solaris.
L237:    du -s $LAMS_DIR $JBOSS_DIR
L335:    cp -pr assembly/lams.ear/* $EAR_DIR > log/update-files.log
Then type:
  bash update-lams.sh
... and answer questions.
== Moodle - LAMS integration ==
* Read [http://wiki.lamsfoundation.org/display/lamsdocs/Integrations LAMS & LMS Integrations]. This piece gives an overview and also points to specialized installs.
=== For Moodle 3.x ===
As of May 19 2016, the plugin seems to be broken for Moodle 3.04. I will ask the LAMS team to fix this. There is no workaround as far as I can tell - [[User:Daniel K. Schneider|Daniel K. Schneider]] ([[User talk:Daniel K. Schneider|talk]]) 14:37, 19 May 2016 (CEST)
=== For Moodle 2.x ===
The Moodle-LAMS interface has completly changed for Moodle 2.x. It now is maintained by the LAMS team.
* Read [http://wiki.lamsfoundation.org/display/lamsdocs/Moodle2 Moodle2] (look at children articles at the bottom !)
(1) Get the integration module from here:
* http://wiki.lamsfoundation.org/display/lams/Downloads ('''Tick on the integrations tab, or you won't see it !!)
Last time I checked for Moodle 2.4x (4/2013):
wget http://downloads.lamsinternational.com/2.4/integrations/moodle/20130123-lamslesson-moodle2.4.zip
(2) Unzip to the moodle/mod folder
E.g. in our moodle/moodle/mod directory you will have:
drwxr-xr-x xxx yyy 4096 2011-03-28 19:36 lamslesson
(3) Install it
* by going to the http://yours.org/moodle/admin/ folder
(4) Configuration on the LAMS side
* Id: moodle
* Key: something_nicely_complex
* Name: moodle
* Description: Something Moodle
* Prefix: mdl
* User information: http://.../moodle/mod/lamslesson/userinfo.php?ts=%timestamp%&un=%username%&hs=%hash%*
* External server URL: http://your.moodle.server/moodle
* Timeout URL:
http://your.moodle.server/moodle
(4) Configure on the Moodle side
After adding the lamslesson module moodle, you automatically should see the setup dialog. Since you likely will get it wrong the first time, try:
* Site Administration->Plugins->Activity modules->LAMS lesson
* LAMS server URL: http://...../:8080/lams/
* Server ID: moodle
* Server key: some_nicely_complex
* Moodle Instance name: Your Moodle
(5) Fix the language pack
* Grab the file
moodle/mod/lamslesson/lang/en/lamslesson.php
* Save the result in the datadir or else use moodles translation interface
datadir/lang/fr/lamslesson.php
** Keep a safe copy of this file somewhere. After some brutal upgrading it may just go away ....
* Translate
** And watch out for apostrophes !! E.g. a string like 'Il n'y a pas' won't do. Try "Il n'y a pas" instead for example.
* Purge the cache
moodle/admin/purgecaches.php
=== For Moodle 1.x ===
The [http://wiki.lamsfoundation.org/display/lamsdocs/LAMS+v2.0+Integration+Setup+Step-by-Step+Guide  LAMS v2.0 Integration Setup Step-by-Step Guide] is fairly well done :)
==== The setup ====
* Moodle 1.9.4+. It runs on one machine (tecfax.unige.ch)
* LAMS runs on the same machine
I did manage to have LAMS 2.1 run on a different machine sometimes in the past.
==== Installing LAMS 2 Moodle module ====
First of all '''make sure''' that you do no skip step 4 below (you need the LAMS v2 module and ''not'' LAMS !). Btw. I wonder why the LAMS 1 module is still included with Moodle.
Installation:
# If you don't need to keep old data, remove the LAMS2 module in Moodle
# Download a '''new''' integrations package (it seems that fixes are made sometimes)
#* From [http://wiki.lamsfoundation.org/display/lams/Downloads here] (click on the Integrations tab)
# Unzip the file (or directly unzip in moodle/mod/)
# Move the lamstwo directory to moodle/mod/
# Move the lamstwo.php file to moodle/lang/en_utf8/ ('''not anymore in newer versions - 12:04, 27 April 2010 (UTC)''')
#* Do not forget this one, else you'll see some strange labels in Moodle
# Move the lamstwo_status directory to moodle/blocks/
# Login as admin and go to http://yourmoodle/admin, LAMS tables will be created automatically, i.e. you will see typical Moodle upgrade message.
==== Configuration on the LAMS side ====
Note: There seems to be a bug. If you Disable Organization it will never come back. So don't tick this.
* Go to "System Administration", then "Maintain integrated servers". click on edit. In particular: Make sure that you get the Moodle "user information" URL right and that all parameters match on both sides (be careful with "Moodle" vs. "moodle"!).
Id:          moodle
Key:          somethingsecret
Name:        moodle
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
==== Configuration on the Moodle Side ====
* Go to Modules / Activities / and click settings for '''LAMS v2'' module.
I used the following values:
server_url:    http://tecfax.unige.ch:8080/lams
server_id:      moodle
server_key:    somethingsecret
request_source: moodle
Validate and '''Save'''
;'''Important notice'''
* Do '''not''' remove the old lams module with Modules -> Activities -> Manage activities!!
* If you do so, the LAMS permissions will be broken on Moodle. Only administrators could add LAMS TWO modules. More technically speaking the following two Moodle role capabilities will be gone:
Manage LAMS activities mod/lams:manage
Participate in LAMS activities mod/lams:participate
... That mistake cost me two hours of work today (my edutech students who have to learn some LAMS authoring could only create LAMS activities in Moodle 1.9.4x, but the "Open authoring" and "Add new lesson" buttons were gone for them - [[User:Daniel K. Schneider|Daniel K. Schneider]] 21:41, 9 March 2009 (UTC)
==== Test it ====
Get a pack from the lamscommunity. Three obvious choices are:
* [http://www.lamscommunity.org/lamscentral/sequence?seq_id=622723 LAMS101 part 1 - What Is LAMS?]
* [http://www.lamscommunity.org/lamscentral/sequence?seq%5fid=622726 LAMS 101, Lesson 2 - LAMS Environments]
* [http://www.lamscommunity.org/lamscentral/sequence?seq%5fid=622729 LAMS101, Lesson 3 - LAMS Activities]
In Moodle you can add these in two steps:
; 1) "Add an activity"
Note: If you can't see anything happen, e.g. you just get this message and nothing else:
  Sequence
  The directory structure below contains the sequences you can create a lesson for.
  Select one and click on the next button to continue.
then you made a mistake in the configuration, e.g. the "user information" URL is wrong.
; 2) For this activity author and/or import LAMS lessons
To author a LAMS lesson click on "open authoring"
To import a LAMS lessons, also click on "open authoring", then inside LAMS:
* File->Import
* Then get it from your LAMS Workspace (it will not directly import to the LAMS stage)
* File->Save
: 3) Then when you are back to Moodle, click on add lesson and pick your lesson or one of the imported ones.
Summary:
* You can access LAMS from Moodle to author or import
* You then can use "lessons" from your workspace in LAMS as part of a LAMS moodle activity (at least one "lesson" or "several".
Note: I believe that having "lessons" within a single Moodle LAMS activity is new since 2.2 or 2.1. Before that one Moodle LAMS activity only had one LAMS module inside if I remember right.
==== Moodle-LAMS trouble shooting ====
The Interface in Moodle is not obvious.
You may have to adjust timeouts and other stuff if your server load is high.
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 once)
Your JBOSS server may need '''more''' memory space allocated (see above)
Be careful about using several browser windows and tabs. The "system Administration" page will use an already opened window/tab. So if the "Sys Admin" link doesn't bring up the tool or complains about your role, etc. look for it on your desktop and close it. Maybe also log out and in again from your LAMS server if you just tested Moodle before.
If you tried a Moodle LAMS integration in the past with an older LAMS server, your MOODLE may have junk left inside. Replace all older Moodle LAMS integration code (as we actually pointed out above)
Only if you don't have activities in production:
* delete the LAMS2 module in MOODLE.
In any case:
* Remove all the the files in the '''moodle/mod/lamstwo''' directory
* Reinstall a '''new''' version (downloaded fresh).
== LAMS 2.2 Windows Vista + Wampserver ==
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 [http://wiki.lamsfoundation.org/display/lamsdocs/Windows+Installer+Help LAMS installation instructions]. I also strongly suggest to look at the [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/forum-view?forum_id=4929 Problems Installing LAMS] Forum.
=== Other Software ===
To run the LAMS server on windows you need to install other software.
; Java
* You need least Java JSE 5.0, ''not just the JRE'' (the runtime), you '''really''' need a '''JDK''' (developer kit). Get it from [http://java.sun.com/ java.sun.com].
; MySQL
* The best bet is to get it directly from [http://dev.mysql.com/downloads/ 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 2.x since several people reported problems with these in the support forums. Anyhow, for myself I did use a WAMP anyhow, but if you do so too, don't complain...
** I installed [http://www.wampserver.com/ Wampserver version 2.0]. It can run Moodle for example.
=== MySQL ===
* You should know where the mysql executables are.  The LAMS installer will probably find them, but it is better to be informed. Because then you also can type MySQL commands, e.g. to fix database problems. On my machine, the WampServer/MySQL directory is here:
c:/soft/wamp/bin/mysql/mysql5.1.30/
And the binaries are here:
c:/soft/wamp/bin/mysql/mysql5.1.30/bin
Also there seems to be a missing table (probably this could be fixed with some command-line script and I think I did this with mysqlcheck, but I forgot sorry). But if it doesn't you have to add this table to the mysql table, e.g. with phpmyaadmin or on the command line:
<pre>
CREATE TABLE 'servers' (
'Server_name' char(64) NOT NULL,
'Host' char(64) NOT NULL,
'Db' char(64) NOT NULL,
'Username' char(64) NOT NULL,
'Password' char(64) NOT NULL,
'Port' int(4) DEFAULT NULL,
'Socket' char(64) DEFAULT NULL,
'Wrapper' char(64) NOT NULL,
'Owner' char(64) NOT NULL,
PRIMARY KEY ('Server_name')
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COMMENT='MySQL Foreign Servers table';
</pre>
=== Installing LAMS ===
Make sure that MySQL is up and running '''before''' you install LAMS. If you never fully reboot your machine, it's also good idea to do so now.
Then, click on the LAMS installer. It will ask several things and suggest defaults. E.g.
* The database admin id and password. By default, most WAMP servers come configured without one, but that's not a safe ways to live.
* The LAMS database name, database user and password
* The LAMS administrator login and password
On my Laptop PC, LAMS installed ok, but did not manage to start up (trouble, see the fix below).
=== Running LAMS ===
* Make sure that the LAMS port (8080) is free, e.g. install [http://www.download.com/Active-Ports/3000-2085_4-10062969.html Active Ports] or type something like ''netstat -a'' in a DOS terminal.
* Then, if the "Start LAMS" script in the program menu gives an error message like this:
>>> MySQL does not appear to be running - please make sure it is running before starting LAMS
** Make sure that MySQL is really running and available on the right port, e.g. type
(mysqldir)\bin\mysqladmin ping -h localhost -P 3306 -u root -p
** If MySQL ''is'' running, then you have a problem. You can try to start the LAMS service manually (worked for me): Find the services panel (sorry I don't have an English Windows), but it should be something like: ''Configuration Panel->Administration tools->Services''. Then, start the LAMSV2 service (click on it, then click on "start" or something similar on top left, or use the right-click menu).
* Also pay attention to popup blockers in your navigator. LAMS worked fine with both IE 6 and Firefox 3.
Summary: LAMS 2.2 runs fine on my DELL XPS M1730 laptop with Vista professional and WampServer. '''But''' I only managed to get it working because I do have a vague idea on how computer systems and web software work. Beginners really should stick to advice from the official LAMS website and/or have it installed by someone on a real server.
== LAMS 2.1x on On Solaris 10 ==
== LAMS 2.1x on On Solaris 10 ==


Line 98: Line 1,166:
  mysql -u root -p
  mysql -u root -p


Then enter the following lines (alternatively read them from a file like this: <code>mysql -u root -p < input.sql</code>)
Then enter the following lines (alternatively read them from a file like this: <code>mysql -u root -p < input.sql</code> or paste them into a tool like phpmyadmin.
 
  SET FOREIGN_KEY_CHECKS=0;  
  SET FOREIGN_KEY_CHECKS=0;  
  DROP DATABASE IF EXISTS lams;  
  DROP DATABASE IF EXISTS lams;  
  CREATE DATABASE lams DEFAULT CHARACTER SET utf8;  
  CREATE DATABASE lams DEFAULT CHARACTER SET utf8;  
  SET FOREIGN_KEY_CHECKS=1;  
  SET FOREIGN_KEY_CHECKS=1;  
  GRANT ALL PRIVILEGES ON *.* TO lams@localhost IDENTIFIED BY 'secretpassword';  
  GRANT ALL PRIVILEGES ON lams.* TO lams@localhost IDENTIFIED BY 'your_secret_passwd';  
  REVOKE PROCESS,SUPER ON *.* from lams@localhost;
  REVOKE PROCESS,SUPER ON *.* from lams@localhost;
In case you use the command line tool, continue with quit
  quit
  quit
Make sure to reload, e.g. on the command line, type:
mysqladmin -p reload


Now your database should be ready for LAMS.
Now your database should be ready for LAMS.
Line 478: Line 1,551:
* Remove the files in the mod directory
* Remove the files in the mod directory
* Reinstall a '''new''' version (downloaded fresh).
* Reinstall a '''new''' version (downloaded fresh).
== LAMS 2.0 RC2 Windows XP PC ==
Note: This chapter is outdated (written in Dec 2006). I don't see really the point in running a LAMS server on a personal PC and our servers are Unix ! But since some of our students like to play with tech, I may update it some day .... - [[User:Daniel K. Schneider|Daniel K. Schneider]] 16:54, 19 September 2008 (UTC)
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 [http://wiki.lamsfoundation.org/display/lamsdocs/Windows+Installer+Help LAMS installation instructions]. I also strongly suggest to look at the [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/forum-view?forum_id=4929 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 [http://java.sun.com/javase/downloads/index.jsp Sun].
* MySQL: Get it directly from [http://dev.mysql.com/downloads/ 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 [http://dev.mysql.com/doc/refman/5.0/en/windows-install-wizard.html information] from MySQL AB and [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/message-view?message_id=118753 this posting] and [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/attach/download/win_registry_msql%2ejpg?object_id=118756&attachment_id=118758 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: [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/message-view?message_id=341725 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 ===
* Make sure that the LAMS port (8080) is free, e.g. install [http://www.download.com/Active-Ports/3000-2085_4-10062969.html Active Ports] or type something like ''netstat -a'' in a DOS terminal.
* 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.

Latest revision as of 10:47, 21 March 2019

The discussion page contains outdated stuff that I deleted from the page.

No discussion so far :)


'Legacy stuff is below. this is only of interest to LAMS historians ....'

LAMS 2.4 on Debian/Ubuntu

Use the official installer. It's very easy.

add-apt-repository "deb http://downloads.lamsinternational.com/debian web/"
apt-get update
apt-get install lams2 --force-yes --assume-yes
Start up/stop script
/etc/init.d/lams2 start
/etc/init.d/lams2 stop
Files
  • JBoss is located in /usr/share/jboss-5.1
    • /usr/share/jboss-5.1/server/default/deploy/lams.ear/
  • Log files: /var/log/jboss/
  • Main log file: /var/log/jboss/lams.log
  • LAMS home (data files): /usr/share/lams2
    • However, data files for stuff uploaded with the fckeditor are (unfortunately) in /usr/share/jboss-5.1/server/default/deploy/lams.ear/lams-www.war/secure


Patches
  • You also should add the official patches (see below)

LAMS 2.3 on Debian/Ubuntu

I tested this with Ubuntu 10.04 LTS - the Lucid Lynx (i.e. on my personal desktop machine)

Become root or prefix each command with "sudo"

Install Java if not already done so
add-apt-repository "deb http://archive.canonical.com/ lucid partner"
apt-get update
apt-get install sun-java6-jdk

Notes:

  • You may have to install add-apt-repository first
apt-get install python-software-properties
  • The java JDK installer will ask two questions (OK and accept license). Use the TAB key to navigation between response items and then hit ENTER.
  • (Short) testing if Java is ok, type:
java -version
You should see something like:
java version "1.6.0_26"
ava(TM) SE Runtime Environment (build 1.6.0_26-b03)
Install LAMS + JBoss
add-apt-repository "deb http://downloads.lamsinternational.com/debian web/"
apt-get update
apt-get install lams2 --force-yes --assume-yes

During the installation process, you may be asked a few questions, ie:

  • password for MySQL server,
  • LAMS admin name (default = sysadmin) plus password for the LAMS server
  • the Java/LAMS server port (default is 8080).

The installer will start up LAMS. Check for the following line at the end of the log file after a few minutes:

tail /usr/share/jboss-4.0.2/server/default/log/server.log
2011-08-29 14:06:45,522 INFO  [org.jboss.system.server.Server] JBoss (MX MicroKernel)
[4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:27s:654ms


Start up/stop script
/etc/init.d/lams2 start
/etc/init.d/lams2 stop
Files
  • JBoss is located in /usr/share/jboss-4.0.2
    • /usr/share/jboss-4.0.2/server/default/deploy/lams.ear/
  • Log files: /var/log/jboss/
  • Main log file: /var/log/jboss/lams.log
  • LAMS home: /usr/share/lams2

LAMS extensions on Debian/Ubuntu

I tested this with Ubuntu 10.04 LTS - the Lucid Lynx

Big blue button

The documentation below is outdated. As of May 2015, BigBlueButton is much easier to install under Ubuntu (and maybe other systems too)


outdated ------

The software and its dependencies is rather large. The BigBlueButton is comprised of many open source components, e.g. a Nginx webserver, a Tomcat servlet container, red5. The only easy way to run this, is using a separate machine (or a virtual machine). If you want this next to an Apache Web server, you will have to manually edit configuration files.

See:

Become root or add "sudo" in front of each

(1) Make sure that you have multiverse

more /etc/apt/sources.list | grep multiverse

Else, else add it, e.g. I use the Swiss server, replace by your own

add-apt-repository "deb http://ch.archive.ubuntu.com/ubuntu/ lucid multiverse" 

(2) Add the BigBluebutton archive

add-apt-repository "deb http://ubuntu.bigbluebutton.org/lucid/ bigbluebutton-lucid main"

(3) Install a Voice Conference Server, FreeSWITCH is recommended

Maybe needed:

sudo apt-get install python-software-properties 

Needed (I ignored security warnings)

add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers
apt-get update
apt-get install bbb-freeswitch-config

(4) Install BigBlueButton

apt-get install bigbluebutton
  • Use TAB for navigation in the dialogs
  • The installation also might install a mysql server if you don't have own, else it will ask for the root password.

(5) Run it

  • For testing purposes, you will have to shut down your normal web server.
bbb-conf --clean

You should see:

bbb-conf --clean
Doing a clean restart of BigBlueButton ...
 * Stopping Red5 Server red5  [ OK ] 
 * Stopping Tomcat servlet engine tomcat6   [ OK ] 
Stopping nginx: nginx.
 * Stopping Apache ActiveMQ service activemq  [ OK ] 
Stopping OpenOffice headless server.

Cleaning Log Files ...
 * Apache ActiveMQ service is not running.
 * could not access PID file for nginx
 * Red5 Server is not running.
 * Tomcat servlet engine is not running.

Starting FreeSWITCH
2948 Backgrounding.
 * Starting Apache ActiveMQ service activemq  [ OK ] 
Waiting for ActiveMQ to start: 
Waiting for FreeSWITCH to start: ....................
Starting OpenOffice headless server
Starting nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful
nginx.
 * Starting Red5 Server red5   [ OK ]
 * Starting Tomcat servlet engine tomcat6  [OK]

Waiting for BigBlueButton to finish starting up (this may take a minute):  done

** Potential problems described below **

Then type:

bbb-conf --check

(6) Configure

Setting another port requires two operations:

(6a) Change BigBlueButton port

bbb-conf --setip YOUR_IP_OR_DOMAIN_NAME:81

(6b) Change the Nginx webserver port too (or nothing will work)

  • Verify/edit both /etc/nginx/sites-available/default and/etc/nginx/sites-available/bigbluebutton
/etc/init.d/nginx restart

(7) Stop / start

bbb-conf --stop
bbb-conf --start

Will clean, then restart. However, I did not check yet if all servers are always stopped and configurations redone, etc.

bbb-conf --clean

(8) LAMS Integration (not yet tested !)

For LAMS, you may have to know the salt (some key used for security)

bbb-conf --salt

Red5

Currently (March 2012, Ubuntu Lucid), it will not install, since Java 1.6 was removed from the distribution. However, BigBlueButton includes a red5 server (see above)

Small LAMS patches

Before patches are integrated into a new release, you could retrieve them from http://wiki.lamsfoundation.org/display/lams/Patches and then apply them manually as explained in the same page.

For example, to patch LAMS 2.4 under Unix

cd /tmp
mkdir lams
cd lams
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-2993_lams-tool-laasse10.war.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-3019_lams-tool-lawiki10.war.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-2867_lams-central.war.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-3008_IE10-fix.zip
wget http://downloads.lamsinternational.com/2.4/stable/patches/LDEV-3401_lams-tool-laasse10.war.zip

/etc/init.d/lams2 stop

unzip LDEV-2867_lams-central.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-2993_lams-tool-laasse10.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-3008_IE10-fix.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-3019_lams-tool-lawiki10.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/
unzip LDEV-3401_lams-tool-laasse10.war.zip -d /usr/share/jboss-5.1/server/default/deploy/lams.ear/

rm -r  /usr/share/jboss-5.1/server/default/tmp
rm -r  /usr/share/jboss-5.1/server/default/work

/etc/init.d/lams2 start

Migrating LAMS to another machine / OS

LAMS uses two places for keepting data:

  • The MySQL database
  • A repository directory outside of a web tree. E.g. on Solaris it was in:
/usr/local/lams/lams

Finally, there is configuration file that will tell you where things are and what user/password combinations you used for admin and the database. E.g. on Solaris it was in

/etc/lams2/lams.properties

The procedure:

(1) Lams repository directory

Copy all the files. E.g. to migrate from Solaris to Linux, I

  • created a tar ball on the solaris side
cd /usr/local/lams/lams
gtar zcf lams-dir.tgz dump repository temp
  • unpacked on the Linux side
cd /usr/share/lams
sftp ...
tar zxf lams-dir.tgz
  • make sure that the directories are writable by the UID that runs LAMS, e.g. you may have to
chown -R lams:lams *

scp would be easier but more complicated to learn and if I remember well there can be some problems with links.

(2) Database

  • Find it on the source machine (in all likelyhood you called it 'lams')
mysqlshow -p
  • Dump it
mysqldump lams -p > lams.sql
gzip lams.sql 
  • Move it to the target machine (linux in our case) and find the name of the lams db
mysqlshow -p
gunzip lams.sql.gz
mysql -p lams < lams.sql

(3) IMPORTANT: fix the config section in the LAMS server administration

You must get this right or you are half dead !

  • Now it's probably a good idea to restart the server

(4) Test

  • See if the old stuff is there, in particular try to open a sequence from the db, monitor an old class, etc.

... the above worked with me :)

(5) Fix the Moodle Interface

  • Read the section on LAMS-Moodle integration below

LAMS on Solaris

.... more difficult :)

LAMS 2.2 on Solaris

Lams 2.0 was released on December 6 2006. Since then, there were very several "minor" upgrades and some of them include substantial changes. On March 2009, the current release is 2.2 and compared to 2.1. there are a whole lot of new features.

These installation notes refer mostly to the 2.2 install. Official LAMS instructions are a bit Linux centric and this is main reason why you might have a look at this. My notes also should work with older Solaris versions (just make sure to upgrade Java if needed and in this case to set the Java path) and other Unix systems.

First, read the instructions in:

Upgrading from previous versions: I always start from scratch. Since we only have our students create LAMS scenarios as exercises I had them save the zip file in their work portfolio and they could import it again (I hope). Anyhow: you might want to export all scenarios from your LAMS server as LAMS zip files (not LD) before you do a new install.

Disclaimer: I am not a good sysadmin nor is it my idea of fun. This is not a manual, but just my private installation notes I am willing to share. - Daniel K. Schneider 14:02, 4 March 2009 (UTC)

I got this machine and OS:

SunOS tecfax.unige.ch 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Fire-V240

So, open a terminal under root ....

Download and checksum

Check the download page at LAMS. Make sure to get the right version ! Also you may have to get a patch that you will have to apply after the main install (e.g. that was the case for LAMS 2.1.1. which you had to apply on top of 2.1)

I took the lams-unix-installer-2.2.tar.gz. This would be the wrong version if you have Ubuntu. I run Ubuntu as my desktop machine and indeed life is easier on Ubuntu ....

Then you may checksum the downloaded archive. In some very rare cases there exist transmission errors or someone managed to upload a bad archive to the download server. So type:

md5sum lams-unix-installer-2.2.tar.gz 

And then compare the number that will show like this with the one on the download page:

2f29d60147bf1328d3a044a66ea8b083  lams-unix-installer-2.2.tar.gz

Prerequisite 0: Infrastructure

  • Make sure your organization doesn't stifle your creativity with Firewalls. If they do, expect a lot of extra work.
  • Also the 8080 port should be free. Some software like Skype just randomly take up ports. If you run an other server, read Changing Server Ports for LAMS
  • Hardware and OS: Any Windows, Linux, MacOS X, Solaris etc. machine will do since LAMS is programmed in JAVA. You just need some disk space, substantial memory and a not too old JAVA. Also, you may have to adapt some scripts to your special Unix brand.

Prerequisite 1: Java software

Java + ant

Solaris 10 ought to have the right Java + Ant installed. Ant is an installation program like make. Note: You need the JDK/JSE or whatever Sun decided to rename it (i.e. the compiler, not just the runtime)

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.

I have Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05), i.e. the default thing installed in this machine. It's easy to have another Java version, but I suggest from past experience to install it somewhere else, e.g. in /usr/local.

So just for the fun of it you can get another from SUN. No links, since Sun not only changes naming of Java edition but also their web sites at regular intervals. You just have to understand that JDK "6" == JDK "1.6" and that "SDK == JDK". Do not install anything that is called "JRE". Then, you can either take the small SE version or larger EE version. Both work with JBoss. It takes some time to find the right thing. Also you won't find installation instructions on the final download screen (you have to backtrack). Branding managers and website designers at Sun should reassigned to other tasks like designing the cafeteria at the head quarters. Do not go to http://java.com but try http://java.sun.com/

In case you download something like the jdk-6u11-solaris-sparc.sh version you have to know that it will just unpack the whole thing as a subdirectory.

cd /usr/local
mv /path_where_you_put_it/jdk-6u11-solaris-sparc.sh .
chmod a+x jdk-6u11-solaris-sparc.sh
./jdk-6u11-solaris-sparc.sh
ln -s jdk1.6.0_011 jdk6
rm jdk-6u11-solaris-sparc.sh

Now you have a Java6 in the symbolic link /usr/local/jdk6. See if it works:

./jdk6/bin/java -version

Should show:

java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)

Let's try installing it with this one.

Prerequisite 2: Wildfire

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

You don't really need open/wildfire (but then your students can't chat). You also may try to use an existing server that works with LAMS. I guess that there ought to be free servers you can use.

  • LAMS folks say to install an old 2.6.2. version. Links are available from the LAMS page, you won't find it at Ignite realtime. Note: I have to see whether this is still true, but for the moment I just complied.
  • Since this server is written in Java you can take the Mac OSX and others version (i.e. a tar ball). I ran it with java 5 (Solaris 10 default java engine).

Installation steps:

1) Uncompress in /usr/local/wildfire or some other place

gtar zxf wildfire_2_6_2.tar.gz

2) Start the server with ./bin/wildfire start. You should see:

testing JVM in /usr ...
Starting wildfire
  • This is a typical startup script. You later can copy this script to /etc/init.d/ etc.

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

http://localhost:9090/ 

Else use an URL like: http://yourhost.org:9090/ Anyhow, do the config as fast as possible since you have to set passwords and stuff.

  • Use "embedded database" if you want to make the install shorter, else you can set it up with mysql

The configuration process will ask you to 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), but you can do this later

4) Test it. You may want to install a jabber client, e.g. gajim (Ubuntu users can read an article on Jabber

5) Security: You may restrict login to given set of IP addresses or even disable account creation. Chat servers may be taken over by not so friendly people.

  • Edit Server -> Server Settings-> Registration and Login

Installing wildfire should be easy, it was for me. It's a fairly popular product...

Note on server parameters: They must match !

Wildfire:

Server domain (e.g. test.example.com)

LAMS:

Xmpp server domain (e.g. test.example.com)
Xmpp conference (e.g. conference.test.example.com)

Prerequisite 3: Configure MySQL for LAMS

Here are the steps:

1) Make sure to have a MySQL 5.x server. Else install it (and come back)

2) Configure it according to the LAMS instructions, i.e. make changes to file my.cnf:

  • This cnf file may not exist (it wasn't in our binary distribution). Also, it can be in different locations
  • Type mysql --help to get a list of the places the MySQL server will look for this config file
  • So, create my.cnf if you don't have one. Start by copying a *.cfn model from /usr/local/mysql/share/mysql or some other place. I took my-medium.cnf.

Changes to make: file my.cnf should include these lines (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 (optional)

This step is not needed, the installation script will do it

However, there is a mistake in the script. It will grant global privileges to the lams user. Remove them either with these SQL commands or with some MySQL administration tool.

REVOKE ALL PRIVILEGES ON * . * FROM 'lams'@'localhost';
REVOKE GRANT OPTION ON * . * FROM 'lams'@'localhost';

Then add these just for the lams database

GRANT ALL PRIVILEGES ON `lams` . * TO 'lams'@'localhost' WITH GRANT OPTION ;

Prerequisite 4: JBOSS

JBOSS is a Java application server. LAMS is programmed with this application framework.

  • Unpack into /usr/local (or wherever else you like it)
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/

Pre-install

1) Unpack the archives some place, e.g. in /src/. Use gtar to unpack !

gtar zxf lams-unix-installer-2.2.tar.gz

So you should have something like:

drwxr-xr-x   3 schneide tecfa           4 Mar  4 10:19 ./
drwxrwxr-x  36 schneide tecfa          48 Mar  4 11:43 ../
drwxr-xr-x  14 schneide tecfa          18 Dec  4 02:19 lams-unix-installer-2.2/
-rw-r--r--   1 schneide tecfa    54485042 Mar  4 10:19 lams-unix-installer-2.2.tar.gz

2) If you use a non-standard JAVA make sure that installer script can find it. Remember this for later also ! If you use csh, type:

setenv PATH (path to java bin directory):$PATH
setenv JAVA_HOME (path to java installation directory)

For example:

setenv PATH /usr/local/jdk6/bin:$PATH
setenv JAVA_HOME /usr/local/jdk6

Or in a bash shell:

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

Then control:

which java
java -version

3) You should kill older lams data and config directories and/or make a backup, e.g.

mv /usr/local/lams/lams /usr/local/lams/lams.old
mv /etc/lams2 /etc/lams2.old

4) If you already got an old LAMS in JBoss, also get rid of it (not sure if this is really needed)

rm -r /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/

5) If you use a non-standard Java (see above) you also should change the JAVA configuration in JBOSS. Edit file /usr/local/jboss-4.0.2/bin/run.conf and change:

JAVA_HOME=/usr/local/jdk6
JAVA="/usr/local/jdk6/bin/java

You also can add some extra memory for startup, but the LAMS startup script also will do it for you (see below).

# JAVA_OPTS="-server -Xms512m -Xmx512m -XX:MaxPermSize=512m"

The just test it once, execute:

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

You should see something like:

JBoss Bootstrap Environment
 JBOSS_HOME: /usr/local/jboss-4.0.2
 JAVA: /usr/local/jdk6/bin/java
 JAVA_OPTS: -server -Xms512m -Xmx512 -Dprogram.name=run.sh
 CLASSPATH: /usr/local/jboss-4.0.2/bin/run.jar:/usr/local/jdk6/lib/tools.jar

Check in a browser if its alive for real:

http://xxxx.yyy.zz:8080/

Then kill it, execute:

/usr/local/jboss-4.0.2/bin/shutdown.sh --shutdown

Edit the installer configuration file

Go to the lams-unix-installer directory, e.g. /src/lams/lams-unix-installer-2.2/

cp lams.properties lams.properties.ORI

I did the following (roughly)

Installation Options on top of the file
LAMS_DIR=/usr/local/lams/lams
LAMS_USER=admin
LAMS_PASS=secretX
DB_NAME=lams
DB_USER=lams
DB_PASS=secretY
Wildfire installation
# If it sits on different machine you got to configure, else you can leave the defaults
# WILDFIRE_DOMAIN=tecfasun1.unige.ch
# WILDFIRE_CONFERENCE=conference.tecfasun1.unige.ch
WILDFIRE_DOMAIN=localhost
WILDFIRE_CONFERENCE=conference.localhost
WILDFIRE_USER=admin
WILDFIRE_PASS=secretZ

Essential settings (Set the server_url with the right port, localhost won't do !)
LAMS_PORT=8080
# In case LAMS is on a different machine: 
SERVER_URL=http://tecfax.unige.ch:8080/lams/
JBOSS_DIR=/usr/local/jboss-4.0.2
JDK_DIR=/usr/local/jdk6
SQL_DIR=/usr/local/mysql/bin
SQL_HOST=localhost
SQL_PORT=3306
SQL_URL=jdbc:mysql://${SQL_HOST}/${DB_NAME}?characterEncoding=utf8&autoReconnect=true
DB_ROOT_PASSWORD=secretmysql

Using the installer

This may not work in old Solaris installations. You may have to install bash or try the simpler shell (sh).

cd /src/lams/lams-unix-installer-2.2
bash install-lams.sh

Then answer the questions. Do not answer "yes" or "no", etc. just "y" etc.

I answered yes to all questions, except the wrapper one since it wont work for Solaris.

Do you wish to install LAMS as a Java Service Wrapper? (y)es, (n)o, (q)uit: n

The install should complete with:

Configuring JBoss with your settings.
Buildfile: ant-scripts/configure-deploy.xml
LAMS 2.2 Configuration completed!
Please view the "readme" file for instructions on how to run LAMS.

Now LAMS is installed within the jboss server. LAMS related files in my system were:

  • Start-up script: /usr/local/jboss-4.0.2/bin/run-lams.sh
  • Repository files: /usr/local/lams/lams
  • Configuration file: /etc/lams2/lams.properties
  • LAMS server: /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/

Run LAMS

Go to the bin directory

cd /usr/local/jboss-4.0.2/bin/

Inside this jboss bin directory type. Basically this just calls the jboss run.sh script you have tested above. It just will add more memory to Java and set the Java path according to instructions you gave in the config file.

./run-lams.sh

Then, wait some time (a few minutes) and check the server log from time to time

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

If you see this in the log file:

2009-03-04 13:04:39,052 INFO  [org.apache.jk.server.JkMain] Jk running ID=0 time=0/179  config=null
2009-03-04 13:04:39,098 INFO  [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 3m:7s:885ms

then you are lucky :)

Check the URL, e.g.

http://tecfax.unige.ch:8080/lams

You will see the LAMS Logo, Latest News & Updates page and a login form and a friendly Australian young lady working on her laptop. If you just get ugly HTML you made a mistake in the lams.properties file (forgot to specify the server name, see trouble shooting) and you will have to run the installation script again (database tables will be droped !).

Trouble shooting

For installation/startup trouble, look at the log files:

Directory:

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

If you forgot the admin login/ password:

  • It's in the configuration file
/etc/lams2/lams.properties

LAMS wont respond after some time

  • Probably you need to increase memory. For 2.1RC0 I needed about 1.5GB. With 2.2 much less :). Edit Java server options in either of these two files:
/usr/local/jboss-4.0.2/bin/run.conf
/usr/local/jboss-4.0.2/bin/run-lams.sh

Some LAMS links will redirect to "localhost" on a server installation

  • Fix the lams.properties file, i.e. insert your server name, e.g.
SERVER_URL=http://tecfax.unige.ch:8080/lams/
  • Then redeploy the whole thing (restart the installation script as above)

Legacy notes for installing the 2.1.1 patch

(ignore for 2.2)

1) Shutdown the jboss server:

/usr/local/jboss-4.0.2/bin/shutdown.sh --shutdown

To see if it's down:

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

2) Read the doc and make a fix

cd /src/lams/lams-unix-patch-2.1.1

a) Read the "readme" file

b) Fix the script if you want (not really needed). Replace the line

du -chs $LAMS_DIR $JBOSS_DIR

with

du -hs $LAMS_DIR $JBOSS_DIR

3) Run the installer and answer questions. Since I did a fresh 2.1 install just minutes before I did not test any of the backup features. Didn't test the shutdown either.

bash install-lams-patch.sh 

4) Fix the startup script a bit, i.e. change line 1 with something like line 2

# nohup ./run.sh > /dev/null &
nohup /usr/local/jboss-4.0.2/bin/run.sh > /dev/null &

4) Test the new version

/usr/local/jboss-4.0.2/bin/run-lams.sh

Wait a while and/or play with:

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

Configuration of LAMS

Once your server is up and running, go to the Administration "Edit Configuration Settings":

1) Essential:

  • add email (e.g. yours)
  • add the smtp server (but you have to make sure that your institution lets machines post to it. There might be some anti-spam censorship). e.g.
mail.your_org.org

2) Uploaded files

  • I kept the defaults

3) LDAP

  • I am intrigued by this. It should not show since I didn't ask for it....
  • Basically I think that we will use LAMS only from Moodle ... and all our platforms should use LDAP but they don't ;)

4) Look and feel

  • I suggest making screen sizes a bit bigger (unless your students work with ultra-light portable computers)

5) Language

  • You can change the locale, e.g. for french, use:
fr_FR

Tweaking for production

(later)

Discussion / Problems

Compared to older LAMS installations and the 2.1RCx version, the 2.1 install + 2.1.1 patch install went rather flawlessly and the dec 2009 LAMS 2.2 installation was easy. There was nothing I had to fix for Solaris...

  • Only missing thing in the distribution is a /etc/init.d/ startup/shutdown script (later)

LAMS upgrade from 2.2 to 2.3.3 on Solaris

Preparation

Remark: LAMS knows where it is installed (file: /etc/lams2/lams.properties)

lams-unix-updater-2.3.tar.gz
lams-unix-patch-2.3.1.tar.gz
lams-unix-patch-2.3.2.tar.gz
lams-unix-patch-2.3.3.tar.gz

Unpack these like this in some source director, e.g. /src/lamgs (for each of these four archives)

gtar zxf lams-unix-patch-2.3.1.tar.gz

Make sure that your systems finds the Java that you used in version 2.2. E.g. in C Shell you might type:

setenv PATH /usr/local/jdk6/bin:$PATH
setenv JAVA_HOME /usr/local/jdk6
echo $JAVA_HOME
   /usr/local/jdk6
java -version
   java version "1.6.0_11"

Installation of LAMS 2.3 patch

(1) Go to the source dir

cd lams-unix-updater-2.3

(2) Use bash (and not sh) to launch the install script

bash update-lams.sh

..... answer the questions (in particular shut down LAMS and create a backup), then wait a few minutes

Note: there is a script error about a "du" flag, that you may ignore ...

(3) Run LAMS

pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh 
  • Wait a few minutes and then see if it runs, e.g. look at the log
tail /usr/local/jboss-4.0.2/server/default/log/server.log
  • check for a string like "JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:54s:54ms"
  • Continue with the next patch
popd

Install 2.3.1

(same principle as above)

cd lams-unix-patch-2.3.1
bash install-lams-patch.sh
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh 
tail /usr/local/jboss-4.0.2/server/default/log/server.log
popd

Install 2.3.2

(different install)

  • Stop LAMS first
pushd /usr/local/jboss-4.0.2/bin/
shutdown.sh --shutdown
tail /usr/local/jboss-4.0.2/server/default/log/server.log
popd
  • Copy all the files in the distro to JBOSS
cd lams-unix-patch-2.3.2/
cp -r * /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
  • Restart again
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh 

Install 2.3.3

(same principle as above)

  • Stop LAMS first
pushd /usr/local/jboss-4.0.2/bin/
./shutdown.sh --shutdown
tail /usr/local/jboss-4.0.2/server/default/log/server.log
popd
  • Copy files
cp -r lams.ear/* /usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
  • Destroy old working directories
rm -r /usr/local/jboss-4.0.2/server/default/work
rm -r /usr/local/jboss-4.0.2/server/default/tmp
  • Restart again
pushd /usr/local/jboss-4.0.2/bin/
./run-lams.sh 

... Enjoy. It now can speak french too. I caught up with all the missing labels since 2.something and also made an effort to test each tool. Btw. for LAMS 2.4 I'll try to have a quite perfect translation. For now, it's at least usable :)

Installation of add-ons

Mediaplayer

A mediaplayer is now integrated (no need for the flv player)

GMAP

You need to install an API Key to use this

DIMDIM
Video Recorder

Configuration settings

You may read the LAMS Configuration instructions again ...

Upgrade from 2.3.4 to 2.3.5

Upgrading script needs two fixes (SunOS 5.10), i.e. two options of du and cp don't exist under Solaris.

L237: du -s $LAMS_DIR $JBOSS_DIR L335: cp -pr assembly/lams.ear/* $EAR_DIR > log/update-files.log

Then type:

 bash update-lams.sh

... and answer questions.

Moodle - LAMS integration

For Moodle 3.x

As of May 19 2016, the plugin seems to be broken for Moodle 3.04. I will ask the LAMS team to fix this. There is no workaround as far as I can tell - Daniel K. Schneider (talk) 14:37, 19 May 2016 (CEST)

For Moodle 2.x

The Moodle-LAMS interface has completly changed for Moodle 2.x. It now is maintained by the LAMS team.

  • Read Moodle2 (look at children articles at the bottom !)

(1) Get the integration module from here:

Last time I checked for Moodle 2.4x (4/2013):

wget http://downloads.lamsinternational.com/2.4/integrations/moodle/20130123-lamslesson-moodle2.4.zip

(2) Unzip to the moodle/mod folder E.g. in our moodle/moodle/mod directory you will have:

drwxr-xr-x xxx yyy 4096 2011-03-28 19:36 lamslesson

(3) Install it

(4) Configuration on the LAMS side

http://your.moodle.server/moodle

(4) Configure on the Moodle side

After adding the lamslesson module moodle, you automatically should see the setup dialog. Since you likely will get it wrong the first time, try:

  • Site Administration->Plugins->Activity modules->LAMS lesson
  • LAMS server URL: http://...../:8080/lams/
  • Server ID: moodle
  • Server key: some_nicely_complex
  • Moodle Instance name: Your Moodle

(5) Fix the language pack

  • Grab the file
moodle/mod/lamslesson/lang/en/lamslesson.php
  • Save the result in the datadir or else use moodles translation interface
datadir/lang/fr/lamslesson.php
    • Keep a safe copy of this file somewhere. After some brutal upgrading it may just go away ....
  • Translate
    • And watch out for apostrophes !! E.g. a string like 'Il n'y a pas' won't do. Try "Il n'y a pas" instead for example.
  • Purge the cache
moodle/admin/purgecaches.php

For Moodle 1.x

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

The setup

  • Moodle 1.9.4+. It runs on one machine (tecfax.unige.ch)
  • LAMS runs on the same machine

I did manage to have LAMS 2.1 run on a different machine sometimes in the past.

Installing LAMS 2 Moodle module

First of all make sure that you do no skip step 4 below (you need the LAMS v2 module and not LAMS !). Btw. I wonder why the LAMS 1 module is still included with Moodle.

Installation:

  1. If you don't need to keep old data, remove the LAMS2 module in Moodle
  2. Download a new integrations package (it seems that fixes are made sometimes)
    • From here (click on the Integrations tab)
  3. Unzip the file (or directly unzip in moodle/mod/)
  4. Move the lamstwo directory to moodle/mod/
  5. Move the lamstwo.php file to moodle/lang/en_utf8/ (not anymore in newer versions - 12:04, 27 April 2010 (UTC))
    • Do not forget this one, else you'll see some strange labels in Moodle
  6. Move the lamstwo_status directory to moodle/blocks/
  7. Login as admin and go to http://yourmoodle/admin, LAMS tables will be created automatically, i.e. you will see typical Moodle upgrade message.

Configuration on the LAMS side

Note: There seems to be a bug. If you Disable Organization it will never come back. So don't tick this.

  • Go to "System Administration", then "Maintain integrated servers". click on edit. In particular: Make sure that you get the Moodle "user information" URL right and that all parameters match on both sides (be careful with "Moodle" vs. "moodle"!).
Id:           moodle
Key:          somethingsecret
Name:         moodle
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

Configuration on the Moodle Side

  • Go to Modules / Activities / and click settings for 'LAMS v2 module.

I used the following values:

server_url:     http://tecfax.unige.ch:8080/lams
server_id:      moodle
server_key:     somethingsecret
request_source: moodle

Validate and Save

Important notice
  • Do not remove the old lams module with Modules -> Activities -> Manage activities!!
  • If you do so, the LAMS permissions will be broken on Moodle. Only administrators could add LAMS TWO modules. More technically speaking the following two Moodle role capabilities will be gone:
Manage LAMS activities mod/lams:manage
Participate in LAMS activities mod/lams:participate 

... That mistake cost me two hours of work today (my edutech students who have to learn some LAMS authoring could only create LAMS activities in Moodle 1.9.4x, but the "Open authoring" and "Add new lesson" buttons were gone for them - Daniel K. Schneider 21:41, 9 March 2009 (UTC)

Test it

Get a pack from the lamscommunity. Three obvious choices are:

In Moodle you can add these in two steps:

1) "Add an activity"

Note: If you can't see anything happen, e.g. you just get this message and nothing else:

 Sequence

 The directory structure below contains the sequences you can create a lesson for.
 Select one and click on the next button to continue.

then you made a mistake in the configuration, e.g. the "user information" URL is wrong.

2) For this activity author and/or import LAMS lessons

To author a LAMS lesson click on "open authoring"

To import a LAMS lessons, also click on "open authoring", then inside LAMS:

  • File->Import
  • Then get it from your LAMS Workspace (it will not directly import to the LAMS stage)
  • File->Save
3) Then when you are back to Moodle, click on add lesson and pick your lesson or one of the imported ones.

Summary:

  • You can access LAMS from Moodle to author or import
  • You then can use "lessons" from your workspace in LAMS as part of a LAMS moodle activity (at least one "lesson" or "several".

Note: I believe that having "lessons" within a single Moodle LAMS activity is new since 2.2 or 2.1. Before that one Moodle LAMS activity only had one LAMS module inside if I remember right.

Moodle-LAMS trouble shooting

The Interface in Moodle is not obvious.

You may have to adjust timeouts and other stuff if your server load is high.

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 once)

Your JBOSS server may need more memory space allocated (see above)

Be careful about using several browser windows and tabs. The "system Administration" page will use an already opened window/tab. So if the "Sys Admin" link doesn't bring up the tool or complains about your role, etc. look for it on your desktop and close it. Maybe also log out and in again from your LAMS server if you just tested Moodle before.

If you tried a Moodle LAMS integration in the past with an older LAMS server, your MOODLE may have junk left inside. Replace all older Moodle LAMS integration code (as we actually pointed out above)

Only if you don't have activities in production:

  • delete the LAMS2 module in MOODLE.

In any case:

  • Remove all the the files in the moodle/mod/lamstwo directory
  • Reinstall a new version (downloaded fresh).

LAMS 2.2 Windows Vista + Wampserver

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 the LAMS server on windows you need to install other software.

Java
  • You need least Java JSE 5.0, not just the JRE (the runtime), you really need a JDK (developer kit). Get it from java.sun.com.
MySQL
  • The best bet is to 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 2.x since several people reported problems with these in the support forums. Anyhow, for myself I did use a WAMP anyhow, but if you do so too, don't complain...

MySQL

  • You should know where the mysql executables are. The LAMS installer will probably find them, but it is better to be informed. Because then you also can type MySQL commands, e.g. to fix database problems. On my machine, the WampServer/MySQL directory is here:
c:/soft/wamp/bin/mysql/mysql5.1.30/

And the binaries are here:

c:/soft/wamp/bin/mysql/mysql5.1.30/bin

Also there seems to be a missing table (probably this could be fixed with some command-line script and I think I did this with mysqlcheck, but I forgot sorry). But if it doesn't you have to add this table to the mysql table, e.g. with phpmyaadmin or on the command line:

CREATE TABLE 'servers' (
'Server_name' char(64) NOT NULL,
'Host' char(64) NOT NULL,
'Db' char(64) NOT NULL,
'Username' char(64) NOT NULL,
'Password' char(64) NOT NULL,
'Port' int(4) DEFAULT NULL,
'Socket' char(64) DEFAULT NULL,
'Wrapper' char(64) NOT NULL,
'Owner' char(64) NOT NULL,
PRIMARY KEY ('Server_name')
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COMMENT='MySQL Foreign Servers table';

Installing LAMS

Make sure that MySQL is up and running before you install LAMS. If you never fully reboot your machine, it's also good idea to do so now.

Then, click on the LAMS installer. It will ask several things and suggest defaults. E.g.

  • The database admin id and password. By default, most WAMP servers come configured without one, but that's not a safe ways to live.
  • The LAMS database name, database user and password
  • The LAMS administrator login and password

On my Laptop PC, LAMS installed ok, but did not manage to start up (trouble, see the fix below).

Running LAMS

  • Make sure that the LAMS port (8080) is free, e.g. install Active Ports or type something like netstat -a in a DOS terminal.
  • Then, if the "Start LAMS" script in the program menu gives an error message like this:
>>> MySQL does not appear to be running - please make sure it is running before starting LAMS
    • Make sure that MySQL is really running and available on the right port, e.g. type
(mysqldir)\bin\mysqladmin ping -h localhost -P 3306 -u root -p
    • If MySQL is running, then you have a problem. You can try to start the LAMS service manually (worked for me): Find the services panel (sorry I don't have an English Windows), but it should be something like: Configuration Panel->Administration tools->Services. Then, start the LAMSV2 service (click on it, then click on "start" or something similar on top left, or use the right-click menu).
  • Also pay attention to popup blockers in your navigator. LAMS worked fine with both IE 6 and Firefox 3.

Summary: LAMS 2.2 runs fine on my DELL XPS M1730 laptop with Vista professional and WampServer. But I only managed to get it working because I do have a vague idea on how computer systems and web software work. Beginners really should stick to advice from the official LAMS website and/or have it installed by someone on a real server.

LAMS 2.1x on On Solaris 10

Lams 2.0 was released on December 6 2006. Since then, there were very several minor upgrades. On March 2008, the current releases are 2.0.4 (stable) and 2.1 (RC1). These installation notes refers mostly to the 2.1RC1 install, but it should help with 2.0.4 too. Official LAMS instructions are a bit Linux centric and this is main reason why you might have a look at this. My notes also should work with older Solaris versions (just make sure to upgrade Java if needed and in this case to set the Java path).

First, read the instructions in:

Disclaimer: I am not a good sysadmin nor is it my idea of fun. This is not a manual, but just my private installation notes I am willing to share. - Daniel K. Schneider 18:30, 20 March 2008 (MET)

So, open a terminal under root ....

Prerequisite 0: Infrastructure

  • Make sure your organization doesn't stiffle your creativity with Firewalls. If they do, expect a lot of extrawork.
  • Also the 8080 port should be free. Some software like Skype just randomly take up ports. If you run an other server, read Changing Server Ports for LAMS
  • Hardware and OS: Any Windows, Linux, MacOS X, Solaris etc. machine will do since LAMS is programmed in JAVA. You just need some diskspace, substantial memory and a not too old JAVA. Also, you may have to adapt some scripts to your special unix brand.

Prerequisite 1: Java software

Java + ant

Solaris 10 ought to have the right Java + Ant installed. Ant is an installation program like make. Note: You need the JDK/JSE or whater Sun decided to rename it (i.e. the compiler, not just the runtime)

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.

Prerequisite 2: 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). You also may try to use an existing server that works with LAMS. I guess that there ought to be free servers you can use.

  • LAMS folks say to install an old 2.6.2. version. Links are available from the LAMS page, you won't find it at Ignite realtime. Note: I have to see whether this is still true, but for the moment I just complied.
  • Since this server is written in Java you can take the Mac OSX and others version (i.e. a tar ball).

Installation steps:

1) Uncompress in /usr/local/wildfire or some other place

2) Start the server with ./bin/wildfire start

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

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

http://localhost:9090/ 

Else use an URL like: http://yourhost.org:9090/ ... it should work I think. But do it as fast as possible since you have to set passwords and stuff.

  • Use "embedded database" if you want to make the install shorter, else you can set it up with mysql

The configuration process will ask you to 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), but you can do this later

4) Test it. You may want to install a jabber client, e.g. gajim (Ubuntu users can read an article on Jabber

5) Security: You may restrict login to given set of IP addresses or even disable account creation. Chat servers may be taken over by not so friendly people.

  • Edit Server Settings->Registration and Login

Installing wildfire should be easy, it was for me. It's a fairly popular product...

Prerequisite 3: Configure MySQL for LAMS

Here are the steps:

1) Make sure to have a MySQL 5.x server. Else install it (and come back)

2) Configure it according to the LAMS instructions, i.e. make changes to file my.cnf:

  • This cnf file may not exist (it wasn't in our binary distribution). Also, it can be in different locations
  • Type mysql --help to get a list of the places the MySQL server will look for this config file
  • So, create my.cnf if you don't have one. Start by copying a *.cfn model from /usr/local/mysql/share/mysql or some other place. I took my-medium.cnf.

Changes to make: file my.cnf should include these lines (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 do 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 like this: mysql -u root -p < input.sql or paste them into a tool like phpmyadmin.

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 lams.* TO lams@localhost IDENTIFIED BY 'your_secret_passwd'; 
REVOKE PROCESS,SUPER ON *.* from lams@localhost;

In case you use the command line tool, continue with quit

quit

Make sure to reload, e.g. on the command line, type:

mysqladmin -p reload

Now your database should be ready for LAMS.

Prerequisite 4: JBOSS

JBOSS is a Java application server. LAMS is programmed with this application framework.

  • Unpack into /usr/local (or wherever else you like it)
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 candidate, 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.

Pre-install configuration

(tested with LAMS 2.1 RC1)

0) Read the "readme" file you will find and/or again Unix Installation and Updating Help. It's authorized gospel, this wiki article is not...

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

2) Dezip the installer in some place, e.g. /src/lams

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 ! Basically there are three sections:

1) Related to installation

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

2) If you have the Open/wildfire chat server installed, make sure to specify the name of host machine, etc.

3) Installation settings again, I had to change nearly each line ! Make sure to have each line right.

Port number. If you change this, you also have to reconfigure JBOSS (I don't know where but it shouldn't be hard ...)

LAMS_PORT=8080

Server URL (certainly not localhost). E.g. you want something like:

SERVER_URL=http://tecfasun1.unige.ch:8080/lams/

Using the installer

(tested with LAMS 2.1 RC1)

If you did the above (editing lams.properties) alright, then make sure again that Java can be found. In principle, on Solaris systems this is the case and you can ignore instructions about setting the JAVA_HOME. To check, just type:

echo $JAVA_HOME

In a csh shell you may fix the path like this (if needed):

setenv PATH /usr/java/bin/:$PATH

In a Bash shell:

export PATH=/usr/java/bin/:$PATH

Then install, i.e. type:

./install-lams.sh

... most likely it won't work, read on.

RC2 install script does not work on Solaris

If it fails (with the one script I got it did), use debugging modes first, e.g.:

sh -x ./install-lams.sh
sh -v ./install-lams.sh
sh -vx ./install-lams.sh

Now to fix the RC1 problems:

1) First repair a bourne shell error, i.e. you either have to make the script a bash shell (best choice):

#!/usr/bin/bash

or alternatively make the following change (next best):

 # export JAVA_HOME=$ORIG_JAVA_HOME
must become
JAVA_HOME=$ORIG_JAVA_HOME
export JAVA_HOME

or just comment out the following lines (On Solaris 10 Java will be found):

# checkJava
....
# export JAVA_HOME=$ORIG_JAVA_HOME

2) Then there was Linux specific line to be fixed:

# cp -rv assembly/lams.ear ${DEFAULT_DIR}/deploy

cp -r assembly/lams.ear ${DEFAULT_DIR}/deploy

Success

You are successful when you see this:

LAMS 2.1-RC1 Configuration completed!
Please view the README for instructions on how to run LAMS.

Deploying and running LAMS

First time you will start up JBOSS it will take some time deploying LAMS as a web application.

There is a startup script you will find in the JBOSS/bin directory. It just configures JAVA for more memory and then launches the original run.sh script from JBOSS.

./usr/local/jboss-4.0.2/bin/run-lams.sh

This also will fail with RC1. Read on ...

Fixing the script

In 2.1RC2 I had to fix the script, or actually just use something different.

1) Missing shell identification. Add the following as first line:

#!/usr/bin/bash

Note: You have to use Bash not sh (/usr/bin/sh), since the LAMS folks use bash syntax. This line:

export JAVA_HOME="/usr/java"

is wrong in traditional Bourne shell. Should read:

JAVA_HOME="/usr/java"
export JAVA_HOME

2) There wasn't enough heap space E.g. from the log file (/usr/local/jboss-4.0.2/server/default/log/)

2008-03-20 11:26:15,574 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'coreSessionFactory' defined in class path resource
[org/lamsfoundation/lams/commonContext.xml]: Initialization of bean failed; nested
exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

I first doubled initial and max heap with no effect, something does not pass from this script to the next one.

# export JAVA_OPTS="-server -Xms256m -Xmx512m -XX:MaxPermSize=256m"
export JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:MaxPermSize=256m"

Or maybe JAVA_OPTS will have contradictory info like (a good sysadmin would try to dig and understand ...)

-server -Xms128m -Xms512m ...

Anyhow, I then just decided to modify the JBOSS start-up script and use it directly. Around line 141 of file run.sh I inserted more initial and max heap and I also took $JAVA_OPTS out since for some strange reason it already was set with unwanted -XMs .Xmx.

JAVA_OPTS="-Xms512m -Xmx768m -Dprogram.name=$PROGNAME"
#JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"

Notice about Memory: I found that with Moodle integration and about 10 simultaneous users, you need more that 1/2 Giga of memory. This what I had to configure to support a small classroom activity (about 12 students):

JAVA_OPTS="-server -Xms512m -Xmx1280m -Dprogram.name=$PROGNAME"

Start and stop LAMS

To start LAMS, go to the JBOSS bin directory:

cd /usr/local/jboss-4.0.2/bin/

Try first:

./run-lams.sh

If it doesn't work, fix heap space in the run.sh file directly (as explained above) and run it:

./run.sh &

To avoid getting all the traces in the terminal

./run.sh > /dev/null &

Then you should get this (e.g. last line in the log file). If not, search for errors.

2008-03-20 12:03:21,967 INFO  [org.jboss.system.server.Server] JBOSS (MX MicroKernel)
[4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:52s:938ms

To stop LAMS, just stop the JBOSS server. If it won't work, just kill the big hanging Java process.

./shutdown.sh -S

Always consult the log file when in doubt (the first time you start JBOSS it will take some time to install LAMS).

tail ../server/default/log/server.log

LAMS first test

If you you are here, then LAMS ought to run, e.g. try a URL like:

http://tecfasun1.unige.ch:8080/lams/

If you forgot the login name and password, you can retrieve it from

/src/lams/lams-unix-installer-2.1-RC1/lams.properties

Configuration

To be continued. Basically, I managed to get the MOODLE interface working (see below).

Discussion / Problems

  • I didn't use it in production so far. As next step I'll have my students create sequences. - Daniel K. Schneider 12:36, 25 March 2008 (MET)
  • Other people from TECFA played with it and it's still running after a few days.
  • JBOSS/LAMS requires quite a lot of memory (over 500MB residual memory and 800MB total size). This no problem on a big new server, but can be on an older server.

Legacy notes for a lams 2.0 Solaris install

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 for some quick playing ...

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 ?

Moodle - LAMS integration

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

Short installation summary (see the above guide)

I managed this to work with LAMS 2.1RC1. I did fail with an early LAMS 2.0 version - Daniel K. Schneider 18:30, 20 March 2008 (MET). The current setup is:

  • Moodle runs on one machine (tecfax.unige.ch)
  • LAMS runs on a different machine

I did not yet use LAMS in production so far. But I inserted the Beyond the VLE module through Moodle. I was able to:

  • Use with Moodle student ID's (test and test2)
    • not use with Moodle student ID's as monitor (that's correct)
  • Use it with Moodle admin ID as student and monitor
  • Chat did work.
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. Get a new file (it seems that fixes are made sometimes)
  2. Unzip the file
  3. Move the lamstwo directory to moodle/mod/
  4. Move the lamstwo.php file to moodle/lang/en_utf8/
  5. Login as admin and go to http://yourmoodle/admin, LAMS tables will be created automatically.
  6. 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:     somethingsecret
request_source: moodle
On the LAMS side
  • The integrated server setuhttp://wiki.lamsfoundation.org/display/lamsdocs/Homep is:
Id:           moodle
Key:          somethingsecret
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)

Be careful about using several browser windows and tabs. The "system Administration" page will use an already openend window/tab. So if the "Sys Admin" link doesn't bring up the tool, look for it...

If you tried a Moodle LAMS integration in the past with an older LAMS server, your MOODLE may have junk left inside. Get rid of it (see next item).

Problems

An error (for 2.1RC1) I was getting was:

 Could not add a new instance of lamstwo

This happened after validating a LAMS activity in Moodle. In older version of the LAMS/Moodle mod something was wrong, I believe a missing table.

To fix this

  • Delete the LAMS2 module in MOODLE.
  • Remove the files in the mod directory
  • Reinstall a new version (downloaded fresh).

LAMS 2.0 RC2 Windows XP PC

Note: This chapter is outdated (written in Dec 2006). I don't see really the point in running a LAMS server on a personal PC and our servers are Unix ! But since some of our students like to play with tech, I may update it some day .... - Daniel K. Schneider 16:54, 19 September 2008 (UTC)

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

  • Make sure that the LAMS port (8080) is free, e.g. install Active Ports or type something like netstat -a in a DOS terminal.
  • 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.