5. GD development libraries If not, login as root and install it. [ [email_address] ~]$yum install httpd php gcc glibc glibc-common [ [email_address] ~]$:yum install gd gd-devel Install Nagios in Fedora
6. Now we have to create a user account and a group for Nagios. Also add the apache user account to the created group. Become root user and type: [ [email_address] ~]$useradd -m nagios [ [email_address] ~]$passwd nagios [ [email_address] ~]$groupadd nagcmd [ [email_address] ~]$usermod -a -G nagcmd nagios [ [email_address] ~]$usermod -a -G nagcmd apache Install Nagios in Fedora
7. Create a temporary folder for the downloads and download the latest version of Nagios Core and plugins. http://www.nagios.com/download [ [email_address] ~]$mkdir downloads [ [email_address] ~]$cd downloads Install Nagios in Fedora
8. Extract the Nagios tarball [ [email_address] ~]$cd downloads [ [email_address] downloads]$tar xvzf nagios-3.x.x.tar.gz [ [email_address] downloads]$cd nagios-3.x.x After this, we need to compile and install. [ [email_address] nagios-3.x.x]$./configure -–with-command-group=nagcmd [ [email_address] nagios-3.x.x]$make all [ [email_address] nagios-3.x.x]$make install [ [email_address] nagios-3.x.x]$make install-init [ [email_address] nagios-3.x.x]$make install-config [ [email_address] nagios-3.x.x]$make install-commandmode Install Nagios in Fedora
9. Install the Nagios web config file in the Apache conf.d directory. [ [email_address] nagios-3.x.x]$make install-webconf Use the htpasswd to create an account for logging into the Nagios web interface. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin Install Nagios in Fedora
10. Extract the Nagios plugins tarball [ [email_address] ~]$cd downloads [ [email_address] downloads]$tar xvzf nagios-plugins-1.4.x.tar.gz [ [email_address] ~downloads]$cd nagios-plugins-1.4.x After this, we need to compile and install. [ [email_address] nagios-plugins-1.4.x]$./configure --with-nagios-user=nagios --with-nagios-group=nagios [ [email_address] nagios-plugins-1.4.x]$make [ [email_address] nagios-plugins-1.4.x]$make install Install Nagios in Fedora
11. Check the Nagios configuration for errors. [ [email_address] ~]$/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg If there are no errors, start Nagios [ [email_address] ~]$service nagios start [ [email_address] ~]$/etc/init.d/nagios start or Install Nagios in Fedora
12. To start Nagios when the system boots type: [ [email_address] ~]$chkconfig --add nagios [ [email_address] ~]$chkconfig nagios on Install Nagios in Fedora
13. If you have SELinux installed and with the enforcing mode by default, you probably get some errors in Nagios web interface. You'll need to change the SELinux context of some Nagios folders. chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/ chcon -R -t httpd_sys_content_t /usr/local/nagios/share/ chcon -R -t httpd_sys_script_rw_t /usr/local/nagios/var/rw/ Install Nagios in Fedora