This guide was originally written for Ubuntu but will work for Raspbian (Debian Jessie) flavor for RasberryPi as well. It might work for all debian distros but not guaranteed, you can try it out yourself. I “borrowed” this guide from here and rewrote it to fix the mistakes they had in their article.
NOTE: This guide is valid only for RaspberryPi Jessie.
The steps below assume you have Raspbian Jessie installed on your Raspberry PI 3.
Login to Raspbian. Default login is:
Become root user
Download required packages via yum
apt-get install apache2 libapache2-mod-php5 build-essential libgd2-xpm-dev
Create Nagios user
/usr/sbin/useradd -m -s /bin/bash nagios
Change nagios use password
Now Create a group for allowing external comands via the WEB UI and then add both Nagios and Apache user to it.
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd www-data
Create a directory for Nagios downloads
Untar the downloaded files
tar zxvf nagios-4.1.1.tar.gz
And then you will get 2 folders with the name “nagios-4.1.1” & “nagios-plugins-2.1.1”
First we will start with Nagios Core Install.
Change directory to Nagios 4.1.1
Compile the source and install it. All the files would go into “/usr/local/nagios/”
Run this command to successfully install-webconf. (problem area not sure the below is 100% correct)
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf
service apache2 reload