tutorial: install nagios in fedora
TRANSCRIPT
![Page 1: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/1.jpg)
Tutorial: Installing Nagios in Fedora
![Page 2: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/2.jpg)
Before installing Nagios, ensure that the following packages are installed:
Apache
PHP
GCC Compiler
GD development libraries
If not, login as root and install it.
Install Nagios in FedoraInstall Nagios in Fedora
[root@localhost ~]$yum install httpd php gcc glibc glibccommon[root@localhost ~]$:yum install gd gddevel
![Page 3: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/3.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
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:
[root@localhost ~]$useradd m nagios[root@localhost ~]$passwd nagios[root@localhost ~]$groupadd nagcmd[root@localhost ~]$usermod a G nagcmd nagios[root@localhost ~]$usermod a G nagcmd apache
![Page 4: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/4.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
Create a temporary folder for the downloads and download the latest version of Nagios Core and plugins.
http://www.nagios.com/download
[root@localhost ~]$mkdir downloads[root@localhost ~]$cd downloads
![Page 5: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/5.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
Extract the Nagios tarball[root@localhost ~]$cd downloads[root@localhost downloads]$tar xvzf nagios3.x.x.tar.gz[root@localhost downloads]$cd nagios3.x.x
After this, we need to compile and install. [root@localhost nagios3.x.x]$./configure –withcommandgroup=nagcmd[root@localhost nagios3.x.x]$make all[root@localhost nagios3.x.x]$make install[root@localhost nagios3.x.x]$make installinit[root@localhost nagios3.x.x]$make installconfig[root@localhost nagios3.x.x]$make installcommandmode
![Page 6: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/6.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
Install the Nagios web config file in the Apache conf.d directory.
[root@localhost nagios3.x.x]$make installwebconf
Use the htpasswd to create an account for logging into the Nagios web interface.htpasswd c /usr/local/nagios/etc/htpasswd.users nagiosadmin
![Page 7: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/7.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
Extract the Nagios plugins tarball[root@localhost ~]$cd downloads[root@localhost downloads]$tar xvzf nagiosplugins1.4.x.tar.gz[root@localhost ~downloads]$cd nagiosplugins1.4.x
After this, we need to compile and install. [root@localhost nagiosplugins1.4.x]$./configure withnagiosuser=nagios withnagiosgroup=nagios[root@localhost nagiosplugins1.4.x]$make[root@localhost nagiosplugins1.4.x]$make install
![Page 8: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/8.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
Check the Nagios configuration for errors.
[root@localhost ~]$/usr/local/nagios/bin/nagios v /usr/local/nagios/etc/nagios.cfg
If there are no errors, start Nagios[root@localhost ~]$service nagios start
[root@localhost ~]$/etc/init.d/nagios start
or
![Page 9: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/9.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
To start Nagios when the system boots type:
[root@localhost ~]$chkconfig add nagios[root@localhost ~]$chkconfig nagios on
![Page 10: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/10.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
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/
![Page 11: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/11.jpg)
Install Nagios in FedoraInstall Nagios in Fedora
![Page 12: Tutorial: Install Nagios in Fedora](https://reader037.vdocuments.net/reader037/viewer/2022092905/5468a2c2af795924028b55d4/html5/thumbnails/12.jpg)
..:: Filipe Batista - 2009 ::..
filipebatista.bitdoo.com