|
|
(90 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| {{incomplete}} | | {{incomplete}} |
| <pageby nominor="false" comments="false"/> | | <!-- <pageby nominor="false" comments="false"/> --> |
| == Definition == | | == Definition == |
|
| |
|
| This page contains installation tips for a '''fresh''' install of [[LAMS]]. Mostly LAMS 2.2 for Solaris 10. | | This page contains installation tips for a '''fresh''' install of [[LAMS]]. |
|
| |
|
| LAMS is a JAVA/JBOSS-based application and needs some installation skills on Windows and good installation skills for Unix. | | LAMS is a JAVA/JBOSS-based application and needs some installation skills on Windows and good installation skills for Unix. |
|
| |
|
| Note: I put the legacy stuff in the [[Talk:LAMS_installation_and_configuration|discussion page]], e.g. LAMS 2.1RC for Solaris | | Note: I put the legacy stuff in the [[Talk:LAMS_installation_and_configuration|discussion page]], e.g. LAMS 2.x for Ubuntu, LAMS 2.1RC for Solaris |
|
| |
|
| == LAMS 2.2 on Solaris == | | == LAMS 4.5+ == |
| | As of July 2021, LAMS 4.5 was released and is the latest stable release. |
|
| |
|
| 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.
| | === Getting the LAMS source code === |
| | Source code is available from [https://github.com/lamsfoundation/lams Github]. The code branch to use is v4.5 |
|
| |
|
| 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.
| | '''Required software''' |
| | * Git |
| | * Wildfly 14.0.1 |
| | * OpenJDK 11 |
| | * MySQL 8.0 |
| | * Ant (Java task compiler) |
|
| |
|
| First, read the instructions in:
| | ==== OpenJDK 11 ==== |
| * [http://wiki.lamsfoundation.org/display/lamsdocs/Unix+Installer+Help Unix Installation and Updating Help] (if you plan to use the Unix installer)
| | In Debian/Ubuntu 20.04 |
| * [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.
| | $ sudo apt install openjdk-11-jdk-headless |
| | $ sudo apt install fontconfig |
| | ==== MySQL 8.0 DB ==== |
|
| |
|
| 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)
| | $ wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb |
| | $ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb |
| | $ sudo apt update |
| | $ sudo apt install mysql-server |
| | $ sudo mysql_secure_installation |
|
| |
|
| I got this machine and OS:
| | ===== Basic MySQL configuration ===== |
| SunOS tecfax.unige.ch 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Fire-V240
| | ''/etc/mysql/mysql.conf.d/mysqld.cnf'' |
|
| |
|
| So, open a terminal under root ....
| | ... |
| | # LAMS stuff |
| | explicit_defaults_for_timestamp |
| | character-set-server = utf8mb4 |
| | collation-server = utf8mb4_unicode_ci |
| | transaction-isolation=READ-COMMITTED |
| | sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" |
| | max_allowed_packet=32M |
| | # Record slow queries |
| | slow_query_log = 1 |
| | slow_query_log_file = /var/log/mysql/mysql-slow.log |
| | long_query_time = 10 |
| | |
| | [mysqldump] |
| | default-character-set=utf8mb4 |
| | hex-blob=1 |
| | single-transaction=1 |
| | quick=1 |
| | ... |
|
| |
|
| === Download and checksum ===
| | After installing MySQL, create a user and a DB for LAMS and grant appropriate permissions: |
|
| |
|
| 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)
| | DROP DATABASE IF EXISTS lams; |
| | CREATE DATABASE lamsdb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
| | SET FOREIGN_KEY_CHECKS=1; |
| | GRANT ALL PRIVILEGES ON lamsdb.* TO lamsdbuser@localhost IDENTIFIED BY 'real_secret_pw'; |
| | REVOKE SUPER ON *.* from lamsdbuser@localhost; |
|
| |
|
| 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 ....
| | ==== Wildfly 14.0.1 ==== |
|
| |
|
| 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:
| | $ wget https://download.jboss.org/wildfly/14.0.1.Final/wildfly-14.0.1.Final.tar.gz |
| md5sum lams-unix-installer-2.2.tar.gz
| | $ cd /opt/lams |
| And then compare the number that will show like this with the one on the download page:
| | $ tar xvzf wildfly-14.0.1.Final.tar.gz |
| 2f29d60147bf1328d3a044a66ea8b083 lams-unix-installer-2.2.tar.gz | |
|
| |
|
| === Prerequisite 0: Infrastructure === | | ==== LAMS source code pre-compilation ==== |
| | LAMS is open source and its code is available from [https://github.com/lamsfoundation/lams GitHub]<syntaxhighlight lang="bash"> |
| | git clone https://github.com/lamsfoundation/lams.git |
| | </syntaxhighlight>By default branch is LAMS' latest stable release as of July 2021, that's version 4.5. If you need a previous branch, see [https://github.com/lamsfoundation/lams/branches other branches available]. |
|
| |
|
| * Make sure your organization doesn't stifle your creativity with Firewalls. If they do, expect '''a lot''' of extra work.
| | Wherever you have your LAMS v4.5 code, edit the following files |
| * 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 ===
| | '''common.properties''' |
|
| |
|
| ; Java + ant
| | Primarily the DB settings and based system. |
|
| |
|
| 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)
| | If you are building LAMS using Windows, set the osPropertiesName to "windows" instead of "unix". |
|
| |
|
| Check if Java can be found, i.e. type:
| | ... |
| java -version | | #======== DATABASE PROPERTIES ========= |
| ... 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. | | db.host=localhost |
| | db.port=3306 |
| | db.name=lamsdb |
| | db.username=lamsdbuser |
| | db.password=real_secret_pw |
| | ... |
| | osPropertiesName=unix |
| | ... |
|
| |
|
| 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.
| | ''If you are building LAMS in a unix based system, then change the file '''unix.properties.''' If you are using Windows, then change the '''windows.properties''' file instead.'' |
|
| |
|
| 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/
| | '''unix.properties''' |
|
| |
|
| 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.
| | Here you will need to figure a path to the content repository |
| | contentrepository.base=/var/opt/lams |
|
| |
|
| cd /usr/local
| | The path to your Wildfly folder |
| mv /path_where_you_put_it/jdk-6u11-solaris-sparc.sh .
| | server.home=/usr/local/wildfly-14.0.1/ |
| 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 | | contentrepository.base=/var/opt/lams |
| Should show:
| | ... |
| java version "1.6.0_11"
| | server.home=/opt/lams/wildfly-14.0.1/ |
| 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.
| | ==== Compilation and deployment ==== |
|
| |
|
| === Prerequisite 2: Wildfire ===
| | cd lams_build |
| | ant deploy-lams |
|
| |
|
| This is a [http://en.wikipedia.org/wiki/Xmpp XMPP] (Jabber) chat server, that actually is called Openfire now. See:
| | If no errors occurred, you are ready to start Wildfly. |
| * [http://wiki.lamsfoundation.org/display/lamsdocs/Installing+Wildfire+for+LAM 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.
| | cd /opt/lams/wildfly-14.0.1/bin |
| * 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.
| | ./standalone.sh |
| * 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
| | LAMS should be available at localhost:8080/lams/ |
| gtar zxf wildfire_2_6_2.tar.gz | |
|
| |
|
| 2) Start the server with ''./bin/wildfire start''. You should see:
| | By default, LAMS has a set of preconfigured users: |
| testing JVM in /usr ...
| | {| class="wikitable" |
| Starting wildfire
| | |+Default Users |
| * This is a typical startup script. You later can copy this script to /etc/init.d/ etc.
| | !user |
| | !password |
| | !role |
| | |- |
| | |sysadmin |
| | |sysadmin |
| | |System administrator |
| | |- |
| | |test1 |
| | |test1 |
| | |Teacher, student, tutor |
| | |- |
| | |test2 |
| | |test2 |
| | |Teacher, student, tutor |
| | |- |
| | |test3 |
| | |test3 |
| | |Teacher, student, tutor |
| | |- |
| | |test4 |
| | |test4 |
| | |Teacher, student, tutor |
| | |} |
| | Of course, you can create and import users and courses into LAMS at any time from the sysadmin menu. |
|
| |
|
| 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.
| | (OPTIONAL) Wildfly comes with a ton of libraries that LAMS does not use. So to slim Wildfly to only use the libs that LAMS uses, please run the following ant task in the lams_build folder: <syntaxhighlight lang="bash"> |
| http://localhost:9090/
| | ant slim-standalone |
| Else use an URL like: http://yourhost.org:9090/
| | </syntaxhighlight> |
| 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
| | == LAMS 3.1 == |
|
| |
|
| 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.
| | As of March 2019, we do have a new LAMS installation that works fine in virtual server running Ubuntu 18.x. |
|
| |
|
| * Tick "Don't Show History" (Group Chat -> History Settings), but you can do this later | | * [https://github.com/lamsfoundation/lams Github] |
| | * [https://wiki.lamsfoundation.org/display/lams/LAMS+3.1+in+Ubuntu Quick compile guide for Ubuntu] |
|
| |
|
| 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]
| | However, I do not feel doing system administration anymore (except for this wiki) and I asked our systems person to do it. So there is not documentation, sorry. |
|
| |
|
| 5) Security:
| | Lams Moodle integration. There are two types of integration. |
| 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.
| | * LAMS - Moodle integration with a Moodle plugin. |
| * Edit Server -> Server Settings-> Registration and Login | | * [[IMS Learning Tools Interoperability|LTI]] integration, i.e. Moodle can "consume" LAMS contents |
|
| |
|
| Installing wildfire should be easy, it was for me. It's a fairly popular product...
| | === LTI external tool integration === |
|
| |
|
| === Prerequisite 3: Configure MySQL for LAMS ===
| | Documentation |
| | * [https://docs.moodle.org/36/en/External_tool_settings External tool settings] (Moodle 3.6 manual). |
| | * [https://wiki.lamsfoundation.org/display/lams/Integrations Integrations] (LAMS documentation). |
|
| |
|
| Here are the steps:
| | An administrator can manually configure external tools in Site administration > Plugins > Activity modules > External tool> Manage tools so that they are available across the site. |
|
| |
|
| 1) Make sure to have a MySQL '''5.x''' server. Else install it (and come back)
| | === Moodle LAMS integration through a Moodle plugin === |
|
| |
|
| 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: | | * We did that with LAMS 2.5. To be tested with LAMS 3.0. There is a [https://wiki.lamsfoundation.org/display/lams/Integrations plugin for download] and the method should be the same. |
| * 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):
| | == LAMS 3.0 == |
|
| |
|
| [mysqld]
| | As of November 2018, the current system is LAMS 3.x. You can test this with a [https://demo.lamsfoundation.org/lams/ demo version]. '''Below, we started documenting an installation on Ubunt 18x, but we did not find time to complete the installation'''. As you can see something went wrong. Instead, we installed LAMS 3.1 on a virtual server machine. |
| ....
| |
| transaction-isolation=READ-COMMITTED
| |
| sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
| |
|
| |
|
| Then restart MySQL !
| | '''History''' |
|
| |
|
| 3) Create a LAMS database (optional)
| | LAMS 2.5 was initially promised for 2014. Then, after a funding cut, the LAMS team was mostly disbanded and the core team found a new "home" in Singapour. Sometimes in 2016 the version number was changed to LAMS 3.0. |
|
| |
|
| This step is '''not needed''', the installation script will do it
| | '''Status as of Nov 2018''' |
|
| |
|
| 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.
| | * The old LAMS community pages are still online, but no longer maintained. |
|
| |
|
| REVOKE ALL PRIVILEGES ON * . * FROM 'lams'@'localhost';
| | * LAMS 3.x it is available on [https://github.com/lamsfoundation/lams Github], but documentation is lacking. Also, there is no installer. You will have to install and configure like in the "good" old times .... |
| REVOKE GRANT OPTION ON * . * FROM 'lams'@'localhost';
| | ** LAMS 3.x will run under old 8.2.1 version of [http://wildfly.org/downloads/ Wildfly], formerly JBoss (?). E.g. see [https://www.howtoforge.com/tutorial/ubuntu-wildfly-jboss-installation/ How to install WildFly (JBoss) Java Application Server on Ubuntu 18.04]. |
| | ** Create a MySQL database |
| | ** Build the system with ANT |
|
| |
|
| Then add these just for the lams database
| | * https://demo.lamsfoundation.org/lams/ does run a 3.x demo version for which you can require a login. |
| GRANT ALL PRIVILEGES ON `lams` . * TO 'lams'@'localhost' WITH GRANT OPTION ;
| |
|
| |
|
| === Prerequisite 4: JBOSS ===
| | * LAMS 3.x is available as commercial offering through [https://www.lamsinternational.com/ Lams International] and also through content services (to be verified). |
|
| |
|
| 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)
| | === Prerequisites === |
| gtar xzf jboss-4.0.2.tar.gz -C /usr/local
| |
|
| |
|
| * Copy some jar files
| | ;Java |
| cp /usr/local/jboss-4.0.2/server/all/lib/jboss-cache.jar /usr/local/jboss-4.0.2/server/default/lib/
| | : Usually, this is installed. Check it. In principle, the Open JDK should work, however we do not know if that is true for older version. If it does not (we have to test) this, then it should be replaced with Oracle one. '''This is very likely the case'''. |
| 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 | | java -version |
| | gives something link: |
| | openjdk version "10.0.2" 2018-07-17 |
| | OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1) |
| | OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode) |
|
| |
|
| 3) You should kill older lams data and config directories and/or make a backup, e.g.
| | Installation did not work with java 11, so I tried '''OpenJDK version 8'''. If you don't have Java 8 (it already was on my system), install it first. |
| 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
| | udo apt install openjdk-8-jdk |
| do it for you (see below).
| |
| # JAVA_OPTS="-server -Xms512m -Xmx512m -XX:MaxPermSize=512m" | |
|
| |
|
| The just test it once, execute:
| | To use Java 8 by default, you can do the following. Most software seems to use Java 8 anyhow .... |
| /usr/local/jboss-4.0.2/bin/run.sh & | | sudo update-alternatives --config java |
|
| |
|
| 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:
| | ;SASS (some kind of CSS pre-processor) |
| http://xxxx.yyy.zz:8080/ | | sudo apt install sass |
|
| |
|
| Then kill it, execute:
| | ;Ant |
| /usr/local/jboss-4.0.2/bin/shutdown.sh --shutdown | | sudo apt install ant |
|
| |
|
| === Edit the installer configuration file ===
| | ;If exists, stop your old LAMS, e.g. |
| | : /etc/init.d/lams2 stop |
|
| |
|
| Go to the lams-unix-installer directory, e.g. ''/src/lams/lams-unix-installer-2.2/''
| | === Kill old LAMS === |
|
| |
|
| cp lams.properties lams.properties.ORI
| | We did not try to upgrade an old LAMS installation since we did not have many sequences that were worthwhile keeping and since there are no instructions on how to do this. So, export sequences that are worth keeping ... |
|
| |
|
| I did the following (roughly)
| | ; Remove the startup script for old lams (or similar if it exists) |
| | grep -R lams /etc |
| | : For example |
| | rm /etc/rc6.d/K02lams2 |
| | rm /etc/rc5.d/S02lams2 |
| | rm /etc/rc4.d/S02lams2 |
| | rm /etc/rc3.d/S02lams2 |
| | rm /etc/rc2.d/S02lams2 |
| | rm /etc/rc1.d/K02lams2 |
| | rm /etc/rc0.d/K02lams2 |
|
| |
|
| ; Installation Options on top of the file
| | === Install and configure Wildfly === |
| | |
| 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 !)
| | # cd /src |
| | | wget http://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.tar.gz |
| LAMS_PORT=8080
| | tar xvfz wildfly-8.2.1.Final.tar.gz |
| # 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.
| | sudo mv /src/wildfly-8.2.1.Final /opt/wildfly |
| ./run-lams.sh | | sudo chown you:you /opt/wildfly |
| | cd /opt/wildfly |
| | more README.txt |
|
| |
|
| Then, wait some time (a few minutes) and check the server log from time to time
| | #Now test |
| tail /usr/local/jboss-4.0.2/server/default/log/server.log | | cd /opt/wildfly/bin |
| | ./standalone.sh |
| | # If your X server works and if you got Firefox installed on the server machine |
| | firefox --new-instance |
| | http://localhost:9990 |
|
| |
|
| If you see this in the log file:
| | === Create a new MySQL database and user === |
| 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 :)
| | (1) Check what you got |
|
| |
|
| Check the URL, e.g.
| | mysqlshow -p -u root |
| 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 !).
| | (2) Create a new database and user |
| | |
| | mysql -u root -p |
| | and copy/paste an adapted version of the following |
| | <source lang="sql"> |
| | DROP DATABASE IF EXISTS lams3; |
| | CREATE DATABASE lams3 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
| | SET FOREIGN_KEY_CHECKS=1; |
| | GRANT ALL PRIVILEGES ON lams3.* TO lams@localhost IDENTIFIED BY 'real_secret_pw'; |
| | REVOKE PROCESS,SUPER ON *.* from lams@localhost; |
| | </source> |
|
| |
|
| === Trouble shooting === | | After aborting wildfly you can run intot the following type of error (see also [https://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/message-view?message_id=1069554 this], dated 07/14/10) |
| | /opt/wildfly/bin$ 18:25:34,136 INFO [JdbcMigrationLauncher] If this isn't from a long-running patch, but a stale lock, either: |
| | 18:25:34,136 INFO [JdbcMigrationLauncher] 1) run MigrationTableUnlock (probably 'ant patch.unlock') |
| | 18:25:34,136 INFO [JdbcMigrationLauncher] 2) set the lockPollRetries property so the lock times out |
| | 18:25:34,136 INFO [JdbcMigrationLauncher] (this is dangerous in combination with long-running patches) |
| | 18:25:34,136 INFO [JdbcMigrationLauncher] 3) set the 'patch_in_progress' in the patches table to 'F' |
|
| |
|
| For installation/startup trouble, look at the log files:
| | In the LAMS DataBASE, run the following SQL |
| | update patches set patch_in_progress = "F"; |
|
| |
|
| Directory:
| | === Dowload, configure and build LAMS === |
| /usr/local/jboss-4.0.2/server/default/log/
| |
|
| |
|
| If you forgot the admin login/ password:
| | In order to find these files again, we decided to put them in /opt but any place can do. |
| * It's in the configuration file
| |
| /etc/lams2/lams.properties
| |
|
| |
|
| LAMS wont respond after some time
| | sudo chown you:your_group /opt/lams |
| * 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:
| | cd /opt/ |
| /usr/local/jboss-4.0.2/bin/run.conf | | git clone https://github.com/lamsfoundation/lams.git |
| /usr/local/jboss-4.0.2/bin/run-lams.sh | |
|
| |
|
| Some LAMS links will redirect to "localhost" on a server installation
| | '''Edit the configuration files''' |
| * 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 ===
| | cd /opt/lams/lams_build |
| ('''ignore''' for 2.2)
| |
|
| |
|
| 1) Shutdown the jboss server:
| | * Make a copy of the *.properties files just be sure. In addition, do not change the properties files themselves since they may be overridden by upgrades. Put them into a file called build.properties. |
|
| |
|
| /usr/local/jboss-4.0.2/bin/shutdown.sh --shutdown | | Change common.properties: |
| | db.host=localhost |
| | db.port=3306 |
| | db.name=lams3 |
| | db.username=lams..... |
| | db.password=real_secret.... |
|
| |
|
| To see if it's down:
| | Change file unix.properties: |
| tail /usr/local/jboss-4.0.2/server/default/log/server.log | | # Maybe not the best place for you, but at TECFA we always create a /data directory for data that must be kept, e.g. portalware, web server files, etc. |
| | contentrepository.base=/data/lams |
|
| |
|
| 2) Read the doc and make a fix
| | #JBoss deploy directory (Unix) |
| | server.home=/opt/wildfly |
|
| |
|
| cd /src/lams/lams-unix-patch-2.1.1 | | #Sass executable. |
| | sass_exec_file=/usr/bin/sass |
|
| |
|
| a) Read the "readme" file
| | '''Copy the properties to file''' <code>build.properties</code> |
|
| |
|
| b) Fix the script if you want (not really needed). Replace the line
| | '''Build LAMS''' |
| 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.
| | It is not clear to me if one should build various components. In principle, lams-cruise alone should do the trick. |
|
| |
|
| bash install-lams-patch.sh | | # go to the build directory |
| | cd /opt/lams/lams_build |
|
| |
|
| 4) Fix the startup script a bit, i.e. change line 1 with something like line 2
| | # Optional: build some stuff |
| # nohup ./run.sh > /dev/null & | | ant build-db |
| nohup /usr/local/jboss-4.0.2/bin/run.sh > /dev/null & | | ant deploy-ear |
| | ant deploy-tools |
|
| |
|
| 4) Test the new version
| | # build lams (ant will read the build.xml file and "cruise" is a "target" that should build the whole thing) |
| | ant lams-cruise |
|
| |
|
| /usr/local/jboss-4.0.2/bin/run-lams.sh | | At the end you should see something like: |
| | lams-cruise: |
| | BUILD SUCCESSFUL |
| | Total time: 3 minutes 35 seconds |
|
| |
|
| Wait a while and/or play with:
| | Now, in principle, LAMS is deployed in the Wildfly sever and could launch it again. |
| tail /usr/local/jboss-4.0.2/server/default/log/server.log
| |
|
| |
|
| === Configuration of LAMS === | | === Compilation errors with OpenJDK 11 === |
|
| |
|
| Once your server is up and running, go to the Administration "Edit Configuration Settings":
| | Some library is missing with openjdk '''11''' and something else is wrong. I did not get these errors with Openjdk 8, but then I might have installed some extra libraries in the past. I cannot remember. |
|
| |
|
| 1) Essential:
| | [echo] LAMS Common: Compiling Java sources |
| * add email (e.g. yours)
| | [javac] Compiling 469 source files to /opt/lams/lams_common/build/classes/java |
| * 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.
| | [javac] warning: [options] bootstrap class path not set in conjunction with -source 8 |
| mail.your_org.org
| | [javac] /opt/lams/lams_common/src/java/org/lamsfoundation/lams/policies/dao/hibernate/PolicyDAO.java:22: error: package com.sun.webkit does not exist |
| | [javac] import com.sun.webkit.PolicyClient; |
| | [javac] ^ |
| | [javac] Note: Some input files use or override a deprecated API. |
| | [javac] Note: Recompile with -Xlint:deprecation for details. |
| | [javac] Note: Some input files use unchecked or unsafe operations. |
| | [javac] Note: Recompile with -Xlint:unchecked for details. |
| | [javac] 1 error |
| | [javac] 1 warning |
|
| |
|
| 2) Uploaded files
| | === Test running LAMS with WildFly === |
| * I kept the defaults
| |
|
| |
|
| 3) [[LDAP]]
| | Make sure that the port that you plan to use with WildFly is free. By default the standalone server version is port 8080. |
| * 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
| | #Now test |
| * I suggest making screen sizes a bit bigger (unless your students work with ultra-light portable computers)
| | cd /opt/wildfly/bin |
| | ./standalone.sh |
|
| |
|
| 5) Language
| | This will take some time since it will have to digest LAMS. |
| * You can change the locale, e.g. for french, use:
| |
| fr_FR
| |
|
| |
|
| === Tweaking for production ===
| | # If your X server works and if you got Firefox installed on the server machine you can see something on the server. |
| | firefox --new-instance |
| | http://localhost:8080 |
|
| |
|
| (later)
| | '''Shutting down the test server''' |
|
| |
|
| === Discussion / Problems ===
| | * CTRL-C in the console |
|
| |
|
| 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...
| | Else if you ran it as background process: |
| | | jboss-cli.sh --connect --command=:shutdown |
| * 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 ...
| |
| | |
| == Moodle - LAMS integration ==
| |
| | |
| 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/
| |
| #* 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.
| |
|
| |
|
| == Documentation and using LAMS == | | == Documentation and using LAMS == |
|
| |
|
| This page is not a resource for end users like course designers or learners. See: | | '''Attention''': This wiki page is not a resource for end users like course designers or learners. Instead see: |
|
| |
|
| * [http://wiki.lamsfoundation.org/display/lamsdocs/Home LAMS documentation Wiki Home] | | * [http://wiki.lamsfoundation.org/display/lamsdocs/Home LAMS documentation Wiki Home] |
Line 723: |
Line 398: |
|
| |
|
| * [http://wiki.lamsfoundation.org/display/lamsdocs/Installing+MySQL+on+Windows+for+LAMS Installing Windows for LAMS] (also includes important MySQL configuration information) | | * [http://wiki.lamsfoundation.org/display/lamsdocs/Installing+MySQL+on+Windows+for+LAMS Installing Windows for LAMS] (also includes important MySQL configuration information) |
| | |
| | * [http://wiki.lamsfoundation.org/display/lamsdocs/Integrations LAMS & LMS Integrations] |
|
| |
|
| * [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/lamsdocs/Unix+Installer+Help Unix Installation and Updating Help] (if you plan to use the unix installer) |
Line 730: |
Line 407: |
| * [http://docs.moodle.org/en/Category:LAMS Category:LAMS in the Moodle Wiki] | | * [http://docs.moodle.org/en/Category:LAMS Category:LAMS in the Moodle Wiki] |
|
| |
|
| * [http://wiki.lamsfoundation.org/display/lamsdocs/LAMS+v2.0+Integration+Setup+Step-by-Step+Guide LAMS v2.0 Integration Setup Step-by-Step Guide] | | * [http://wiki.lamsfoundation.org/display/lamsdocs/LAMS+v2.0+Integration+Setup+Step-by-Step+Guide LAMS v2.0 Integration Setup Step-by-Step Guide] |
|
| |
|
| ; Trouble shooting | | ; Trouble shooting |
| * [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/ Technical community - Forums] | | * [http://lamscommunity.org/dotlrn/clubs/technicalcommunity/ Technical community - Forums] |
|
| |
|
| |
|
| [[Category: Installation tips]] | | [[Category: Installation tips]] |
This article or chapter is incomplete and its contents need further attention.
Some information may be missing or may be wrong, spelling and grammar may have to be improved, use your judgment!
Definition
This page contains installation tips for a fresh install of LAMS.
LAMS is a JAVA/JBOSS-based application and needs some installation skills on Windows and good installation skills for Unix.
Note: I put the legacy stuff in the discussion page, e.g. LAMS 2.x for Ubuntu, LAMS 2.1RC for Solaris
LAMS 4.5+
As of July 2021, LAMS 4.5 was released and is the latest stable release.
Getting the LAMS source code
Source code is available from Github. The code branch to use is v4.5
Required software
- Git
- Wildfly 14.0.1
- OpenJDK 11
- MySQL 8.0
- Ant (Java task compiler)
OpenJDK 11
In Debian/Ubuntu 20.04
$ sudo apt install openjdk-11-jdk-headless
$ sudo apt install fontconfig
MySQL 8.0 DB
$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
$ sudo apt update
$ sudo apt install mysql-server
$ sudo mysql_secure_installation
Basic MySQL configuration
/etc/mysql/mysql.conf.d/mysqld.cnf
...
# LAMS stuff
explicit_defaults_for_timestamp
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
transaction-isolation=READ-COMMITTED
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
max_allowed_packet=32M
# Record slow queries
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 10
[mysqldump]
default-character-set=utf8mb4
hex-blob=1
single-transaction=1
quick=1
...
After installing MySQL, create a user and a DB for LAMS and grant appropriate permissions:
DROP DATABASE IF EXISTS lams;
CREATE DATABASE lamsdb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
SET FOREIGN_KEY_CHECKS=1;
GRANT ALL PRIVILEGES ON lamsdb.* TO lamsdbuser@localhost IDENTIFIED BY 'real_secret_pw';
REVOKE SUPER ON *.* from lamsdbuser@localhost;
Wildfly 14.0.1
$ wget https://download.jboss.org/wildfly/14.0.1.Final/wildfly-14.0.1.Final.tar.gz
$ cd /opt/lams
$ tar xvzf wildfly-14.0.1.Final.tar.gz
LAMS source code pre-compilation
LAMS is open source and its code is available from GitHub
git clone https://github.com/lamsfoundation/lams.git
By default branch is LAMS' latest stable release as of July 2021, that's version 4.5. If you need a previous branch, see other branches available.
Wherever you have your LAMS v4.5 code, edit the following files
common.properties
Primarily the DB settings and based system.
If you are building LAMS using Windows, set the osPropertiesName to "windows" instead of "unix".
...
#======== DATABASE PROPERTIES =========
db.host=localhost
db.port=3306
db.name=lamsdb
db.username=lamsdbuser
db.password=real_secret_pw
...
osPropertiesName=unix
...
If you are building LAMS in a unix based system, then change the file unix.properties. If you are using Windows, then change the windows.properties file instead.
unix.properties
Here you will need to figure a path to the content repository
contentrepository.base=/var/opt/lams
The path to your Wildfly folder
server.home=/usr/local/wildfly-14.0.1/
...
contentrepository.base=/var/opt/lams
...
server.home=/opt/lams/wildfly-14.0.1/
...
Compilation and deployment
cd lams_build
ant deploy-lams
If no errors occurred, you are ready to start Wildfly.
cd /opt/lams/wildfly-14.0.1/bin
./standalone.sh
LAMS should be available at localhost:8080/lams/
By default, LAMS has a set of preconfigured users:
Default Users
user
|
password
|
role
|
sysadmin
|
sysadmin
|
System administrator
|
test1
|
test1
|
Teacher, student, tutor
|
test2
|
test2
|
Teacher, student, tutor
|
test3
|
test3
|
Teacher, student, tutor
|
test4
|
test4
|
Teacher, student, tutor
|
Of course, you can create and import users and courses into LAMS at any time from the sysadmin menu.
(OPTIONAL) Wildfly comes with a ton of libraries that LAMS does not use. So to slim Wildfly to only use the libs that LAMS uses, please run the following ant task in the lams_build folder:
LAMS 3.1
As of March 2019, we do have a new LAMS installation that works fine in virtual server running Ubuntu 18.x.
However, I do not feel doing system administration anymore (except for this wiki) and I asked our systems person to do it. So there is not documentation, sorry.
Lams Moodle integration. There are two types of integration.
- LAMS - Moodle integration with a Moodle plugin.
- LTI integration, i.e. Moodle can "consume" LAMS contents
LTI external tool integration
Documentation
An administrator can manually configure external tools in Site administration > Plugins > Activity modules > External tool> Manage tools so that they are available across the site.
Moodle LAMS integration through a Moodle plugin
- We did that with LAMS 2.5. To be tested with LAMS 3.0. There is a plugin for download and the method should be the same.
LAMS 3.0
As of November 2018, the current system is LAMS 3.x. You can test this with a demo version. Below, we started documenting an installation on Ubunt 18x, but we did not find time to complete the installation. As you can see something went wrong. Instead, we installed LAMS 3.1 on a virtual server machine.
History
LAMS 2.5 was initially promised for 2014. Then, after a funding cut, the LAMS team was mostly disbanded and the core team found a new "home" in Singapour. Sometimes in 2016 the version number was changed to LAMS 3.0.
Status as of Nov 2018
- The old LAMS community pages are still online, but no longer maintained.
- LAMS 3.x it is available on Github, but documentation is lacking. Also, there is no installer. You will have to install and configure like in the "good" old times ....
- LAMS 3.x is available as commercial offering through Lams International and also through content services (to be verified).
Prerequisites
- Java
- Usually, this is installed. Check it. In principle, the Open JDK should work, however we do not know if that is true for older version. If it does not (we have to test) this, then it should be replaced with Oracle one. This is very likely the case.
java -version
gives something link:
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)
Installation did not work with java 11, so I tried OpenJDK version 8. If you don't have Java 8 (it already was on my system), install it first.
udo apt install openjdk-8-jdk
To use Java 8 by default, you can do the following. Most software seems to use Java 8 anyhow ....
sudo update-alternatives --config java
- SASS (some kind of CSS pre-processor)
sudo apt install sass
- Ant
sudo apt install ant
- If exists, stop your old LAMS, e.g.
- /etc/init.d/lams2 stop
Kill old LAMS
We did not try to upgrade an old LAMS installation since we did not have many sequences that were worthwhile keeping and since there are no instructions on how to do this. So, export sequences that are worth keeping ...
- Remove the startup script for old lams (or similar if it exists)
grep -R lams /etc
- For example
rm /etc/rc6.d/K02lams2
rm /etc/rc5.d/S02lams2
rm /etc/rc4.d/S02lams2
rm /etc/rc3.d/S02lams2
rm /etc/rc2.d/S02lams2
rm /etc/rc1.d/K02lams2
rm /etc/rc0.d/K02lams2
Install and configure Wildfly
# cd /src
wget http://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.tar.gz
tar xvfz wildfly-8.2.1.Final.tar.gz
sudo mv /src/wildfly-8.2.1.Final /opt/wildfly
sudo chown you:you /opt/wildfly
cd /opt/wildfly
more README.txt
#Now test
cd /opt/wildfly/bin
./standalone.sh
# If your X server works and if you got Firefox installed on the server machine
firefox --new-instance
http://localhost:9990
Create a new MySQL database and user
(1) Check what you got
mysqlshow -p -u root
(2) Create a new database and user
mysql -u root -p
and copy/paste an adapted version of the following
DROP DATABASE IF EXISTS lams3;
CREATE DATABASE lams3 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
SET FOREIGN_KEY_CHECKS=1;
GRANT ALL PRIVILEGES ON lams3.* TO lams@localhost IDENTIFIED BY 'real_secret_pw';
REVOKE PROCESS,SUPER ON *.* from lams@localhost;
After aborting wildfly you can run intot the following type of error (see also this, dated 07/14/10)
/opt/wildfly/bin$ 18:25:34,136 INFO [JdbcMigrationLauncher] If this isn't from a long-running patch, but a stale lock, either:
18:25:34,136 INFO [JdbcMigrationLauncher] 1) run MigrationTableUnlock (probably 'ant patch.unlock')
18:25:34,136 INFO [JdbcMigrationLauncher] 2) set the lockPollRetries property so the lock times out
18:25:34,136 INFO [JdbcMigrationLauncher] (this is dangerous in combination with long-running patches)
18:25:34,136 INFO [JdbcMigrationLauncher] 3) set the 'patch_in_progress' in the patches table to 'F'
In the LAMS DataBASE, run the following SQL
update patches set patch_in_progress = "F";
Dowload, configure and build LAMS
In order to find these files again, we decided to put them in /opt but any place can do.
sudo chown you:your_group /opt/lams
cd /opt/
git clone https://github.com/lamsfoundation/lams.git
Edit the configuration files
cd /opt/lams/lams_build
- Make a copy of the *.properties files just be sure. In addition, do not change the properties files themselves since they may be overridden by upgrades. Put them into a file called build.properties.
Change common.properties:
db.host=localhost
db.port=3306
db.name=lams3
db.username=lams.....
db.password=real_secret....
Change file unix.properties:
# Maybe not the best place for you, but at TECFA we always create a /data directory for data that must be kept, e.g. portalware, web server files, etc.
contentrepository.base=/data/lams
#JBoss deploy directory (Unix)
server.home=/opt/wildfly
#Sass executable.
sass_exec_file=/usr/bin/sass
Copy the properties to file build.properties
Build LAMS
It is not clear to me if one should build various components. In principle, lams-cruise alone should do the trick.
# go to the build directory
cd /opt/lams/lams_build
# Optional: build some stuff
ant build-db
ant deploy-ear
ant deploy-tools
# build lams (ant will read the build.xml file and "cruise" is a "target" that should build the whole thing)
ant lams-cruise
At the end you should see something like:
lams-cruise:
BUILD SUCCESSFUL
Total time: 3 minutes 35 seconds
Now, in principle, LAMS is deployed in the Wildfly sever and could launch it again.
Compilation errors with OpenJDK 11
Some library is missing with openjdk 11 and something else is wrong. I did not get these errors with Openjdk 8, but then I might have installed some extra libraries in the past. I cannot remember.
[echo] LAMS Common: Compiling Java sources
[javac] Compiling 469 source files to /opt/lams/lams_common/build/classes/java
[javac] warning: [options] bootstrap class path not set in conjunction with -source 8
[javac] /opt/lams/lams_common/src/java/org/lamsfoundation/lams/policies/dao/hibernate/PolicyDAO.java:22: error: package com.sun.webkit does not exist
[javac] import com.sun.webkit.PolicyClient;
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
[javac] 1 warning
Test running LAMS with WildFly
Make sure that the port that you plan to use with WildFly is free. By default the standalone server version is port 8080.
#Now test
cd /opt/wildfly/bin
./standalone.sh
This will take some time since it will have to digest LAMS.
# If your X server works and if you got Firefox installed on the server machine you can see something on the server.
firefox --new-instance
http://localhost:8080
Shutting down the test server
Else if you ran it as background process:
jboss-cli.sh --connect --command=:shutdown
Documentation and using LAMS
Attention: This wiki page is not a resource for end users like course designers or learners. Instead see:
- Official LAMS 2 installation documentation
- Lams Moodle integration
- Trouble shooting