diff --git a/components/ILIAS/setup_/minimal-config.json b/components/ILIAS/setup_/minimal-config.json index 41d9260ed3d5..fb56a291e991 100755 --- a/components/ILIAS/setup_/minimal-config.json +++ b/components/ILIAS/setup_/minimal-config.json @@ -9,13 +9,13 @@ "data_dir" : "/var/lib/ilias" }, "http" : { - "path" : "http://demo1.cat06.de" + "path" : "http://www.example.com" }, "systemfolder" : { "contact" : { - "firstname" : "Richard", - "lastname" : "Klees", - "email" : "richard.klees@concepts-and-training.de" + "firstname" : "Lucy", + "lastname" : "Snowe", + "email" : "lucysnowe@ilias.de" } } } diff --git a/docs/configuration/install.md b/docs/configuration/install.md index feec47023322..0ae4867f73de 100755 --- a/docs/configuration/install.md +++ b/docs/configuration/install.md @@ -29,7 +29,7 @@ for a fully functional ILIAS environment. - [Connect and Contribute](#connect-and-contribute) - [Appendix](#appendix) * [Upgrading Dependencies](#upgrading-dependencies) - * [Configure Cron Jobs](#configurate-cron) + * [Configure Cron Jobs](#configure-cron) * [Configure WebDAV](#webdav-configuration) * [Hardening and Security Guidance](#hardening-and-security-guidance) * [MySQL Strict Mode (5.7+)](#mysql-strict-mode-57) @@ -39,7 +39,7 @@ for a fully functional ILIAS environment. # System Requirements -The necessary hardware to run an ILIAS installation is always dependent from the number of users and the kind of usage. +The necessary hardware to run an ILIAS installation always depends on the number of users and the kind of usage. ## Hardware @@ -84,8 +84,8 @@ Package names may vary depending on the Linux distribution. # Installation on Ubuntu 24.04 Depending on your Linux Distribution, you have several ways to install the required -dependencies. We recommend to always use your distributions package manager to -easily keep your packages up to date avoiding security issues. +dependencies. We recommend to always use your distribution's package manager to +easily keep your packages up to date and avoid security issues. In this guide we choose Ubuntu 24.04 because it already meets the recommended PHP version 8.3. For other Ubuntu or Debian-based Linux systems, we recommend using [DEB.SURY.ORG](https://deb.sury.org/) to install the correct @@ -97,7 +97,7 @@ PHP version later on. `openjdk-17-jdk` and `maven` are optional and are used for the ILIAS RPC server for search indexing and certificate generation. `git` is required if the source code is obtained directly from GitHub. `nodejs` and `npm` are required as well if you get the source directly to download the javascript dependencies in the installation process. -Alternatively, they can be obtained directly from the distribution package at [Nodesource](https://deb.nodesource.com/) to select appropriate nodejs versions according to the [Recommended Setup for Running ILIAS](#recommended-setup-for-running-ilias). +Alternatively, they can be obtained directly from the distribution package at [Nodesource](https://nodejs.org/en/download) to select appropriate nodejs versions according to the [Recommended Setup for Running ILIAS](#recommended-setup-for-running-ilias). `ffmpeg` is optionally used to optimise media files, and `ghostscript` is optionally used to create file previews. ```shell @@ -130,15 +130,15 @@ Composer may be optional when using the prepacked ILIAS from [Download & Release apt install apache2 libapache2-mod-php php php-gd php-xsl php-imagick php-curl php-mysql php-soap php-ldap composer ``` -Create a directory for the html sources (e.g. `/var/www/ilias`) which is referenced in the apache2 vhost and also a directory outside the web servers docroot (e.g. `/var/www/files`) for files stored by ILIAS. -Make sure that the web server is the owner of the files and directories that were created by changing the group and owner to www-data (on Debian/Ubuntu) or apache (on RHEL). +Create a directory for the html sources (e.g. `/var/www/ilias`) which is referenced in the apache2 vhost (the apache2 vhost will use `/var/www/ilias/public`) and also a directory outside the web servers docroot (e.g. `/var/www/files`) for files stored by ILIAS. +Make sure that the web server user is the owner of the files and directories that were created by changing the group and owner to `www-data` (on Debian/Ubuntu), `apache` (on RHEL) or `wwwrun` (on SLES). In addition to the file folder, ILIAS also needs a place to create the log files (e.g. `/var/www/logs`). The 'ilias.log' can be viewed there later, as well as all error_log files, which are created in case of errors and are referenced in ILIAS by an errorcode. -Also, to store the ILIAS configuration, which is later used to configurate ILIAS, we create the folder /var/www/config. To prevent future issues with npm we create /var/www/.npm with webowner rights. +Also, to store the ILIAS configuration, which is later used to configure ILIAS, we create the folder `/var/www/config`. To prevent future issues with npm we create `/var/www/.npm` which needs to be writable by the web server user. ```shell mkdir /var/www/ilias @@ -153,7 +153,7 @@ chown www-data:www-data /var/www/.npm ``` Usually Apache ships with a default configuration (e.g. `/etc/apache2/sites-enabled/000-default.conf` on Debian based -systems). A minimal configuration for ILIAS may look as follows: +systems). A minimal configuration for ILIAS may look like this: ```apacheconf @@ -182,7 +182,7 @@ a2enmod rewrite systemctl restart apache2.service ``` -To check if the installation was successfull create the file `/var/www/ilias/phpinfo.php` with the following contents: +To check if the installation was successful, create the file `/var/www/ilias/public/phpinfo.php` with the following contents: ``` ## Database Installation/Configuration @@ -290,19 +290,19 @@ which is the development branch of the repository. We recommend to clone from GitHub and use git to update the code, since this simplifies the update to future releases and versions. -Clone the code to the web servers docroot (e.g. `/var/www/html`) with the following +Clone the code to the web servers docroot (e.g. `/var/www/ilias`) with the following commands: ```shell -cd /var/www/ilias/ -sudo -uwww-data git clone https://github.com/ILIAS-eLearning/ILIAS.git . --single-branch -b release_11 +cd /var/www +sudo -u www-data git clone -b release_11 https://github.com/ILIAS-eLearning/ILIAS.git ilias ```
If you use tags to directly reference ILIAS versions ```shell -cd /var/www/ilias/ -sudo -uwww-data git clone https://github.com/ILIAS-eLearning/ILIAS.git . --single-branch -b v11.X +cd /var/www +sudo -u www-data git clone -b v11.X https://github.com/ILIAS-eLearning/ILIAS.git ilias ```
@@ -312,20 +312,22 @@ sudo -uwww-data git clone https://github.com/ILIAS-eLearning/ILIAS.git . --singl Download the file from the [Download & Releases](https://docu.ilias.de/go/lm/35) page. ```shell -sudo -uwww-data wget https://github.com/ILIAS-eLearning/ILIAS/releases/download/v11.X/ILIAS-11.X.tar.gz -sudo -uwww-data tar -xzf ILIAS-11.X.tar.gz -C /var/www/ilias --strip-components=1 ILIAS-11.X/ +sudo -u www-data wget https://github.com/ILIAS-eLearning/ILIAS/releases/download/v11.X/ILIAS-11.X.tar.gz +sudo -u www-data tar -xzf ILIAS-11.X.tar.gz -C /var/www/ilias --strip-components=1 ILIAS-11.X/ ``` -The GitHub repository of ILIAS doesn't contain all code that is required to run. To download the required PHP-dependencies and -to create static artifacts from the source, run the following in your ILIAS folder: +The GitHub repository of ILIAS doesn't contain all code that is required to run. To download the required dependencies and +to create static artifacts from the source, run the following in your ILIAS directory (the directory that contains +the composer.lock and package-lock.json). This will create a new directory called public which is the root +directory of your webserver: ```shell -sudo -uwww-data npm clean-install --omit=dev --ignore-scripts -sudo -uwww-data composer install --no-dev +sudo -u www-data npm clean-install --omit=dev --ignore-scripts +sudo -u www-data composer install --no-dev ``` > [!IMPORTANT] -> We recommend restricting the rights of the ILIAS code in the production system so that the web server only has +> We recommend restricting the permissions of the ILIAS code in the production system so that the web server only has > read access to the code. For this and other important security considerations, please refer to the security > instructions in the [Security Guide](./secure.md). @@ -353,7 +355,7 @@ A typical configuration might look like this afterwards: }, "database" : { "user" : "ilias", - "password": ">", + "password": "", "database": "ilias", "create_database": true }, @@ -370,9 +372,9 @@ A typical configuration might look like this afterwards: }, "systemfolder" : { "contact" : { - "firstname" : "Richard", - "lastname" : "Klees", - "email" : "richard.klees@concepts-and-training.de" + "firstname" : "Lucy", + "lastname" : "Snowe", + "email" : "lucysnowe@ilias.de" } }, "utilities" : { @@ -391,7 +393,7 @@ Run the ILIAS command line setup from within your ILIAS folder with your configu file (located outside your doc-root!) as a parameter: ```shell -sudo -uwww-data php cli/setup.php install /var/www/config/ilias.json +sudo -u www-data php cli/setup.php install /var/www/config/ilias.json ``` The installation will display what currently happens and might prompt you with @@ -399,15 +401,8 @@ questions. You might want to have a look into the [documentation of the command or into the help of the program itself `php cli/setup.php help`. It is the tool to manage and monitor your ILIAS installation. -If you are installing from Git, it is possible that ILIAS will already require a few migrations to the initial -database. Run the setup migration and follow the steps shown. This is also necessary whenever you update your code. - -```shell -php cli/setup.php migrate -``` - Now that you have ILIAS installed, you can start by logging in as root. Go to your http path and log in with the -username `root` and password `homer`. ILIAS will ask you for a new password after the first login. +username `root` and password `homer`. ILIAS will ask you for a new password on the first login. ## Install Further Components @@ -416,7 +411,7 @@ Optionally you can continue with the installation of further components to get t 1. **ILIAS Cron Job** A cron job can be automatically executed to perform recurring tasks, such as sending notifications or deleting inactive user accounts. -For details on how to configure the automatic execution of cron jobs, see [Configure Cron Jobs](#configurate-cron). +For details on how to configure the automatic execution of cron jobs, see [Configure Cron Jobs](#configure-cron). 2. **ILIAS Java RPC server** It is used for certain optional functions such as Lucene Search or generating PDF Certificates. See [Lucene RPC-Server](../../components/ILIAS/WebServices/RPC/lib/README.md) for details @@ -425,7 +420,7 @@ on how to install the RPC server. It is used to provide an interactive chat experience between users. See [Chat Server](../../components/ILIAS/Chatroom/README.md) for details on how to install the chat server. 4. **E-Mail** -You either use a MTA of your liking to send e-mail generated by ILIAS or configure a SMPT Connection in ILIAS +You either use a MTA of your liking to send e-mail generated by ILIAS or configure a SMTP Connection in ILIAS "Administration > Communication > Settings > Extern" by activating and configuring "Send via SMTP". We recommend to use a MTA installed to your OS like `postfix`. On Debian/Ubuntu execute and configure it according to their instructions: ```shell @@ -441,7 +436,7 @@ A variety of free plugins is provided from our community via the [ILIAS Plugin R To develop plugins, you can get started in our [Development Guide](https://docu.ilias.de/go/pg/27030_42). Custom styles are the way to modify the look of your ILIAS installation. Have -a look in the [documentation of the System Styles and Custom Styles](../../templates/Readme.md) +a look at the [documentation of the System Styles and Custom Styles](../../templates/Readme.md) to learn how to build and install them. @@ -453,7 +448,7 @@ system in case of failure. * External data, configured in `ilias.json` within `filesystem.data_dir`, in our case `/var/www/files/ilias`. * The database, which can easily be done by running `mysqldump'. ```shell -mysqldump --lock-tables=false -u -p > /path/to/your/backup/folder/ilias-backup.sql +mysqldump --lock-tables=false -u -p > /path/to/your/backup/folder/ilias-backup.sql # Prompt for password ``` @@ -461,7 +456,7 @@ When restoring the ILIAS files to the designated folder, remember to set the cor web server. To restore the database, drop the old database with `DROP DATABASE ;`, create an empty database according to [Database Installation/Configuration](#install-database) and write the database dump to this database: ```shell -mysql -u -p < /path/to/your/backup/folder/ilias-backup.sql +mysql -u -p < /path/to/your/backup/folder/ilias-backup.sql # Prompt for password ``` @@ -472,7 +467,7 @@ The easiest way to update ILIAS is using Git. Please note that this is only poss if you installed ILIAS via Git as advised in this document. If Git wasn't used you can also [download](https://docu.ilias.de/go/lm/35) new releases. -Before you start you should consider to [backup](#backup-ilias). +Before you start we strongly advise you to make a [backup](#backup-ilias). ## Minor Upgrade @@ -481,19 +476,19 @@ To apply a minor update (e.g. v11.1 to v11.2) execute the following command in your ILIAS basepath (e.g. `/var/www/ilias/`): ```shell -sudo -uwww-data git pull origin release_11 -sudo -uwww-data npm clean-install --omit-dev --ignore-scripts -sudo -uwww-data composer install --no-dev +sudo -u www-data git pull origin release_11 +sudo -u www-data npm clean-install --omit-dev --ignore-scripts +sudo -u www-data composer install --no-dev ```
If you use tags to directly reference ILIAS versions ```shell -sudo -uwww-data git fetch origin v11.X:v11.X -sudo -uwww-data git checkout v11.X -sudo -uwww-data npm clean-install --omit-dev --ignore-scripts -sudo -uwww-data composer install --no-dev +sudo -u www-data git fetch origin v11.X:v11.X +sudo -u www-data git checkout v11.X +sudo -u www-data npm clean-install --omit-dev --ignore-scripts +sudo -u www-data composer install --no-dev ```
@@ -503,17 +498,17 @@ sudo -uwww-data composer install --no-dev Download the archive of the newest ILIAS minor version on the [Download & Releases](https://docu.ilias.de/go/lm/35) page. ```shell -sudo -uwww-data wget https://github.com/ILIAS-eLearning/ILIAS/releases/download/v11.X/ILIAS-11.X.tar.gz -sudo -uwww-data mkdir /tmp/ilias_update -sudo -uwww-data tar -xzf ILIAS-11.X.tar.gz -C /tmp/ilias_update --strip-components=1 ILIAS-11.X/ -sudo -uwww-data rsync -av --exclude='/public/' --exclude='/Customizing/' --exclude='/data/' --exclude='ilias.ini.php' /tmp/ilias_update/ /var/www/ilias/ +sudo -u www-data wget https://github.com/ILIAS-eLearning/ILIAS/releases/download/v11.X/ILIAS-11.X.tar.gz +sudo -u www-data mkdir /tmp/ilias_update +sudo -u www-data tar -xzf ILIAS-11.X.tar.gz -C /tmp/ilias_update --strip-components=1 ILIAS-11.X/ +sudo -u www-data rsync -av --exclude='/public/' --exclude='/Customizing/' --exclude='/data/' --exclude='ilias.ini.php' /tmp/ilias_update/ /var/www/ilias/ rm -rf /tmp/ilias_update ``` If you have plugins installed, you will need to rebuild the classmap, including all plugins. You will need to call `composer du` to do this. ```shell -sudo -uwww-data composer du +sudo -u www-data composer du ``` @@ -526,6 +521,9 @@ Then complete the update by [updating the database](#update-the-database). ## Major Upgrade +Before running a major upgrade please make sure that you have run all migrations +of your current ILIAS release as explained in the +[Update the Database and run the migrations](#update-the-database) section. To apply a major upgrade (e.g. v10.13 to v11.1) please check that your OS has the [proper dependency versions](#upgrading-dependencies) installed. Note that no major version can be omitted during the upgrade process. You can upgrade from 10 to 11, @@ -535,15 +533,15 @@ unusable due to changes in the layout templates. Then execute the following comm in your ILIAS basepath (e.g. `/var/www/ilias`). ```shell -sudo -uwww-data git fetch origin release_11:release_11 -sudo -uwww-data git checkout release_11 +sudo -u www-data git fetch origin release_11:release_11 +sudo -u www-data git checkout release_11 ```
If you use tags to directly reference ILIAS versions ```shell -sudo -uwww-data git fetch origin v11.X:v11.X -sudo -uwww-data git checkout v11.X +sudo -u www-data git fetch origin v11.X:v11.X +sudo -u www-data git checkout v11.X ```
@@ -553,30 +551,21 @@ sudo -uwww-data git checkout v11.X Download the archive of the newest ILIAS minor version from the [Download & Releases](https://docu.ilias.de/go/lm/35) page. ```shell -sudo -uwww-data wget https://github.com/ILIAS-eLearning/ILIAS/releases/download/v11.X/ILIAS-11.X.tar.gz -sudo -uwww-data mkdir /tmp/ilias_update -sudo -uwww-data tar -xzf ILIAS-11.X.tar.gz -C /tmp/ilias_update --strip-components=1 ILIAS-11.X/ -sudo -uwww-data rsync -av --exclude='/public/' --exclude='/Customizing/' --exclude='/data/' --exclude='ilias.ini.php' /tmp/ilias_update/ /var/www/ilias/ +sudo -u www-data wget https://github.com/ILIAS-eLearning/ILIAS/releases/download/v11.X/ILIAS-11.X.tar.gz +sudo -u www-data mkdir /tmp/ilias_update +sudo -u www-data tar -xzf ILIAS-11.X.tar.gz -C /tmp/ilias_update --strip-components=1 ILIAS-11.X/ +sudo -u www-data rsync -av --exclude='/public/' --exclude='/Customizing/' --exclude='/data/' --exclude='ilias.ini.php' /tmp/ilias_update/ /var/www/ilias/ rm -rf /tmp/ilias_update ``` -After upgrading the code from ILIAS 10 to ILIAS 11 due to structural changes, you need to move the `/Customizing/global/plugins` -and `/data` folder to its new destination. Both are now located in the newly created `public` folder. - -```shell -sudo -uwww-data mkdir -p public/Customizing/plugins -mv data public/ -mv Customizing/global/plugins/Services/* public/Customizing/plugins/ -mv Customizing/global/plugins/Modules/* public/Customizing/plugins/ -``` Then update the code of your plugins according to their documentation to ensure they are compatible with the new ILIAS version. If you are **not** using the tar.gz archive to upgrade your release, update your javascript and php dependencies. If you are using a tar.gz archive and are using plugins, reload your php classmap with `composer du`. ```shell -sudo -uwww-data npm clean-install --omit-dev --ignore-scripts -sudo -uwww-data composer install --no-dev +sudo -u www-data npm clean-install --omit-dev --ignore-scripts +sudo -u www-data composer install --no-dev ``` Complete the update of the base system by [updating the database](#update-the-database). @@ -586,7 +575,7 @@ works fine, change back from Delos to your custom system style. If not, you prob will need to update your style to match the new release. -## Update the Database +## Update the Database and doing migrations to IRSS Database updates must be done for both minor and major updates, the schema and content of the database probably won't match the code otherwise. Database updates are performed @@ -598,17 +587,15 @@ some time, but which can also be executed while the installation is in productiv Run the `status` command on the command line to check if there are any updates available and if ILIAS is responding. After this you need to perform the update. -``` -php cli/setup.php update -``` - -To check if there are migrations, run in your ILIAS folder. +Please make sure to check for migrations before you run the update especially if it's a +major upgrade. If there are migrations left please make sure to run these before updating. ``` -php cli/setup.php migrate +cd /var/www/ilias +sudo -u www-data php cli/setup.php migrate ``` -The command will show you if there are migrations that need to be run for you +The command will show you if there are migrations that need to be run for your installation. Run them by using the `--run` parameter and have a look into the help of the command for more details: `php cli/setup.php migrate --help`. @@ -617,9 +604,17 @@ questions. You might want to have a look into the [documentation of the command or into the help of the program itself `php cli/setup.php help`. It is the tool to manage and monitor your ILIAS installation. +As soon as all migrations are done you can do the database update: +``` +cd /var/www/ilias +sudo -u www-data npm clean-install --omit=dev --ignore-scripts +sudo -u www-data composer install --no-dev +sudo -u www-data php cli/setup.php update +``` + Database updates are performed in steps; it might happen that a step fails, e.g. due to some edge case or inconsistency in existing data, files, etc. -In this case, a concecutive command `php setup/setup.php update` will error with +In this case, a consecutive command `php setup/setup.php update` will error with a message like > step 2 was started last, but step 1 was finished last. > Aborting because of that mismatch. @@ -635,10 +630,10 @@ resetting and running update again. ## Information on Updates To keep your ILIAS Installation secure and healthy it is important that you keep -it up to date. To get informations about updates and security fixes you should +it up to date. To get information about updates and security fixes you should consider subscribing to the [ILIAS Admin Mailing-List](http://lists.ilias.de/cgi-bin/mailman/listinfo/ilias-admins). Information on the new versions, such as Important Changes, Known Issues, Changed Behaviour and Fixed -Issues, can be found in the release notes in [Download & Releases](https://docu.ilias.de/go/lm/35). +Issues can be found in the release notes in [Download & Releases](https://docu.ilias.de/go/lm/35). # Connect and Contribute @@ -688,7 +683,7 @@ We strongly recommend using MariaDB instead of MySQL due to performance, licensi | 7.0 - 7.x | 5.7.x, 8.0.x | 10.1, 10.2, 10.3 | | 6.0 - 6.x | 5.6.x, 5.7.x, 8.0.x | 10.0, 10.1, 10.2, 10.3 | - + ## Configure Cron Jobs This step configures the execution of the ILIAS Cron Jobs, which can be set to perform tasks, such as sending notifications.