Install Icinga 2 on SLES¶
Installation Requirements ¶
- Icinga 2 with the IDO database backend (MySQL or PostgreSQL)
- A web server, e.g. Apache or Nginx
- PHP version >= 7.3
- Older versions (5.6+) are only supported up until Icinga Web v2.11
Optional Requirements¶
- For exports to PDF also the following PHP modules are required: mbstring, GD, Imagick
- LDAP PHP library when using Active Directory or LDAP for authentication
Add Icinga Package Repository ¶
You need to add the Icinga repository to your package management configuration for installing Icinga Web 2. If you’ve already configured your OS to use the Icinga repository for installing Icinga 2, you may skip this step.
SLES Repository ¶
Info
A paid repository subscription is required for RHEL repositories. Get more information on icinga.com/subscription
Don’t forget to fill in the username and password section with your credentials in the local .repo file.
rpm --import https://packages.icinga.com/icinga.key
zypper ar https://packages.icinga.com/subscription/sles/ICINGA-release.repo
zypper ref
You need to additionally enable a couple of SLES repositories to fulfill dependencies:
source /etc/os-release
SUSEConnect -p sle-module-desktop-applications/$VERSION_ID/x86_64
SUSEConnect -p sle-module-development-tools/$VERSION_ID/x86_64
SUSEConnect -p sle-module-web-scripting/$VERSION_ID/x86_64
SUSEConnect -p PackageHub/$VERSION_ID/x86_64
Install Icinga Web 2 ¶
You can install Icinga Web 2 by using your distribution’s package manager to install the icingaweb2
package.
The additional package icingacli
is necessary to follow further steps in this guide.
zypper install icingaweb2 icingacli
Install the Web Server ¶
Make sure you have a web server with PHP up and running before moving on. Please refer to the installation requirements for details about supported versions. Depending on your OS you might have to install, and configure the web server separately.
Prepare Web Setup ¶
You can set up Icinga Web 2 quickly and easily with the Icinga Web 2 setup wizard which is available the first time
you visit Icinga Web 2 in your browser. When using the web setup you are required to authenticate using a token.
In order to generate a token use the icingacli
:
icingacli setup token create
In case you do not remember the token you can show it using the icingacli
:
icingacli setup token show
Start Web Setup ¶
Finally visit Icinga Web 2 in your browser to access the setup wizard and complete the installation:
/icingaweb2/setup
.
The setup wizard automatically detects the required packages. In case one of them is missing, e.g. a PHP module, please install the package, restart your webserver and reload the setup page.
Note
If you’re using php-fpm on SLES 15 SP2 onwards, /etc/icingaweb2
may not be writable.
That’s because the default systemd unit file for php-fpm has ProtectSystem=full
enabled. You want to lookup/add the systemd setting ReadWritePaths=
in this case and
add /etc/icingaweb2
to it. Alternatively you can also define a different configuration
directory using the environment variable ICINGAWEB_CONFIGDIR
.