LAMS 2.2 - Learning Activity Management System Installer -------------------------------------------------------------------------------- This is an installer package for 2.2. 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.2 CONTENTS ======== 1) Required Software 2) Installation 3) Languages and Locales 4) Setting up MySql on a Different Server 5) Server Configuration 6) Startup and Shutdown 7) Using the Java Service Wrapper 8) Backing up LAMS 9) 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 installing LAMS on your computer. Firstly make sure you have all the required software installed on your computer. You will need to make sure that MySql is running. Next, you need to edit the lams.properties file (located in the root directory of the package) to comply with the settings you want for your computer. 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. Before you run the script, you need to ensure that your $JAVA_HOME is set to your java 1.5 or higher directory, also you will need to set the $PATH variable to include the path to the java binaries. The steps to do this are listed below. > JAVA_HOME="(path to java installation directory)" > export JAVA_HOME > PATH="(path to java bin directory):$PATH" > export PATH Once you have finished editing lams.properties file you are ready to run the install script. Go to the root directory of the package and type: > sudo ./install-lams.sh Follow the prompts in the install script. The installer will ask you if you wish to set up lams as a service, this will make lams start automatically each time you boot your machine. The installer will attempt to detect the wrapper jar that is suitable for you, if it cannot you can choose the wrapper that is the closest to suiting your architecture, or follow the instructions at: http://wiki.lamsfoundation.org/display/lamsdocs/Setup+Java+Service+Wrapper+for+LAMS to set up the wrapper manually. You can find out your architecture types by typing > uname -a to get all the information > uname -m to get the architecture type wrapper-linux-ppc-64-3.2.3 Linux PPC wrapper-linux-x86-32-3.2.3 Linux i386 wrapper-linux-x86-64-3.2.3 Linux IA64 NOTE: If you are installing a production server, It is strongly recommended that you remove the jmx-console web applications as they can be a security risk. To do so, remove the jboss-4.0.2/server/default/management directory and the jboss-4.0.2/server/default/jmx-console.war directory. 3. Languages and Locales ======================== In LAMS you can set the default language of your server to be one of many languages, and more to come, see http://lamscommunity.org Look out for UNIX language packs to add to your list of language locales The locale options for LAMS available are listed below, simply put in your lams.properties file (under Installation Options): LOCALE - (locale) LOCALE_DIRECTION - (locale direction) LaLanguage Locale Locale Direction ------------------------------------------------ English (Australia) en_AU LTR Español (Spanish) es_ES LTR Deutsch (German) de_DE LTR 简体中文 (Chinese Simplified) zh_CN LTR Français (French) fr_FR LTR Italiano (Italian) it_IT LTR Norsk (Norwegian) no_NO LTR Svenska (Swedish) sv_SE LTR 한국어 (Korean) ko_KR LTR Polski (Polish) pl_PL LTR Português (Portuguese Brazil) pt_BR LTR Tiếng Việt (Vietnamese) vi_VN LTR Chinese (Taiwan) zh_TW LTR Arabic (عربي) (Jordan) ar_JO RTL Ελληνικά (Greek) el_GR LTR 日本語 (Japanese) ja_JP LTR Malay (Malaysian) ms_MY LTR Русский (Russian) ru_RU LTR Türkçe (Turkish) tr_TR LTR 4. 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 5. 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 6. Startup and Shutdown ======================= To start LAMS go to (jboss directory)/bin and type: >sudo ./run-lams.sh After a couple of minutes LAMS 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 go to (jboss directory)/bin and type; > sudo ./shutdown.sh -S LAMS will take a few moments to shut down. To check if LAMS 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 process still running, type: > sudo kill (pid) Where pid is the process id listed next to the LAMS 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! 7. 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 8. 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 9. 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 developer-oriented information http://wiki.lamsfoundation.org/display/lams LAMS help documents http://wiki.lamsfoundation.org/display/lamsdocs Educational and technical forums for help and discussion http://www.lamscommunity.org LAMS bug tracker http://bugs.lamsfoundation.org LAMS Foundation http://www.lamsfoundation.org