Iomad is an add on for Moodle (http://www.moodle.org) which takes all of the features of Moodle and allows these to be used in a multi-tenancy environment which keeps users from one defined company separate from another company. As such there are a number of Moodle core code changes implemented to enable this to work. Upgrading Iomad from the Moodle repositories will break the multi-tenancy of your site. However this does mean that the installation instructions up to the point of configuring Iomad for the first time are the same as for Moodle. So if you are already familiar with this you can safely skip these, install Iomad and jump to the initial configuration section.
Installing Iomad Installation Quickstart
Automatic updates deployment
Administration via command line
This page explains how to install Iomad.
If you are an expert and/or in a hurry try Installation Quickstart.
Iomad is primarily developed in Linux using Apache, PostgreSQL/MySQL/MariaDB and PHP (also sometimes known as the LAMP platform). If in doubt, this is the safest combination (if for no other reason than being the most common). There are other options – see the Software section that follows:
The basic requirements for Iomad are as follows:
Disk space: 160MB free (min) plus as much as you need to store your materials. 5GB is probably a realistic minimum.
Backups: at least the same again (at a remote location preferably) as above to keep backups of your site
Memory: 256MB (min), 1GB or more is strongly recommended. The general rule of thumb is that Iomad can support 10 to 20 concurrent users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination and the type of use. ‘Concurrent’ really means web server processes in memory at the same time (i.e. users interacting with the system within a window of a few seconds). It does NOT mean people ‘logged in’.
An operating system (!). Anything that runs the following software; although the choice will most likely depend on the performance you need and the skills you have available. Linux and Windows are the most common choices (and good support is available). If you have a free choice, Linux is generally regarded to be the optimal platform.
Web server, primarily Apache. Not fully tested (or supported) but should work are IIS, lightttpd, nginx, cherokee, zeus and LiteSpeed. Iomad will refuse to install on any other web server. Your web server needs to be correctly configured to serve PHP files.The version is not critical but try to use the newest web server build available to you.
PHP – The minimum version is currently 5.3.3. A number of extensions are required; see the PHP page for full details. Installation will halt at the environment check if any of the required extensions are missing. If available, PHP 5.5 and newer contain OPcache which is recommended (you can ignore the environment check for this if not available).
A database. MySQL and PostgreSQL are the primary development database, the most comprehensively tested and have extensive documentation and support. MSSQL is fully supported (note that optional plugins may be untested with these databases) but documentation and online help are not as comprehensive as MySQL/PostgreSQL. If in doubt use MySQL (more documentation) or PostgreSQL (better stability/performance). You will need the appropriate PHP extension (configured if need be) for your chosen database.
MySQL – minimum version 5.1.33
MariaDB – minimum version 5.3.5 (drop-in replacement for Oracle’s MySQL)
PostgreSQL – minimum version 8.3
MSSQL – minimum version 9.0
Minimum browser for accessing Iomad: recent Firefox, Internet Explorer 9, Safari 6, recent Google Chrome 11 (lower versions may work but are not fully supported)
Set up your server
…or desktop computer, if you are just evaluating Iomad. There are lots of possibilities for installing the basic server software depending on your particular choices. Some links and pointers are at Installing AMP
If you are using a hosted server all this should be done for you. However, (especially on shared hosting) make sure you understand or find out how to change PHP settings (e.g. file upload maximums). This can vary a huge amount from host to host.
Download and copy files into place
You have two options:
Download from the github.
or you can clone it by typing in the following “git clone email@example.com:iomad/iomad.git iomad” on the command line.
Either of the above should result in a directory called moodle, containing a number of files and folders.
You can either place the whole folder in your web server documents directory, in which case the site will be located at http://yourwebserver.com/moodle, or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply http://yourwebserver.com. See the documentation for your system and/or web server if you are unsure.
Tip: If you are downloading Iomad to your local computer and then uploading it to your hosted web site, if possible upload the compressed file and decompress at the remote end (check your ‘file manager’). Failing that, watch FTP progress carefully for errors or missed files.
Secure the Iomad files: It is vital that the files are not writeable by the web server user. For example, on Unix/Linux (as root):
# chown -R root /path/to/moodle
# chmod -R 0755 /path/to/moodle
(files are owned by the administrator/superuser and are only writeable by them – readable by everyone else)
If you want to use the built-in add-on installer you need to make the directory writable by web server user. It is strongly recommended to use ACL when your server supports it, for example if your Apache server uses account www-data:
# chmod -R +a “www-data allow read,delete,write,append,file_inherit,directory_inherit” /path/to/moodle
Create an empty database
Next create a new, empty database for your installation. You need to find and make a note of following information for use during the final installation stage:
dbhost – the database server hostname. Probably localhost if the database and web server are the same machine, otherwise the name of the database server
dbname – the database name. Whatever you called it, e.g. iomad
dbuser – the username for the database. Whatever you assigned, e.g. iomaduser – do not use the root/superuser account. Create a proper account with the minimum permissions needed.
dbpass – the password for the above user
If your site is hosted you should find a web-based administration page for databases as part of the control panel (or ask your administrator). For everyone else or for detailed instructions, see the page for your chosen database server:
Create the (moodledata) data directory
Iomad requires a directory to store all of its files (all your site’s uploaded files, temporary data, cache, session data etc.). The web server needs to be able to write to this directory. On larger systems consider how much free space you are going to use when allocating this directory.
Due to the way Iomad caches data you may have performance issues if you use relatively slow storage (e.g. NFS) for this directory. Read the Performance_recommendations carefully and consider using (e.g.) memcached for Caching.
IMPORTANT: This directory must NOT be accessible directly via the web. This would be a serious security hole. Do not try to place it inside your web root or inside your Iomad program files directory. Iomad will not install. It can go anywhere else convenient.
Here is an example (Unix/Linux) of creating the directory and setting the permissions for anyone on the server to write here. This is only appropriate for Iomad servers that are not shared. Discuss this with your server administrator for better permissions that just allow the web server user to access these files.
# mkdir /path/to/moodledata
# chmod 0777 /path/to/moodledata
If your server supports ACL it is recommended to set following permissions, for example if your Apache server uses account www-data:
# chmod -R +a “www-data allow read,delete,write,append,file_inherit,directory_inherit” /path/to/moodledata
If you are planning to execute PHP scripts from the command line you should set the same permissions for the current user:
$ sudo chmod -R +a “`whoami` allow read,delete,write,append,file_inherit,directory_inherit” /path/to/moodledata
Securing moodledata in a web directory
If you are using a hosted site and you have no option but to place ‘moodledata’ in a web accessible directory. You may be able to secure it by creating an .htaccess file in the ‘moodledata’ directory. This does not work on all systems – see your host/administrator. Create a file called .htaccess containing only the following lines:
deny from all
Start Iomad install
It’s now time to run the installer to create the database tables and configure your new site. The recommended method is to use the command line installer. If you cannot do this for any reason (e.g. on a Windows server) the web based installer is still available.
Command line installer
It’s best to run the command line as your system’s web user. You need to know what that is – see your system’s documentation (e.g. Ubuntu/Debian is ‘www-data’, Centos is ‘apache’)
Example of using the command-line (as root – substitute ‘www-data’ for your web user):
# chown www-data /path/to/moodle
# cd /path/to/moodle/admin/cli
# sudo -u www-data /usr/bin/php install.php
# chown -R root /path/to/moodle
The chowns allow the script to write a new config.php file. More information about the options can be found using
# php install.php –help
You will be asked for other settings that have not been discussed on this page – if unsure just accept the defaults. For a full discussion see Administration via command line
Web based installer
To run the web installer script, just go to your Iomad’s main URL using a web browser.
The installation process will take you through a number of pages. You should be asked to confirm the copyright, see the database tables being created, supply administrator account details and supply the site details. The database creation can take some time – please be patient. You should eventually end up at the Iomad front page with an invitation to create a new course.
It is very likely that you will be asked to download the new config.php file and upload it to your Iomad installation – just follow the on-screen instructions.
Settings within Iomad
There are a number of options within the Iomad Site Administration screens (accessible from the ‘Site administration’ tab in the ‘Settings’ block. Here are a few of the more important ones that you will probably want to check:
Settings > Site administration > Plugins > Message Outputs > Email: Set your smtp server and authentication if required (so your Iomad site can send emails). The support contact for your site is also set on this page.
Settings > Site administration > Server > System paths: Set the paths to du, dot and aspell binaries.
Settings > Site administration > Server > HTTP: If you are behind a firewall you may need to set your proxy credentials in the ‘Web proxy’ section.
Settings > Site administration > Location > Update timezones: Run this to make sure your timezone information is up to date.
Installation is complete 🙂
Create a new course: You can now create a new course and have a play 😉
If something goes wrong…
Here are some things you should try…
Check your file permissions carefully. Can your web server read (but not write) the Iomad program files? Can your web server read and write your Iomad data directory?
Check your database permissions. Have you set up your database user with the correct rights and permissions for your configuration (especially if the web server and database server are different machines)?
Create your Configuration file (config.php) by hand. Copy config-dist.php (in the root of the Iomad program directory) to config.php, edit it and set your database/site options there. Installation will continue from the right place.
Once you have a config.php (see previous tip) you can edit it to turn on debugging (in section 8). This may give you extra information to help track down a problem. If you have access, check your web server error log(s).
Re-check your php.ini / .htaccess settings. Are they appropriate (e.g. memory_limit), did you edit the correct php.ini / .htaccess file and (if required) did you re-start the web server after making changes?
Did you include any non-core (optional) plugins, themes or other code before starting the installation script? If so, remove it and try again (it may be broken or incompatible).
Explain your problem in the Installation problems forum. PLEASE list your software versions; explain what you did, what happened and what error messages you saw (if any); explain what you tried. There is no such thing as ‘nothing’, even a blank page is something!