Инсталляция Icinga в Ubuntu Linux (Xenial)


https://docs.icinga.com/icinga2/latest/doc/module/icinga2/chapter/getting-started#!/icinga2/latest/doc/module/icinga2/chapter/getting-started#setting-up-icinga2

https://github.com/Icinga/icingaweb2/blob/master/doc/02-Installation.md

Надо будет посмотреть:

https://www.youtube.com/watch?v=UQ0xAizmgKI https://www.youtube.com/watch?v=aE9B0ghweCo


# addgroup --system icingaweb2
# usermod -a -G icingaweb2 www-data


# apt-get install -y software-properties-common

# add-apt-repository -y ppa:formorer/icinga

# apt-get update

# apt-get install -y icinga2


# cd /tmp/
# wget https://www.monitoring-plugins.org/download/monitoring-plugins-2.2.tar.gz
# tar -zxvf monitoring-plugins-2.2.tar.gz
# cd monitoring-plugins-2.2

# ./configure
# make && make install


Apache, PHP

# apt-get install -y apache2 php libapache2-mod-php
# apt-get install -y php-gd php-imagick

# phpenmod gd
# phpenmod imagick

# vi /etc/php/7.0/apache2/php.ini

date.timezone = Europe/Moscow


# service apache2 restart


Настройка icinga

# apt-get install -y icingaweb2
# apt-get install -y icinga2-ido-mysql
Enable Icinga 2's ido-mysql feature? [yes/no] no
Configure database for icinga2-ido-mysql with dbconfig-common? [yes/no] no

<!-- # icingacli setup config webserver apache --document-root /usr/share/icingaweb2/public/ -->
# icingacli setup config webserver apache --document-root /usr/share/icingaweb2/public/ > /etc/apache2/sites-enabled/001-icinga.conf

# icinga2 feature enable ido-mysql
# icinga2 feature enable command

# icingacli setup config directory

# icingacli setup token create
The newly generated setup token is: d0b6c72e28c5a825

# service icinga2 restart


MySQL

# apt-get install -y mysql-server mysql-client
# service mysql restart

# mysql -u root -p

CREATE DATABASE icinga2;

GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga2.* TO 'icinga2'@'localhost' IDENTIFIED BY 'icinga2';


CREATE DATABASE icingaweb2;

GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icingaweb2.* TO 'icingaweb2'@'localhost' IDENTIFIED BY 'icingaweb2';

quit


# openssl passwd -1 myPass


# mysql -p icingaweb2


INSERT INTO icingaweb_user (name, active, password_hash) VALUES ('icingaadmin', 1, '$1$3HDF03w4$2EYLIAMJILGaQtMRbPSED1');

quit


<!-- # mysql -u root -p icinga </usr/share/icinga2-ido-mysql/schema/mysql.sql -->
# mysql -p icinga2 < /usr/share/icinga2-ido-mysql/schema/mysql.sql


# mysql -p icingaweb2 < /usr/share/icingaweb2/etc/schema/mysql.schema.sql

Возможно, позднее схема будет расположена здесь:

# mysql -p icingaweb2 < /usr/share/doc/icingaweb2/schema/mysql.schema.sql


Подключение браузером

localhost/icingaweb2/setup
вставляю token


icingaweb2 / icingaweb2