Iomad Installation Guide

There are a few things you need to ensure are available before installing your Iomad system.

Iomad is based on Moodle (http://www.moodle.org) so the server requirements and basic steps for installation are going to be the same. If you are completely comfortable with this, then run the installation and skip right to the Initial Tasks/Set-up Options in section 6. Otherwise, read on...

Server Prerequisites

You need a Webserver, preferably Apache or similar. You need a Database back end, MySQL/Maria DB or PostgreSQL for preference. You also need something to run the code (which will be PHP).

Basically, you are looking for a LAMP/LAPP ( Apache MySQL PHP/ Linux Apache PostgreSQL PHP) system. Any flavour of Linux will do. Pick your favourite. You could run this on Microsoft Technologies, but we don’t recommend that. Mainly because we don’t test against it (although it should work) and the PHP install and set up is never fun.

The specific versions are dependant on the version of Moodle you’re using. This will be the same version number for your Iomad branch. The software prerequisites for the Moodle releases are all available here: https://docs.moodle.org/dev/Releases

You also need to have some PHP packages installed. This is basically why we don’t recommend Microsoft, as PHP is a bit of a pain to get working on Windows. With Linux, you can just use your favourite packing manager and it works beautifully.

1. Create the Database

Using your favourite Database manager, create a database for the Iomad installation with an appropriate user which has access to the database you are creating so that they can create all of the tables, indexes etc.

You want to create this with the utf8mb4 character set and utf8mb4_unicode_ci collation to allow for full unicode compliance. If you are using MySQL/MariaDB, then also use the innodb file format with Barracuda support.

2. Install the Code

Download the latest Iomad code from https://github.com/iomad/iomad. We would strongly recommend using git to get the code as it will allow you to patch what you have with significantly less hassle than if you just downloaded the archive file. (Downloading the archive file does work, but trust me on the git; it will always pay for itself).

If you are unfamiliar with git, there are plenty of cheat sheets online. The basics will be: git clone https://github.com/iomad/iomad.git (this downloads the repository to a directory called iomad) cd iomad git checkout -b myiomad origin/ (this creates a local copy of the latest branch and calls it myiomad e.g. IOMAD_39_STABLE. You don’t need to worry about what this actually means; it’s simply something so that git knows how to reference your code).

3. Edit the Config File

It’s all well and good that you have a database, a database user and the code on your server, but it’s not going to do you any good if none of these can talk to each other. This is where the config file comes in. Handily, there is one you can use as a template; happily, it’s in the iomad directory.

Just before we do this, you will also need to create a directory where Iomad will store any files uploaded to it. We normally call this the moodledata directory and you need to create one. We don’t recommend putting it inside of the iomad directory (although you can, if you are stuck on a shared hosting with only FTP to keep you company).

Create one somewhere outside of the webserver’s web directories so – if you are using the /var/www/html varient of Linux apache – you could create it under /var/www/moodledata. The webserver account needs to be able to write to this; the simplest way is to make it fully read,write,execute. The command would be something like chmod 777 /var/www/moodledata

You can now create the config file. Copy the config-dist. file to config.php and edit it, but you will need to change the following lines or none of these bits will talk to each other:

$CFG→dbtype (set it to your database type) $CFG→dbhost (if you are being fancy and using more than one server, change this to the database server IP address/name.) $CFG→dbname (this is the name of the database you have already created) $CFG→dbuser (this is the database username you have already created) $CFG→dbpass (this is the password you gave them) $CFG→wwwroot (this is the URL for the Iomad site) $CFG→dataroot (this is the directory you created for moodledata)

Please note, don’t copy the above. Edit the file and change the rows or the arrows from this document will break the config.php file, and it will cause you no end of frustration.

4. Actual Installation

If you have done all of the above correctly, you can point your browser at the URL for your Iomad site and you will get a page which looks like this: If you get this, everything has gone as expected; if not, go back and check you have the right things in the config.php file and that the webserver user has access to the iomad directory and files.

Click “Continue”.

If your environment is set up properly, then you should get a page which looks like this: If you have all green OKs, then everything is ready and you can finish off the installation.

Click “Continue” and all of the packages will be installed. Once they have finished installing, click “Continue” again.

Fill out the information for your main admin account. Specifically, you will need your email address, the username and the password which you will be using to administer your Iomad. You can add more admins in later, but you need at least one to start or it’s going to be a little frustrating getting anything done.

Finally, fill out your site details. Give it a long name and a short name. Set what the default timezone is. Set what your default outgoing email address will be. (Don’t worry too much about the specifics, though; you can change it all later).

Your Iomad site is now installed and ready to be configured, but there is one final step which is required for the server to get it all working smoothly...

5. Set up the cron Iomad and Moodle rely heavily on a number of automatic tasks which run at various intervals and frequencies, and these are all under the Moodle scheduled tasks. What runs the Moodle scheduler is the server cron, but if you don’t have access to the server then your control panel will allow you to run scheduled tasks. If it doesn’t, however, then maybe you need to speak to your hosting provider as a) it should, and b) Iomad will simply not properly function without it. (Nor, as it happens, will a number of web based applications...)

The cron file lives under the iomad directory (admin/cli/cron.php) and needs to be called by the php command. If you are following the /var/www/html/ path then the cron task will look like this:

* * * * * /usr/bin/php -f /var/www/html/iomad/admin/cli/cron.php > /dev/null 2>&1

Again, type this in. Don’t trust the formatting in this document. Editors like to be “helpful” and change the characters to ones which display better but do nothing on a Linux shell. If you want to log your cron somewhere else, you can change the /dev/null part to a path to a filename. Google shell redirects for more information.

6. Initial Tasks/Set-up Options

Have you set up the cron?

If your answer to this is “Huh?”, go back to step 5 and follow those instructions. Trust me. It will save you a huge amount of time and head scratching. Otherwise...

Local Iomad settings

Click on Site administration → Plugins → Local plugins → Iomad settings. Change any of the options which make sense for you. Date format is a big one. Default is ISO 8601 but your users may not like that.

Create a company

Click on the dashboard link. As you haven’t yet created any companies, you will be forced to do so now. Fill out the form provided. You only have to answer the questions with a red *. The rest can be left as default. You can also come back and edit this all later. This brings you to the dashboard which looks like this: There is a selector at the top where you get to choose which company you are working with. Handily, it’s already chosen the company you have just created and whichever company you have selected is the company you will be working with at that time.

There is a row of tabs along the top for the various parts of Iomad – Company management, User management, Course management, License management, Competencies management and E- Commerce etc. There is also a list of company reports. You are now free to create users and courses, and set up the site. There are help icons which will explain the stuff in the forms. If you find any issues, please report them on the github site https://github.com/iomad/iomad/issues where they will be addressed.

Finally…

If you can’t get your installation to work, your hosting provider won’t set up your cron, or you just need a bit of help, get in touch via http://www.iomad.org.