2.1. New OLAT installation

Install the prerequisites

For OLAT to run, you'll need the following software:

  • Java SDK 1.6.x or newer

  • Tomcat 5.x or newer (Tomcat 6.x recommended!)

  • Database with UTF-8 support. Note that for our reference system we are running MySQL in Latin1 (not UTF-8) and set the MySQL driver to translate to UTF-8. Running MySQL with UTF-8 support has shown to give a considerable performance hit (sometimes to a magnitude of 10). To avoid this performance hit, the driver mode conversion is a good alternative, although specific to MySQL.

  • Ant 1.7 or newer (for configuration)

The following software packages are optional, depending on your setup:

  • Openfire Jabber Server for instant messaging integration. Olat 6.x needs Openfire 3.4.4 or newer!

  • MRTG for memory, running threads and usage statistics

  • Webalizer for access statistics

OLAT has been tested to run on Linux, MacOSX and Windows systems. Our production systems runs on Linux.

If you're planning on running the instant messaging system, make sure you have reasonable memory resources available. The instant messaging system uses (on average) an additional 3 threads per user with a stack size of 256k per thread, which results in significant virtual memory needs. You should be fine with 1 GB of memory to cover for 100 concurrent users if you run both OLAT and the IM system on the same machine. NOTE: This is a rule of thumb projected based on our experience with our production systems with more than 40000 registered users on a single system and average of 400 (peaks of up to 1000) concurrent users. See chapter the section called “Tomcat VM parameters and Operating System issues” Tomcat and VM parameter for memory settings

Our reference implementation uses Java 1.6.x, Tomcat 6.x, MySQL 5.x and latest Openfire version.

Quick start installation of the needed tools (advanced users)

  • Install Java SDK (JRE is not enough, because Tomcat needs the Java compiler) from java.sun.com and set the JAVA_HOME environment variable to the install location like JAVA_HOME=C:\java\jdk1.6.0.

  • Install Tomcat Servlet Engine ( Tomcat download ) and set the CATALINA_HOME environment variable to the location where you installed Tomcat. Start Tomcat by running startup (located in CATALINA_HOME/bin directory) and point your browser to http://localhost:8080/ If you see the Tomcat screen, these steps are done.

  • Install Ant (Built tool, that will compile and setup your OLAT installation) from ant.apache.org and set the ANT_HOME environment variable to the install directory. Add the ANT_HOME to your PATH variable as well, so you can run Ant from everywhere. If you experience problems with you default installation of Ant you may consider installing a fresh ant from the site above as some distributions of ant do not contain the required modules (e.g. missing xslt transformation modules)

  • Install Mysql Database (http://www.mysql.com) Create a new database 'olat' with a user 'olat' and the password of your choice. If you want to execute the jUnit tests, you also need an aditional test-database. E.g. 'testdb' would be a good database name. Some MySQL versions have problems with too long database names (together with the generated tables), eg. olattestdb is too long on some versions. For most users it is fine to just generate the 'olat' database.

    There are two alternatives to set up the database and the database users:

    1) Use the tool /olat3/bin/dbAndUserSetup.sh. This will generate the OLAT database and the user to access the database automatically.

    2) Manually for MySql 4.x: Go to the mysql/bin directory and create a database with mysql_admin programm.

    # mysql_admin create olat -u root Change to the mysql database tablespace.
    # mysql -u root -p 
    # use mysql;
    
    On the console	run the following two SQL-statements:
    # mysql> insert into user (Host,User,Password) values("localhost","olat",password("olat"));
    # mysql> insert into db values("localhost","olat","olat","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y");
    # mysql> flush privileges;
          				

    2) Manually for MySql 5.x: Go to the mysql/bin directory and create a database with mysql_admin programm.

    # mysql -u root -p On the console run the following SQL-statements:
    # use mysql;
    # mysql> create database olat;
    # mysql> create user 'olat'@'localhost' identified by 'olat';
    # mysql> grant all on olat.* to 'olat'@'localhost' identified by 'olat';
    # mysql> flush privileges;
          				

    Alternative Database: Install of PostgreSQL database. See the section called “Postgres”

    Now you have a user 'olat' with password 'olat' in the database 'olat'. Note the database username, databasename and password. You will need this later in the build.properties file.

    Now your tools are ready to run OLAT.

Getting the sources.

  • Get the OLAT sources from our homepage www.olat.org.

  • Create directory for your OLAT installation. We will refer to this directory by PATH_TO_YOUR_OLAT throughout the rest of these installation instructions. Change into your OLAT installation directory now.

  • Unpack the actual OLAT-X.X.X.zip file in this directory. (eg 'unzip OLAT-X.X.X.zip').

OLAT configuration

  • Now that you've set up the infrastructure software, you're just a few steps away from your own OLAT installation. All that's left is configuring OLAT according to your setup. This task is almost completely automated by Ant build files.

  • Copy the PATH_TO_YOUR_OLAT/olat3/build.properties.default to PATH_TO_YOUR_OLAT/olat3/build.properties

  • Edit PATH_TO_YOUR_OLAT/olat3/build.properties to match your installation. You'll find instructions with regard to the parameters to set in the build.properties file.

  • Run 'ant config-all' - This will create the necessary config files.

  • There are two config files for Tomcat generated by 'ant config-all':

    server.xml configures Tomcat to accept HTTP requests directly. All requests to OLAT rebuild code will go to Tomcat directly. For testing go with this file and you don't need to install Apache.

    To configures your Tomcat with Apache as main gateway to OLAT. All requests go through Apache first and are forwarded through a Tomcat JK Connector by Apache if necessary. This shields Tomcat from the outside world. We suggest using this connector for security reasons. Uncomment the jk connector part in the server.xml file.

    Copy the server.xml file to your tomcat installation. TOMCAT_HOME/conf/server.xml

  • Now you should be ready to compile OLAT, type:
    # ant build
  • Finally you'll need to setup the necessary database tables for OLAT. 'ant dbsetup' will do the job for you. Be careful with that target on a productive system since you will loose all your data!

  • You can now start Tomcat (if configured restart Apache)

  • Access your OLAT installation:

    You can reach your OLAT installation at http://your.site.com:[PORT]/CONTEXT_PATH where CONTEXT_PATH is the context path of your application as you've configured it in your build.properties file. The default is "olat" e.g. http://localhost:8080/olat

    There are some accounts setup by default:

    Login: 'administrator' Password: 'olat'. This account has full administrative rights. We advise you to change the password immediately (see 'Home' -> 'settings' -> 'Password')

    Login: 'gast' Password: 'gast'. This account is the default account for 'Learningresources' which grant access to guests. By default, this account does not have access to any content in OLAT.

  • Note: If you encounter an error like: "Error creating bean with name 'bbfactory' defined in file [/opt/OLAT/webapp/WEB-INF/olat_extensions.xml" make shure you give the right ownership to all files processed by the user that runs tomcat. On linux you can reach this by using the command "chown -R yourtomcatuser:yourgroup PATH_TO_YOUR_INSTALLATION".