If you're upgrading from version 2.5 to 2.6, Dag's RPMs had a few quirks. Make sure you backup /etc/nagios before continuing.
[me@mymachine ~] service nagios stop[me@mymachine ~] cp -ar /etc/nagios /wherever/nagios_2.5_backup[me@mymachine ~] yum update nagios nagios-plugins nagios-devel nagios-plugins-nrpe
If cgi.cfg, misccommands.cfg, or checkcommands.cfg are missing or saved as .rpmsave or .rpmnew,then just copy them back from your backup that you just created. Otherwise, ignore the error justmentioned because the RPMs have been repaired. Thanks Dag! Also, there is a mistake int hecheck_linux_raid.pl script in the contributed plugins. This is easily fixed. Again, if you don't have anyproblems running this plugin, then it was fixed as well. This was brought to my attention from theNagios mailing list. A user had spooted this and reported things to the packager, so this is probablyresolved by now. Anyways, to correct the check_linux_raid.pl:
[me@mymachine ~] vim /usr/lib/nagios/plugins/contrib/check_linux_raid.plComment out line 26:use strict;#use lib utils.pmuse utils qw(%ERRORS);[me@mymachine ~] nagios -v /etc/nagios/nagios.cfg[me@mymachine ~] service nagios start
Set up Apache
Make sure you have Apache installed, then you'll need to quickly configure it if not. Chances are youprobably already have some web service running on your machine, but if not, get it running quickly thisway.
[me@mymachine ~] yum install httpd[me@mymachine ~] vim /etc/httpd/conf/httpd.conf
At least edit the server name directive to your IP address within /etc/httpd/conf/httpd.conf. Then turn onApache, and make sure it's set to start.
[me@mymachine ~] chkconfig httpd on[me@mymachine ~] service httpd start
Now open up a browser and see if your web server is running: http://localhost (or your IP). Youshould see the Apache 2 test page. If so, move along.If you require further assistance with getting Apache going, especially if you have a need to secure theserver, then please follow the documentation at http://www.apache.org. This will get your web serverup and running quickly, but provides no means of security what-so-ever, I just want to warn you. If you're running completely internal, then it shouldn't be a big deal. Ok, after you get that running, let'sinstall Nagios and start working on setting it up. By default, the RPMs you are going to installautomatically create a nagios.conf file for Apache to use. This file is in /etc/httpd/conf.d/nagios.conf.
HowTos/Nagios - CentOS Wikihttp://wiki.centos.org/HowTos/Nagios3 of 1618-Oct-12 8:15 AM