{"id":3936,"date":"2019-08-11T00:06:20","date_gmt":"2019-08-10T21:06:20","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3936"},"modified":"2019-10-21T09:52:46","modified_gmt":"2019-10-21T06:52:46","slug":"install-icinga-web-2-on-debian-10-buster","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-icinga-web-2-on-debian-10-buster\/","title":{"rendered":"Install Icinga Web 2 on Debian 10 Buster"},"content":{"rendered":"\n
In this guide, we are going to learn how to install Icinga Web 2 on Debian 10 Buster as our continuation for our guide on how to Install Icinga 2 on Debian 10 Buster<\/a>. Icinga Web 2 is a powerful PHP framework that provides web management interface for Icinga 2.<\/p>\n\n\n\n Icinga Web 2 requires Icinga 2 with IDO configured. Other requirements include a web server, PHP and some extensions, MySQL\/MariaDB or PostgreSQL. Run the command below to install these requirements before you can proceed.<\/p>\n\n\n\n Note that we have already configured IDO and installed MariaDB server in our previous guide<\/a>.<\/p>\n\n\n\n If you have followed our previous guide on installing Icinga 2 on Debian 10 Buster, then Icinga 2 apt repos have been installed. Otherwise, you can install the repos by running the commands below;<\/p>\n\n\n\n Run system package update.<\/p>\n\n\n\n Install Icinga 2 web and CLI management packages.<\/p>\n\n\n\n Icinga web setup requires authentication using tokens. To generate the authentication token, run the command below;<\/p>\n\n\n\n This will generate such a token as:<\/p>\n\n\n\n You can always display the taken using the command;<\/p>\n\n\n\n Also, ensure that the icingaweb2<\/strong> system group exists and that the web server user, www-data<\/strong>, is a member of the group.<\/p>\n\n\n\n Restart Apache web server.<\/p>\n\n\n\n Login to MySQL database server.<\/p>\n\n\n\n Create Icinga Web 2 database. (Note, replace the name of the database, icingaweb2db<\/strong>, accordingly)<\/p>\n\n\n\n Create Icinga 2 database user. (Also, replace the username, icingaweb2admin<\/strong>, and the password, PassWORD<\/strong>, accordingly)<\/p>\n\n\n\n Reload privileges tables and quit.<\/p>\n\n\n\n To access the setup wizard, use the address, http:\/\/<icinga-server-IP>\/icingaweb2\/setup<\/strong><\/p>\n\n\n\n Enter your authentication token and click <\/strong>next to proceed. On the next page, select Icinga modules to enable.<\/p>\n\n\n\n The next page verifies if the required PHP extensions are met. If there are any missing PHP extensions, install them and proceed with setup.<\/p>\n\n\n\n Configure Icinga Web 2 authentication method. This guide uses local authentication hence, selecting Database<\/strong> as the type of authentication.<\/p>\n\n\n\n Configure database authentication details. Click validate to test connection to DB.<\/p>\n\n\n\n Set the Icinga web 2 authentication backend name and click Next<\/strong>.<\/p>\n\n\n\n Setup Icinga Web 2 administrative user. Note, these are the authentication details for Icinga Web interface.<\/p>\n\n\n\n Configure application and logging related options and click Next.<\/p>\n\n\n\n Icinga Web 2 configuration summary.<\/p>\n\n\n\n On the next screen, click next to configure Icinga Web 2 monitoring (IDO) backend.<\/p>\n\n\n\n Configure authentication details for the IDO database set in the previous guide<\/a>.<\/p>\n\n\n\n If you get the error, “There is currently no icinga instance writing to the IDO. Make sure that a icinga instance is configured and able to write to the IDO<\/strong>“, it means that the ido-mysql<\/strong> is not enabled. Enable it and restart Icinga 2 and proceed.<\/p>\n\n\n\n Configure Icinga Transport commands. In this guide, we are setting up Local command transport type. Read more on Icinga web 2 command transport<\/a>.<\/p>\n\n\n\n Define your custom variables to protect.<\/p>\n\n\n\n Review configuration summary and click Finish to complete the installation.<\/p>\n\n\n\n Click Login to Icinga Web 2<\/strong> to access Icinga web login page.<\/p>\n\n\n\n Upon Successful Login to Icinga 2, you should land on the default dashboard.<\/p>\n\n\n\n You have successfully learnt how to install Icinga Web 2 on Debian 10 Buster.<\/p>\n\n\n\n You can now add hosts to your Icinga for monitoring. See our link below on how to monitor Linux hosts with Icinga.<\/p>\n\n\n\n How to Monitor Remote Linux Hosts and Services with Icinga 2<\/a><\/p>\n\n\n\n Install Icinga 2 on Debian 10 Buster<\/a><\/p>\n\n\n\n How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS<\/a><\/p>\n\n\n\n Install Nagios Core on Debian 10 Buster<\/a><\/p>\n\n\n\n Install Zabbix 4.x from Sources on Debian 10 Buster<\/a><\/p>\n\n\n\n Nagios SNMP Monitoring of Linux Hosts on AlienVault USM\/OSSIM<\/a><\/p>\n\n\n\nInstall Icinga Web 2 on Debian 10 Buster<\/h3>\n\n\n\n
Prerequisites<\/h4>\n\n\n\n
apt install apache2 php php-{curl,gettext,intl,mbstring,xml,mysql} openssl<\/code><\/pre>\n\n\n\n
Install Icinga Web 2 APT Repository<\/h4>\n\n\n\n
apt install -y apt-transport-https wget gnupg<\/code><\/pre>\n\n\n\n
wget -O - https:\/\/packages.icinga.com\/icinga.key | apt-key add -<\/code><\/pre>\n\n\n\n
echo \"deb https:\/\/packages.icinga.com\/debian icinga-buster main\" > \/etc\/apt\/sources.list.d\/icinga.list\necho \"deb-src https:\/\/packages.icinga.com\/debian icinga-buster main\" >> \/etc\/apt\/sources.list.d\/icinga.list<\/code><\/pre>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
Install Icinga 2 Web<\/h4>\n\n\n\n
apt install icingaweb2 icingacli<\/code><\/pre>\n\n\n\n
Prepare Icinga 2 Web Setup<\/h4>\n\n\n\n
icingacli setup token create<\/code><\/pre>\n\n\n\n
The newly generated setup token is: b5acfsae3f618eae<\/strong><\/code><\/pre>\n\n\n\n
icingacli setup token show<\/code><\/pre>\n\n\n\n
id www-data<\/code><\/pre>\n\n\n\n
uid=33(www-data) gid=33(www-data) groups=33(www-data),117(icingaweb2<\/strong>)<\/code><\/pre>\n\n\n\n
systemctl restart apache2<\/code><\/pre>\n\n\n\n
Create Icinga Web 2 Database<\/h4>\n\n\n\n
mysql -u root -p<\/code><\/pre>\n\n\n\n
create database icingaweb2db<\/strong>;<\/code><\/pre>\n\n\n\n
grant all on icingaweb2db.* to icingaweb2admin@localhost identified by 'PassWORD';<\/code><\/pre>\n\n\n\n
flush privileges;\nquit<\/code><\/pre>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Related Tutorials;<\/h4>\n\n\n\n