Icinga 1.5.1 Installation unter Debian 6.0 Squeeze
Dieser Artikel zeigt die Installation von Icinga 1.5 mit Icinga-Web in Debian 6.0 Squeeze. Die Icinga Software kommt dabei von icinga.org und muss kompiliert werden. Icinga wird in diesem Beispiel mit der Datenbank-Schnittstelle IDO (Icinga Data Out)[1] installiert. Als Backend-Datenbank kommt MySQL zum Einsatz. Ziel des Artikels ist es, den aktuellen Entwicklungsstand von Icinga zu zeigen.
Für die Installation von Icinga 1.6.1 kann auf Icinga_1.6.1_Installation_unter_Debian_6.0_Squeeze zurückgegriffen werden.
Inhaltsverzeichnis |
Installation Icinga mit klassischem Webinterface
Die Installation von Icinga 1.5 wird mit folgenden Schritten durchgeführt:[2]
Installation Apache und MySQL
apt-get install apache2 build-essential libgd2-xpm-dev apt-get install mysql-server mysql-client libdbi0 libdbi0-dev libdbd-mysql
Anmerkung: Bei der Installation des MySQL Servers muss ein root Passwort für MySQL definiert werden.
Benutzer erstellen
useradd -m icinga passwd icinga
Für das Senden von Kommandos vom klassischen Interface an Icinga sind folgende Kommandos nötig:
/usr/sbin/groupadd icinga-cmd /usr/sbin/usermod -a -G icinga-cmd icinga /usr/sbin/usermod -a -G icinga-cmd www-data
Installation Icinga
cd /usr/src wget http://sourceforge.net/projects/icinga/files/icinga/1.5.1/icinga-1.5.1.tar.gz/download mv download icinga-1.5.1.tar.gz tar xzf icinga-1.5.1.tar.gz cd icinga-1.5.1 ./configure --with-command-group=icinga-cmd --enable-idoutils make all make fullinstall make install-config
In den Kontaktinformationen muss eine gültige E-Mail Adresse eingetragen werden:
vi /usr/local/icinga/etc/objects/contacts.cfg
cd /usr/local/icinga/etc/ mv idomod.cfg-sample idomod.cfg mv ido2db.cfg-sample ido2db.cfg
In der Icinga Konfiguration muss die Konfigurationszeile broker_module=... aktiviert werden werden (#-Kommentar entfernen, ab Icinga 1.4 kann alternativ auch eine Definition in der Object Konfigurationsdateien verwendet werden):
vi /usr/local/icinga/etc/icinga.cfg
Datenbank erstellen
mysql -u root -p mysql> CREATE DATABASE icinga; GRANT USAGE ON *.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0; GRANT SELECT , INSERT , UPDATE , DELETE ON icinga.* TO 'icinga'@'localhost'; FLUSH PRIVILEGES ; quit
cd /usr/src/icinga-1.5.1/module/idoutils/db/mysql mysql -u root -p icinga < mysql.sql
Installation des klassischen Web-Interfaces
cd /usr/src/icinga-1.5.1 make cgis make install-cgis make install-html make install-webconf
Für den Zugriff auf das klassische Web-Interface muss der Benutzer icingaadmin erstellt werden:
htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
Installation Nagios Plugins
cd /usr/src wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download mv download nagios-plugins-1.4.15.tar.gz tar xzf nagios-plugins-1.4.15.tar.gz cd nagios-plugins-1.4.15 ./configure --prefix=/usr/local/icinga --with-cgiurl=/icinga/cgi-bin --with-htmurl=/icinga --with-nagios-user=icinga --with-nagios-group=icinga make make install
IDOutils und Icinga starten
Die letzte Ausgabe der folgenden Kommandos darf keine Fehler anzeigen:
/etc/init.d/ido2db start /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
/etc/init.d/icinga start
Abweichend von der Icinga Doku für Debian 6: Zuerst in /etc/init.d/icinga bei Default-Start den runlevel 2 ergänzen, anschließend update-rc.d ausführen:
vi /etc/init.d/icinga update-rc.d ido2db defaults update-rc.d icinga defaults
Installation Icinga Web
Installation
Die Installation von Icinga Web 1.5 wird mit folgenden Schritten durchgeführt:[3]
apt-get install php5 php5-cli php-pear php5-xmlrpc php5-xsl php5-gd php5-ldap php5-mysql cd /usr/src/ wget http://sourceforge.net/projects/icinga/files/icinga-web/1.5.2/icinga-web-1.5.2.tar.gz/download mv download icinga-web-1.5.2.tar.gz tar xzf icinga-web-1.5.2.tar.gz cd icinga-web-1.5.2 ./configure make install make install-apache-config make install-done
PHP Abhängigkeiten
make testdepsDatenbank erstellen
mysql -u root -p GRANT USAGE ON *.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'icinga_web' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON icinga_web.* TO 'icinga_web'@'localhost'; quit make db-initialize
Use the db-user specified in icinga-webs database.xml (Needs create Database/create Table rights)?(n,y)? y
Apache Konfiguration
a2enmod rewrite /etc/init.d/apache2 restart
Unter http://IP-Adresse/icinga-web/ ist Icinga-Web nun erreichbar. Sie können sich mit folgenden Daten einloggen und anschließend das Passwort ändern:
- Benuterzname: root
- Passwort: password
Einzelnachweise
- ↑ Aufbau und erweiterte Features von Icinga Core (netways.de)
- ↑ Icinga with IDOUtils Quickstart (Icinga Version 1.5 Documentation)
- ↑ Installation of the Icinga-Web Frontend (Icinga Version 1.5 Documentation)
