LAMS 2.1.1 - Learning Activity Management System Installer -------------------------------------------------------------------------------- This is an installer package for 2.1.1. Please read this document carefully before installing. Please also ensure that you have read and understood the terms of the license agreement. For release notes goto: http://wiki.lamsfoundation.org/display/lams/2.1.1 CONTENTS ======== 1) Required Software 2) Installation 3) Setting up MySql on a Different Server 4) Server Configuration 5) Startup and Shutdown 6) Using the Java Service Wrapper 7) Backing up LAMS 8) Web Resources and further help 1. Required Software ==================== You will require some software to be installed and/or running for LAMS to run properly. These are listed below JDK 1.5 or 1.6 JBOSS-4.0.2 (Must be 4.0.2, newer and older versions have problems running LAMS) MySql 5.0.x (Running) Wildfire (Running - Required if you want to use chat tools) ANT - Included in this package 2. Installation =============== There are a few steps to updating LAMS on your computer. Firstly you must set up a lams.properties file. If you previously installed lams using the unix installer, it will have backed up your lams.properties in the /etc/lams2/ directory. If your settings are unchanged, then simply run the updater and select yes when it asks you whether you want to use the lams.properties stored in /etc/lams2. Otherwise, you will need to edit the lams.properties in the root directory of the update package yourself. Open the lams.properties file in a text editor and follow the instructions to alter the settings. The default settings are in the lams.properties file already so you need not change a lot. Pay particular attention to the Installation Options section and the Essential settings section. Once you have finished editing lams.properties file you are ready to run the update script. Go to the root directory of the package and type: > sudo ./install-lams-patch.sh 3. Setting up MySql on a Different Server ========================================= If you wish to use a separate server for your MySql database, there are a few steps to follow. Firstly, you need to create the database and user on the MySql server. For this example we will use the MySql host IP "111.111.111.11", the database name "lams", the database user "user" and the password "pass". These correspond to the MYSQL_HOST, DB_NAME, DB_USER and DB_PASS fields in lams.properties, you should change them to match your own. Start the MySql command line on your MySql server and type the following: mysql> SET FOREIGN_KEY_CHECKS=0; mysql> DROP DATABASE IF EXISTS lams; mysql> CREATE DATABASE lams DEFAULT CHARACTER SET utf8; mysql> SET FOREIGN_KEY_CHECKS=1; mysql> GRANT ALL PRIVILEGES ON *.* TO user@111.111.111.11 IDENTIFIED BY 'pass'; mysql> REVOKE PROCESS,SUPER ON *.* from user@111.111.111.11; Finally, you have to grant remote permission to this user. Still in Mysql command line, type the following: mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'pass'; This user now has remote access to the database, you can continue with the installation. For more help on setting up MySql on a separate server, go to: http://wiki.lamsfoundation.org/display/lamsdocs/Moving+MySQL+to+another+Server 4. Production Server Configuration ============================ For single user installations, (i.e. personal use on your desktop), please ignore this section - LAMS should run fine using the default settings. You may need to increase the limit for database connections, this can be done at (jboss directory)/server/default/deploy/mysql-ds.xml. Set the max-pool-size option to what you want, but it must be less than or equal to the max connections in mysql-Xms If your server starts reporting out of memory errors in the JBoss server.log file, you may need to increase the JVM memory settings for your server. This can be altered in the (jboss directory)/bin/run-lams.sh script. More information can be found at: http://wiki.lamsfoundation.org/display/lamsdocs/Production+Server+Settings 5. Startup and Shutdown ======================= To start LAMS 2.1 go to (jboss directory)/bin and type: >sudo ./run-lams.sh After a couple of minutes LAMS 2.1 will have started. In your browser type the server URL that you specified in the lams.configuration file, and you should be at the lams homepage. To shutdown LAMS 2.1 go to (jboss directory)/bin and type; > sudo ./shutdown.sh -S LAMS 2.1 will take a few moments to shut down. To check if LAMS 2.1 has shut down correctly, type the following on Linux: > ps -ef | grep java Or type the following on Macintosh > ps -A | grep Java If you aren't sure which version of 'ps' to use, try the '-ef' version and if that gives and error 'ps: illegal option --f" then try the -A version. If you can see the LAMS 2.1 process still running, type: > sudo kill (pid) Where pid is the process id listed next to the LAMS 2.1 process Be careful to type the correct (pid). If you type the wrong number, you will stop another process on your server, and as you are using sudo you could stop an important process! 6. Using the Java Service Wrapper ================================ If the wrapper installed correctly, LAMS will start automatically when you boot your machine and stop when you turn off your machine. You can also start and stop LAMS manually by going to the jboss-4.0.2/bin directory and using these commands. > sudo ./lams2 start (starts LAMS) > sudo ./lams2 console (start LAMS in current shell, to stop do ctrl+C) > sudo ./lams2 stop (stops LAMS) > sudo ./lams2 restart (restarts LAMS) > sudo ./lams2 status (tells you if LAMS is currently running) > sudo ./lams2 dump (send a kill -3 signal to the wrapper causing the JVM to do a full thread dump) For more information about using the Java Service Wrapper with LAMS, go to wiki.lamsfoundation.org/display/lamsdocs/Setup+Java+Service+Wrapper+for+LAMS 7. Backing up LAMS ================== To backup your LAMS installation manually, simply follow the following steps 1) Backup your jboss-4.0.2 directory where LAMS is installed (/usr/local/jboss-4.0.2 by default) 2) Backup your uploaded file repositories (/var/opt/lams by default) 3) Backup /etc/lams2 4) Dump the database by executing the following command. Fill in your own backup directory /mysqldump -u -p > /dump.sql 8. Web Resources ================ Unix Installer help wiki http://wiki.lamsfoundation.org/display/lamsdocs/Unix+Installer+Help Backing up LAMS and reverting LAMS http://wiki.lamsfoundation.org/display/lamsdocs/Revert+To+Other+Backup LAMS 2.1.1 developer-oriented information http://wiki.lamsfoundation.org/display/lams LAMS 2.1.1 help documents http://wiki.lamsfoundation.org/display/lamsdocs Educational and technical forums for help and discussion http://www.lamscommunity.org LAMS 2.1.1 bug tracker http://bugs.lamsfoundation.org LAMS Foundation http://www.lamsfoundation.org