2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if index %} -->
|
2017-07-14 16:33:05 +02:00
|
|
|
# Installation <a id="installation"></a>
|
2013-07-03 14:00:55 +02:00
|
|
|
|
2014-11-18 16:56:39 +01:00
|
|
|
The preferred way of installing Icinga Web 2 is to use the official package repositories depending on which operating
|
2017-08-07 15:35:57 +02:00
|
|
|
system and distribution you are running.
|
2013-07-03 14:00:55 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Please follow the steps listed for your operating system. Packages for distributions other than the ones
|
|
|
|
listed here may also be available. Please refer to [icinga.com/get-started/download](https://icinga.com/get-started/download/#community)
|
|
|
|
for a full list of available community repositories.
|
2015-09-27 17:32:24 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Browser Support
|
2021-05-11 11:03:10 +02:00
|
|
|
|
|
|
|
Icinga Web 2 and modules made by Icinga don't require a particular browser or set of browsers. The
|
|
|
|
vendor of the browser in question doesn't matter much. However, the features a browser supports do.
|
|
|
|
|
|
|
|
This generally applies to CSS and Javascript features. Since there a plethora of features in each
|
|
|
|
category which Icinga Web 2 and modules may require, we will only mention the most prominent feature
|
|
|
|
or sub-category here:
|
|
|
|
|
|
|
|
* For CSS this is [the flexible box layout module](https://caniuse.com/flexbox)
|
|
|
|
* For Javascript it is [the ECMAScript 2015 specification](https://caniuse.com/es6)
|
|
|
|
|
|
|
|
If your desired browser and its version is showing up in green when visiting the respective link,
|
|
|
|
it's probably okay to use it for Icinga Web 2.
|
2016-02-16 00:25:35 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
!!! note
|
2021-06-22 15:20:16 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Support for Internet Explorer will be completely dropped with version 2.11
|
2013-10-20 14:51:03 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Upgrade <a id="upgrade"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
In case you are upgrading from an older version of Icinga Web 2
|
|
|
|
please make sure to read the [upgrading](80-Upgrading.md#upgrading) section
|
|
|
|
thoroughly.
|
|
|
|
<!-- {% elif not from_source %} -->
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Installation Requirements <a id="installation-requirements"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
* [Icinga 2](https://icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL)
|
|
|
|
* A web server, e.g. Apache or Nginx
|
2022-01-18 14:59:30 +01:00
|
|
|
* PHP version >= 7.2
|
2013-07-03 14:00:55 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### 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
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Add Icinga Package Repository <a id="add-icinga-package-repository"></a>
|
2015-04-16 13:59:17 +02:00
|
|
|
|
|
|
|
You need to add the Icinga repository to your package management configuration for installing Icinga Web 2.
|
2016-09-05 11:00:53 +02:00
|
|
|
If you've already configured your OS to use the Icinga repository for installing Icinga 2, you may skip this step.
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if debian %} -->
|
|
|
|
### Debian Repository <a id="ubuntu-repository"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
2019-11-20 15:52:41 +01:00
|
|
|
apt-get update
|
|
|
|
apt-get -y install apt-transport-https wget gnupg
|
|
|
|
|
2019-05-21 23:41:12 +02:00
|
|
|
wget -O - https://packages.icinga.com/icinga.key | apt-key add -
|
2019-11-20 15:52:41 +01:00
|
|
|
|
|
|
|
DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \
|
|
|
|
echo "deb https://packages.icinga.com/debian icinga-${DIST} main" > \
|
|
|
|
/etc/apt/sources.list.d/${DIST}-icinga.list
|
|
|
|
echo "deb-src https://packages.icinga.com/debian icinga-${DIST} main" >> \
|
|
|
|
/etc/apt/sources.list.d/${DIST}-icinga.list
|
|
|
|
|
2015-04-16 13:59:17 +02:00
|
|
|
apt-get update
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2016-09-05 11:00:53 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if ubuntu %} -->
|
|
|
|
### Ubuntu Repository <a id="ubuntu-repository"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
2019-11-20 15:52:41 +01:00
|
|
|
apt-get update
|
|
|
|
apt-get -y install apt-transport-https wget gnupg
|
|
|
|
|
2019-05-21 23:41:12 +02:00
|
|
|
wget -O - https://packages.icinga.com/icinga.key | apt-key add -
|
2019-11-20 15:52:41 +01:00
|
|
|
|
|
|
|
. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
|
|
|
|
echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
|
|
|
|
/etc/apt/sources.list.d/${DIST}-icinga.list
|
|
|
|
echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
|
|
|
|
/etc/apt/sources.list.d/${DIST}-icinga.list
|
|
|
|
|
2015-04-16 13:59:17 +02:00
|
|
|
apt-get update
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if centos %} -->
|
|
|
|
### CentOS Repository <a id="centos-repository"></a>
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
rpm --import https://packages.icinga.com/icinga.key
|
|
|
|
wget https://packages.icinga.com/centos/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
The packages for CentOS depend on other packages which are distributed
|
|
|
|
as part of the [EPEL repository](https://fedoraproject.org/wiki/EPEL).
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
CentOS 7:
|
2021-06-17 08:59:42 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
yum install epel-release
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Since Icinga Web v2.5 we also require a **newer PHP version** than what is available
|
|
|
|
in RedHat itself. You need to enable the SCL repository, so that the dependencies
|
|
|
|
can pull in the newer PHP.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yum install centos-release-scl
|
2017-01-24 14:52:05 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2017-01-24 14:52:05 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if rhel %} -->
|
|
|
|
### RHEL Repository <a id="rhel-repository"></a>
|
2017-08-07 15:21:15 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
!!! info
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
A paid repository subscription is required for RHEL repositories. Get more information on
|
|
|
|
[icinga.com/subscription](https://icinga.com/subscription)
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Don't forget to fill in the username and password section with your credentials in the local .repo file.
|
2015-07-01 12:56:04 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
rpm --import https://packages.icinga.com/icinga.key
|
|
|
|
wget https://packages.icinga.com/subscription/rhel/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo
|
2017-08-03 19:30:40 +02:00
|
|
|
```
|
|
|
|
|
2019-11-20 15:52:41 +01:00
|
|
|
If you are using RHEL you need to additionally enable the `optional` and `codeready-builder`
|
|
|
|
repository before installing the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F).
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
#### RHEL 8
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
2019-11-20 15:52:41 +01:00
|
|
|
ARCH=$( /bin/arch )
|
|
|
|
|
|
|
|
subscription-manager repos --enable rhel-8-server-optional-rpms
|
|
|
|
subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
|
|
|
|
|
|
|
|
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
#### RHEL 7
|
|
|
|
Since Icinga Web v2.5 we also require a **newer PHP version** than what is available
|
|
|
|
in RedHat itself. You need to enable the SCL repository, so that the dependencies
|
|
|
|
can pull in the newer PHP.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
2017-11-16 11:22:15 +01:00
|
|
|
subscription-manager repos --enable rhel-7-server-optional-rpms
|
2022-02-16 09:10:54 +01:00
|
|
|
subscription-manager repos --enable rhel-server-rhscl-7-rpms
|
|
|
|
|
2019-11-20 15:52:41 +01:00
|
|
|
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if sles %} -->
|
|
|
|
### SLES Repository <a id="rhel-repository"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
!!! info
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
A paid repository subscription is required for RHEL repositories. Get more information on
|
|
|
|
[icinga.com/subscription](https://icinga.com/subscription)
|
|
|
|
|
|
|
|
Don't forget to fill in the username and password section with your credentials in the local .repo file.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
rpm --import https://packages.icinga.com/icinga.key
|
|
|
|
|
|
|
|
zypper ar https://packages.icinga.com/subscription/sles/ICINGA-release.repo
|
|
|
|
zypper ref
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
You need to additionally enable a couple of SLES repositories to fulfill dependencies:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
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
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
|
|
|
|
|
|
|
<!-- {% if amazon_linux %} -->
|
|
|
|
### Amazon Linux 2 Repository <a id="amazon-linux-2-repository"></a>
|
|
|
|
|
|
|
|
!!! info
|
|
|
|
|
|
|
|
A paid repository subscription is required for Amazon Linux repositories. Get more information on
|
|
|
|
[icinga.com/subscription](https://icinga.com/subscription)
|
|
|
|
|
|
|
|
Don't forget to fill in the username and password section with your credentials in the local .repo file.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
rpm --import https://packages.icinga.com/icinga.key
|
|
|
|
wget https://packages.icinga.com/subscription/amazon/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
You need to install and enable the `amazon-linux-extras` repository to meet the requirements of
|
|
|
|
Icinga Web 2 on Amazon Linux 2:
|
2017-01-24 14:52:05 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
yum install -y amazon-linux-extras
|
2017-01-24 14:52:05 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
amazon-linux-extras enable php8.0
|
|
|
|
```
|
|
|
|
<!-- {% endif %} -->
|
2017-01-24 14:52:05 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Install Icinga Web 2 <a id="install-icingaweb2"></a>
|
2015-04-16 13:59:17 +02:00
|
|
|
|
|
|
|
You can install Icinga Web 2 by using your distribution's package manager to install the `icingaweb2` package.
|
2022-02-16 09:10:54 +01:00
|
|
|
The additional package `icingacli` is necessary to follow further steps in this guide.
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if debian %} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
#### Debian
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
```bash
|
2017-11-05 21:47:13 +01:00
|
|
|
apt-get install icingaweb2 icingacli
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if ubuntu %} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
#### Ubuntu
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
```bash
|
2018-01-15 13:09:21 +01:00
|
|
|
apt-get install icingaweb2 libapache2-mod-php icingacli
|
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
The additional package `libapache2-mod-php` is necessary on Ubuntu to automatically
|
|
|
|
install a web server and PHP and make Icinga Web 2 work out-of-the-box.
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
|
|
|
|
<!-- {% if centos or rhel or amazon_linux %} -->
|
|
|
|
!!! tip
|
|
|
|
|
|
|
|
If you have [SELinux](90-SELinux.md) enabled, the package `icingaweb2-selinux` is also required.
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
|
|
|
|
<!-- {% if centos %} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
#### CentOS
|
|
|
|
<!-- {% endif %} -->
|
2019-11-20 15:52:41 +01:00
|
|
|
```
|
|
|
|
dnf install icingaweb2 icingacli
|
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if rhel %} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
#### RHEL
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
#### RHEL 8
|
|
|
|
```bash
|
|
|
|
dnf install icingaweb2 icingacli
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
|
|
|
|
#### RHEL 7
|
|
|
|
```bash
|
2015-06-22 12:03:56 +02:00
|
|
|
yum install icingaweb2 icingacli
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2017-09-26 18:52:32 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if sles %} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
#### SLES
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
```bash
|
2015-06-22 12:03:56 +02:00
|
|
|
zypper install icingaweb2 icingacli
|
2016-02-17 15:26:52 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2015-04-16 13:59:17 +02:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if amazon_linux %} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
#### Amazon Linux 2
|
|
|
|
<!-- {% endif %} -->
|
|
|
|
```bash
|
|
|
|
yum install icingaweb2 icingacli
|
2017-01-24 14:52:05 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% endif %} -->
|
2017-01-24 14:52:05 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Install the Web Server <a id="install-the-web-server"></a>
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Make sure you have a web server with PHP up and running before moving on.
|
|
|
|
Please refer to the [installation requirements](#installation-requirements) for details about supported versions.
|
|
|
|
Depending on your OS you might have to install, and configure the web server separately.
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
## Prepare Web Setup <a id="prepare-web-setup-from-package"></a>
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
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`:
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
icingacli setup token create
|
2017-11-24 17:37:11 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
In case you do not remember the token you can show it using the `icingacli`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
icingacli setup token show
|
2017-11-24 17:37:11 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if debian or ubuntu %} -->
|
|
|
|
You need to manually create a database and a database user prior to starting the web wizard.
|
|
|
|
This is due to local security restrictions whereas the web wizard cannot create a database/user through
|
|
|
|
a local unix domain socket.
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
MariaDB [mysql]> CREATE DATABASE icingaweb2;
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
MariaDB [mysql]> GRANT ALL ON icingaweb2.* TO icingaweb2@localhost IDENTIFIED BY 'CHANGEME';
|
2017-11-24 17:37:11 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
You may also create a separate administrative account with all privileges instead.
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
!!! note
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
This is only required if you are using a local database as authentication type.
|
|
|
|
<!-- {% endif %} -->
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### Start Web Setup <a id="start-web-setup-from-package"></a>
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Finally visit Icinga Web 2 in your browser to access the setup wizard and complete the installation:
|
|
|
|
`/icingaweb2/setup`.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if debian or ubuntu %} -->
|
|
|
|
!!! hint
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Use the same database, user and password details created above when asked.
|
|
|
|
<!-- {% endif %} -->
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
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.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if sles %} -->
|
|
|
|
!!! note
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
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`.
|
|
|
|
<!-- {% endif %} -->
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% if centos or rhel or amazon_linux %} -->
|
|
|
|
!!! note
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
If you have SELinux enabled, please ensure to either have the selinux package for Icinga Web 2 installed, or disable it.
|
|
|
|
<!-- {% endif %} -->
|
2017-11-24 17:37:11 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
<!-- {% else %} --><!-- {# end from_source elif #} -->
|
|
|
|
<!-- {% if not icingaDocs %} -->
|
|
|
|
## Installing Icinga Web 2 from Source <a id="installing-from-source"></a>
|
|
|
|
<!-- {% endif %} -->
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Although the preferred way of installing Icinga Web 2 is to use packages, it is also possible to install Icinga Web 2
|
|
|
|
directly from source.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### Getting the Source <a id="getting-the-source"></a>
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
First of all, you need to download the sources.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Git clone:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cd /usr/share/
|
|
|
|
git clone https://github.com/Icinga/icingaweb2.git icingaweb2
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Tarball download (latest [release](https://github.com/Icinga/icingaweb2/releases/latest)):
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
cd /usr/share
|
|
|
|
wget https://github.com/Icinga/icingaweb2/archive/v2.9.5.zip
|
|
|
|
unzip v2.9.5.zip
|
|
|
|
mv icingaweb2-2.9.5 icingaweb2
|
2019-11-20 15:52:41 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### Installing Requirements from Source <a id="installing-from-source-requirements"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
You will need to install certain dependencies depending on your setup:
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
* [Icinga 2](https://icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL)
|
|
|
|
* A web server, e.g. Apache or Nginx
|
2022-01-18 14:59:30 +01:00
|
|
|
* PHP version >= 7.2
|
2022-03-24 15:46:26 +01:00
|
|
|
* [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.9)
|
|
|
|
* [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.11)
|
2022-02-16 09:10:54 +01:00
|
|
|
* The following PHP modules must be installed: cURL, json, gettext, fileinfo, intl, dom, OpenSSL and xml
|
|
|
|
* 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
|
|
|
|
* MySQL or PostgreSQL PHP libraries
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
The following example installs Apache2 as web server, MySQL as RDBMS and uses the PHP adapter for MySQL.
|
|
|
|
Adopt the package requirements to your needs (e.g. adding ldap for authentication) and distribution.
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Example for RHEL/CentOS/Fedora:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yum install httpd mysql-server
|
|
|
|
yum install php php-gd php-intl
|
2019-11-20 15:52:41 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
The setup wizard will check the pre-requisites later on.
|
2019-11-20 15:52:41 +01:00
|
|
|
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### Installing Icinga Web 2 <a id="installing-from-source-example"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Choose a target directory and move Icinga Web 2 there.
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
```bash
|
|
|
|
mv icingaweb2 /usr/share/icingaweb2
|
|
|
|
```
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### Configuring the Web Server <a id="configuring-web-server"></a>
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Use `icingacli` to generate web server configuration for either Apache or nginx.
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**Apache**:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup config webserver apache --document-root /usr/share/icingaweb2/public
|
|
|
|
```
|
2019-11-20 15:52:41 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**nginx**:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup config webserver nginx --document-root /usr/share/icingaweb2/public
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Save the output as new file in your webserver's configuration directory.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Example for Apache on RHEL or CentOS:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup config webserver apache --document-root /usr/share/icingaweb2/public > /etc/httpd/conf.d/icingaweb2.conf
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Example for Apache on SUSE:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup config webserver apache --document-root /usr/share/icingaweb2/public > /etc/apache2/conf.d/icingaweb2.conf
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Example for Apache on Debian Jessie:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup config webserver apache --document-root /usr/share/icingaweb2/public > /etc/apache2/conf-available/icingaweb2.conf
|
|
|
|
a2enconf icingaweb2
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Example for Apache on Alpine Linux:
|
|
|
|
```bash
|
|
|
|
icingacli setup config webserver apache --document-root /usr/share/webapps/icingaweb2/public > /etc/apache2/conf.d/icingaweb2.conf
|
|
|
|
```
|
|
|
|
### Preparing Icinga Web 2 Setup <a id="preparing-web-setup-from-source"></a>
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
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. Please follow the steps listed below for preparing the web setup.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Because both web and CLI must have access to configuration and logs, permissions will be managed using a special
|
|
|
|
system group. The web server user and CLI user have to be added to this system group.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Add the system group `icingaweb2` in the first place.
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**Fedora, RHEL, CentOS, SLES and OpenSUSE**:
|
|
|
|
```bash
|
|
|
|
groupadd -r icingaweb2
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**Debian and Ubuntu**:
|
|
|
|
```bash
|
|
|
|
addgroup --system icingaweb2
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Add your web server's user to the system group `icingaweb2`
|
|
|
|
and restart the web server:
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**Fedora, RHEL and CentOS**:
|
|
|
|
```bash
|
|
|
|
usermod -a -G icingaweb2 apache
|
|
|
|
service httpd restart
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**SLES and OpenSUSE**:
|
|
|
|
```bash
|
|
|
|
usermod -A icingaweb2 wwwrun
|
|
|
|
service apache2 restart
|
|
|
|
```
|
2017-11-16 11:22:15 +01:00
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
**Debian and Ubuntu**:
|
|
|
|
```bash
|
|
|
|
usermod -a -G icingaweb2 www-data
|
|
|
|
service apache2 restart
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
2022-02-16 09:10:54 +01:00
|
|
|
|
|
|
|
**Alpine Linux**:
|
|
|
|
```bash
|
|
|
|
gpasswd -a apache icingaweb2
|
|
|
|
rc-service apache2 restart
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
Use `icingacli` to create the configuration directory which defaults to **/etc/icingaweb2**:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup config directory
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
When using the web setup you are required to authenticate using a token. In order to generate a token use the
|
|
|
|
`icingacli`:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup token create
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
In case you do not remember the token you can show it using the `icingacli`:
|
|
|
|
```bash
|
|
|
|
./bin/icingacli setup token show
|
2017-11-16 11:22:15 +01:00
|
|
|
```
|
|
|
|
|
2022-02-16 09:10:54 +01:00
|
|
|
### Icinga Web 2 Setup Wizard <a id="web-setup-from-source-wizard"></a>
|
|
|
|
|
|
|
|
Finally visit Icinga Web 2 in your browser to access the setup wizard and complete the installation:
|
|
|
|
`/icingaweb2/setup`.
|
|
|
|
|
|
|
|
Paste the previously generated token and follow the steps on-screen. Then you are done here.
|
|
|
|
|
|
|
|
If you prefer to set up the configuration manually, follow the
|
|
|
|
[Icinga Web 2 Manual Configuration instructions](20-Advanced-Topics.md#web-setup-manual-from-source-config)
|
|
|
|
<!-- {% endif %} --><!-- {# end index if #} -->
|