How to Install Icingaweb2 Ubuntu 14.04 LTS

Step 1: Add the Icinga repository and install icinga2.

# add-apt-repository ppa:formorer/icinga
# apt-get update
# apt-get install icinga2

Step 2: Install MySQL and client.
# apt-get install mysql-server mysql-client
Enter mysql root password and confirm password

Step 3: Install icinga database.
# apt-get install icinga2-ido-mysql
Enable Icinga 2's ido-mysql fetures "Yes" enter

Step 4: Login in MySQL and create a database for storing data.
# mysql -u root -p
mysql> CREATE DATABASE icinga;
mysql> quit
Step 5: Enable livestatus feature and restart Icinga deamon.
# icinga2 feature enable livestatus
# service icinga2 restart
Step 6: Add user to the group for permissions.
# usermod -a -G nagios www-data
Step 7: Enable compat log and database feature and restart Icinga.
# icinga2 feature enable compatlog
# icinga2 feature enable ido-mysql
# icinga2 feature enable command
# service icinga2 restart

“ install web interface of Icinga.”

Step 1: Clone Icinga web repository from Github.
# apt-get install git
# git clone git://
Step 2: Move cloned directory to /usr/share/icingaweb and navigate to it.
# mv icingaweb2 /usr/share/icingaweb
# cd /usr/share/icingaweb
Step 3: Install lamp server
# tasksel install lamp-server
Step 4: run the following command.
# ./bin/icingacli setup config webserver apache --document-root /usr/share/icingaweb/public

Step 5: copy paste the generated output in sites-enabled.
vi /etc/apache2/sites-enabled/000-default.conf

Step 6: Enable apache module rewrite and restart service
# service apache2 restart
# a2enmod rewrite
# service apache2 restart

Step 7: Create a directory in which icinga web will keep all of its authentication files
# mkdir /etc/icingaweb2
Step 8: Change its permission to 777
 # chmod 777 -R /etc/icingaweb2
Step 9: Open your browser and navigate to localhost/icingaweb2/setup.
Acces icinga setup in browser
It will ask for setup token, you can  generate it by running the following command on the terminal.
su www-data --shell=/bin/bash -c "mkdir -m 2770 /etc/icingaweb2; head -c 12 /dev/urandom | base64 | tee /etc/icingaweb2/setup.token; chmod 0660 /etc/icingaweb2/setup.token;";

In next screen it will be asking to resolve some problems like, time zone and some php dependencies, change time zone to “Asia/TAIPEI” in /etc/php5/apache2/php.ini file 
# vi /etc/php5/apache2/php.ini
Uncomment  line 879
date.timezone = ASIA/TAIPEI
Timezone reference link
Step 8: Resolve php dependencies.
# apt-get install php5-ldap
# service apache2 restart
# apt-get install php5-intl
# apt-get install php5-gd php5-imagick
# service apache2 restart
Step 9: Back to icingaweb2 interface, Choose Module want to install then next leave default
 Step 10:Configure database resource then click next.
Step 11:Authentication Backend “icingaweb2” then next
Step 12:Administration, Fillup user name administrator and password for icingaweb2 Login.
Step 13:Application Configuration.
Step 14:Summary icingaweb2 configuration it shows successfully configured,click next in Welcome page.
Step 15:Monitoring Backend click next.
Step 16:Fillup with your database credential in Monitoring IDO Resource, Click “Validate Configuration” to check database configuration.
Step 17:Leave default for Command Transport,Monitoring Security and finish.
Step 18:Congratulations you successfully install Icingaweb2.
For Adding monitoring you may find in this post

Leave a Reply

Your email address will not be published.