Installation and Maintenance

Database

Ususally Ilias uses the mysql database. In the Process of the Installation a password for the database administrator ("root") will be configured. Make sure this password is kept secret and is stored for recovery purposes accordig to yout institution's security policy

apt-get install mysql-server

It is advisable to move the database to a partition distinct from the system. Since a new partition was mountet in the steps before, the following commands transfer the database directory from the default location (/var/lib/mysql) to a directory below /srv

/etc/init.d/mysql stop
(or: service mysql stop in jessie)
cp -av /var/lib/mysql /srv

some configuration is required in the /etc/mysql/my.cnf file to optimize database performance. Values for this step vary depending on the use and performance requirements of your system.
The change of the datadir is definitively required.

datadir=/srv/mysql
 
max_connection=200
table_cache=512
query_cache_size=32M

Some versions of mysql use the statement "skip innodb" to disable this type of engine. In newer versions of mysql this statement must not be used; the mysql daemon may fail to start if it reads it.

After configuration start the mysql service again. Take care of all error messages you get, if any.

/etc/init.d/mysql start
(or: service mysql start)

Some debian derivates (like current versions of ubuntu) provide an additional layer of security using the "apparmor" service. This may prevent mysql to start after the movement of the data directory. To enable the mysql server again, edit the associated file in the apparmor configuration (/etc/apparmor.d/user.sbin.mysql) to allow the mysql user to access the new data directory. Just copy the two lines that reference the old data directory (/var/lib/mysql) and replace the path with the new directory. Reload the apparmor configuration; then mysql should start normally.

Database administrators often don't want to give an application service like ILIAS root access to the database. In this case the database for the ILIAS service must be created before the ILIAS setup is started. The steps needed for this are:

  • create a database for ILIAS for each client (called "ilias-clientname" in the exaple below, case-sensitive)
  • create a user that will manage the database
  • give that user the required privileges to the newly created database
The commands to do so are:
 
mysql -u root -p
(this will propt you for the mysql root passowrd)
create database #ilias-clientname# character set utf8;
create user '#UserName#'@'localhost' identified by '#PASSWORD#';
grant all on #ilias-clientname#.* TO '#UserName#'@'localhost';
quit
 
(Replace the values #UserName#,#PASSWORD# and #ilias-clientname# by your own settings. These  values must be entered in the ILIAS-Setup when creating the ILIAS client.)



No comment has been posted yet.