2014-08-12 13:10:45 +02:00
|
|
|
# Icinga Web 2 README for RPM Packages
|
|
|
|
|
|
|
|
This file will describe how to install Icinga Web 2 from an RPM
|
|
|
|
package (RHEL/CentOS/Fedora, SLES/OpenSUSE).
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2014-08-12 15:24:55 +02:00
|
|
|
* EPEL/OBS Repository for Zend Framework
|
2014-08-12 13:10:45 +02:00
|
|
|
* Apache 2.2+
|
|
|
|
* PHP 5.3+, Zend Framework, PHP PDO MySQL/PostgreSQL, PHP LDAP (optional)
|
|
|
|
* MySQL or PostgreSQL for internal DB
|
|
|
|
* Icinga 1.x or 2.x providing an IDO database (default: `icinga`)
|
|
|
|
* Icinga 1.x or 2.x providing an external command pipe (default: `icinga2.cmd`)
|
|
|
|
|
|
|
|
### SELinux
|
|
|
|
|
|
|
|
Disabled SELinux for sending commands via external command pipe
|
|
|
|
provided by Icinga (2) Core.
|
|
|
|
|
|
|
|
setenforce 0
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
## Webserver Configuration
|
|
|
|
|
|
|
|
Can be generated using the following local icingacli command:
|
|
|
|
|
|
|
|
/usr/share/icingaweb2/bin/icingacli setup config webserver apache
|
|
|
|
|
|
|
|
Pipe the output into `/etc/httpd/conf.d/icingaweb2.conf` or similar,
|
|
|
|
if not already existing.
|
|
|
|
|
|
|
|
## Setup Wizard
|
|
|
|
|
|
|
|
Navigate to `/icingaweb/setup` and follow the on-screen instructions.
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Support
|
|
|
|
|
|
|
|
Please use one of the listed support channels at https://support.icinga.org
|
|
|
|
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
## Manual Setup
|
|
|
|
|
|
|
|
### Internal DB Setup
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
Decide whether to use MySQL or PostgreSQL.
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
#### MySQL
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
mysql -u root -p
|
|
|
|
CREATE USER `icingaweb`@`localhost` IDENTIFIED BY 'icingaweb';
|
|
|
|
CREATE DATABASE `icingaweb`;
|
|
|
|
GRANT ALL PRIVILEGES ON `icingaweb`.* TO `icingaweb`@`localhost`;
|
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
quit
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
mysql -u root -p icingaweb < /usr/share/doc/icingaweb2*/schema/mysql.schema..sql
|
2014-08-12 13:10:45 +02:00
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
#### PostgreSQL
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
sudo su postgres
|
|
|
|
psql
|
|
|
|
postgres=# CREATE USER icingaweb WITH PASSWORD 'icingaweb';
|
|
|
|
postgres=# CREATE DATABASE icingaweb;
|
|
|
|
postgres=# \q
|
|
|
|
|
|
|
|
Add the `cingaweb` user for trusted authentication to your `pg_hba.conf` file
|
|
|
|
in `/var/lib/pgsql/data/pg_hba.conf` and restart the PostgreSQL server.
|
|
|
|
|
|
|
|
local icingaweb icingaweb trust
|
|
|
|
host icingaweb icingaweb 127.0.0.1/32 trust
|
|
|
|
host icingaweb icingaweb ::1/128 trust
|
|
|
|
|
|
|
|
Now install the `icingaweb` schema
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
bash$ psql -U icingaweb -a -f /usr/share/doc/icingaweb2*/schema/pgsql.schema.sql
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
### Configuration
|
2014-08-12 13:10:45 +02:00
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
#### Module Configuration
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
The monitoring module is enabled by default.
|
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
#### Backend configuration
|
2014-08-12 13:10:45 +02:00
|
|
|
|
2014-09-13 00:02:55 +02:00
|
|
|
`/etc/icingaweb2/resources.ini` contains the database backend information.
|
2014-08-12 13:10:45 +02:00
|
|
|
By default the Icinga 2 DB IDO is used by the monitoring module in
|
2014-09-13 00:02:55 +02:00
|
|
|
`/etc/icingaweb2/modules/monitoring/backends.ini`
|
2014-08-12 13:10:45 +02:00
|
|
|
|
|
|
|
The external command pipe is required for sending commands
|
|
|
|
and configured for Icinga 2 in
|
2015-08-26 14:06:09 +02:00
|
|
|
`/etc/icingaweb2/modules/monitoring/commandtransports.ini`
|
2014-08-12 13:10:45 +02:00
|
|
|
|
2014-11-14 00:30:39 +01:00
|
|
|
#### Authentication configuration
|
2014-08-12 13:10:45 +02:00
|
|
|
|
2014-09-13 00:02:55 +02:00
|
|
|
The `/etc/icingaweb2/authentication.ini` file uses the internal database as
|
2014-08-12 13:10:45 +02:00
|
|
|
default. This requires the database being installed properly before
|
|
|
|
allowing users to login via web console.
|
2014-11-14 00:30:39 +01:00
|
|
|
|
|
|
|
#### Default User
|
|
|
|
|
|
|
|
When not using the default setup wizard, you can generate a secure password hash with openssl
|
|
|
|
and insert that manually like so:
|
|
|
|
|
|
|
|
openssl passwd -1 "yoursecurepassword"
|
|
|
|
|
|
|
|
mysql -uicingaweb -p icingaweb
|
|
|
|
|
|
|
|
mysql> INSERT INTO icingaweb_user (name, active, password_hash) VALUES ('icingaadmin', 1, '$yoursecurepassword_hash');
|
|
|
|
|