Icinga / Icinga Web2 Installation on CentOS 7

Hello, I’m completely lost trying to install onto a CentOS 7 box. I’ve followed the various installation pages as best as I can but I’m still gettting page not found on browsing to /icinga/setup

I’ve kept a log of the various commands/steps I ran as I followed the guides, any help greatlky appreciated

System cleanly installed and yum -y updates run.

Linux bhmmonmas01.mydomain.local 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

yum -y install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm

yum -y install epel-release

yum -y install icinga2

systemctl enable icinga2

systemctl start icinga2

icinga2 feature list

Disabled features: api command compatlog debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: checker mainlog notification

yum -y install nagios-plugins-all

yum -y install icinga2-selinux

yum -y install vim-icinga2

Setting up Icinga Web 2

yum -y install mariadb-server mariadb

systemctl enable mariadb
systemctl start mariadb

mysql_secure_installation

yum -y install icinga2-ido-mysql

Set up a MySQL database for Icinga 2:

mysql -u root -p
CREATE DATABASE icinga;
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO ‘icinga’@‘localhost’ IDENTIFIED BY ‘icinga’;
quit

icinga2 feature enable ido-mysql

systemctl restart icinga2

yum -y install httpd

firewall-cmd --add-service=http
firewall-cmd --permanent --add-service=http

systemctl restart icinga2

systemctl enable httpd
systemctl start httpd

Icinga Web 2 install

yum install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm

yum install epel-release

yum install centos-release-scl

yum install icingaweb2 icingacli icingaweb2-selinux

yum install httpd

systemctl start httpd.service
systemctl enable httpd.service

systemctl start rh-php71-php-fpm.service

systemctl enable rh-php71-php-fpm.service

yum install rh-php71-php-mysqlnd

What I had to do on CentOS installs was setting up some firewall rules.
I will just copy the whole block of rules I am enabling.

firewall-cmd --add-service=http
firewall-cmd --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-port=80/tcp
firewall-cmd --zone=public --permanent --add-port=5665/tcp
firewall-cmd --zone=public --permanent --add-port=5666/tcp
firewall-cmd --permanent --add-service=smtp
firewall-cmd --permanent --add-service=submission
firewall-cmd --permanent --add-service=smtps
firewall-cmd --permanent --add-port=25/tcp
firewall-cmd --reload
setsebool -P httpd_can_network_connect 1
setsebool -P httpd_can_network_connect_db 1

Hope this helps.
Also maybe check if disabling SELinux (temporarily) helps, and maybe define some additional rules for it. Can’t really help you there though, I’m afraid

The default is /icingaweb2/setup if you didn’t modify the apache configuration provided by the packages.

1 Like

Setting SELinux to permissive if you lack experience with Icinga but the packages should provide all you need for Icinga to run on an SELinux-enabled system.

Same goes for the firewall. You might want to deactivate firewalld while you’re still learning and testing but with the rules @log1c showed above it should work. I would add port 443/tcp and remove the smtp ports, though.

Remember that there’s a SELinux boolean for MySQL/MariaDB connection via network, too if you want to connect via port not localhost.

BTW: Welcome to the community, @mattb