Installing Nagios XI on CentOS 7
First things first, why CentOS 7 instead of 6? Well, CentOS 6 has issues with Python updating because of yum. Yes, you can install a separate instance, but it’s not fun and it can break down the road. Second, why not use the OVA provided by Nagios? As of September 2017, the version of Python on the OVA is ancient — 2.6.6. And because yum is tied to it, you can’t update it or you need to install a separate instance. Yuck! Just do yourself a favor and use CentOS 7 instead. 😉 Last but not least, it is super easy to do!Download the latest version of CentOS. We are going to use the minimal ISO.
Follow the prompts to install minimal CentOS 7. If you are installing virtually, I would recommend 2 CPUs, 2GB of RAM, and 50GB of hard disk (thin provisioned is fine).
After the install completes, run the command below to ensure you are on the latest packages as well.
# yum update
While there, also install the net-tools and mlocate packages… You’ll thank me later!
# yum install net-tools mlocate
If you are installing on ESXi/VMWare as a virtual machine, go ahead and add the VM tools as well.
# yum install open-vm-tools
At this point, a reboot is probably a good idea if you haven’t already. If you install the VM tools, a reboot is necessary before info will show up in ESXi/VMWare.
Next, go ahead and install Nagios XI using the command below.
curl https://assets.nagios.com/downloads/nagiosxi/install.sh | sh
If that doesn’t work, follow the guide at the link below instead.
Now just login via using your web browser of choice using the IP address shown on the screen, e.g. http://192.168.4.10/nagiosxi
Follow the onscreen commands and you are good to go… But wait!
So you think you’re done because you can login? Wrong! You should always access your Nagios console via HTTPS instead of HTTP. The problem is the Nagios XI installer doesn’t open up 443/HTTPS by default. No big deal, a couple of commands below and we are good to go.
# firewall-cmd --add-service=https # firewall-cmd --permanent --add-service=https
Dallas Haselhorst has worked as an IT and information security consultant for over 20 years. During that time, he has owned his own businesses and worked with companies in numerous industries. Dallas holds several industry certifications and when not working or tinkering in tech, he may be found attempting to mold his daughters into card carrying nerds and organizing BSidesKC.
2 thoughts on “Installing Nagios XI on CentOS 7”
Thanks for the write-up but I have followed the steps outlined here and still the web interface is not coming up.
What else should I do
Hey Christian! Can you verify if the web server is running via ‘netstat -ano | grep 80’ (or 443) from the command line? If you see 80 (or 443) and LISTEN on one of the output lines, then your firewall rules didn’t apply properly.