Setting up Nagios Core in Ubuntu Server 16.10
This article defines the final procedure for installing and
configuring Nagios Core in Ubuntu Server 16.10 distributions.
First of all, make sure all steps described in this document are executed under root account.
In order to elevate, the following command must be submitted.
sudo -i
Before anything else, install the required dependencies
apt-get install wget unzip daemon build-essential apache2 php7.0-gd libgd2-xpm-dev libapache2-mod-php7.0 apache2-utils
Download Nagios Core and Nagios Plugins packets to your temporary files directory
cd /tmp/ wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.3.tar.gz wget https://nagios-plugins.org/download/nagios-plugins-2.1.4.tar.gz
Extract the compressed files and enter the Nagios Core generated folder
tar zxvf nagios-4.2.3.tar.gz tar zxvf nagios-plugins-2.1.4.tar.gz cd nagios-4.2.3/
Set the default account parameters aggregating Nagios and Apache with nagcmd group
useradd nagios groupadd nagcmd usermod -a -G nagcmd nagios usermod -a -G nagcmd www-data
Run the setup script and proceed with the components installation
./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/bin/sendmail make all && make install make install-init make install-config make install-commandmode /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf
Activate the CGI and rewrite modules, and restart Apache.
a2enmod cgi a2enmod rewrite service apache2 restart
Access Nagios Plugins folder and finish the standard system installation.
cd ../nagios-plugins-2.1.4/ ./configure --with-nagios-user=nagios --with-nagios-group=nagios make && make install
Create the default user for WEB access and launch Nagios service.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin /etc/init.d/nagios start
Ensure the necessary services are loaded at startup.
ln -s /etc/init.d/nagios /etc/systemd/system/multi-user.target.wants/nagios.service systemctl enable apache2 systemctl daemon-reload
After successfully completing the procedures, the Nagios Core web interface installation must be available.
In order to access it, browse to: http://server_ip/nagios
When prompted, just authenticate with the credentials designated to your web account (user: nagiosadmin, in this case).
For any troubleshooting regarding these steps, sign up to the global board: http://support.nagios.com/forum/
Additionally, refer to the official Nagios Core documentation found at: http://library.nagios.com/library/products/nagioscore/manuals/
Posted in: Nagios Core, Uncategorized
Leave a Comment (0) ↓