{"id":729,"date":"2015-02-02T19:17:00","date_gmt":"2015-02-02T19:17:00","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=729"},"modified":"2015-02-11T17:25:49","modified_gmt":"2015-02-11T17:25:49","slug":"how-to-install-nagios-4-0-8-on-centos-6-5","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-install-nagios-4-0-8-on-centos-6-5\/","title":{"rendered":"How to Install Nagios 4.0.8 on CentOS 6.5"},"content":{"rendered":"<p>Install the prerequisite packages<\/p>\n<pre>yum install gd gd-devel httpd php gcc glibc glibc-common make perl wget<\/pre>\n<p>If you want to monitor SNMP you should install net-snmp now<\/p>\n<pre>yum install net-snmp net-snmp-utils\r\nservice snmpd start\r\nchkconfig snmpd on<\/pre>\n<p>Create the Nagios user.<\/p>\n<pre>useradd -m nagios\r\npasswd nagios\r\ngroupadd nagcmd\r\nusermod -a -G nagcmd nagios\r\nusermod -a -G nagcmd apache\r\n<\/pre>\n<p>Create a directory to download and build Nagios from<\/p>\n<pre>mkdir \/root\/nagios\r\ncd \/root\/nagios<\/pre>\n<p>Download Nagios and the Nagios plugins<\/p>\n<pre>wget http:\/\/sourceforge.net\/projects\/nagios\/files\/nagios-4.x\/nagios-4.0.8\/nagios-4.0.8.tar.gz\r\nwget nagios-plugins.org\/download\/nagios-plugins-2.0.3.tar.gz \r\n<\/pre>\n<p>Extract the Nagios zip<\/p>\n<pre>tar xvzf nagios-4.0.8.tar.gz\r\ncd nagios-4.0.8<\/pre>\n<p>Compile and make it<\/p>\n<pre>.\/configure\r\nmake all\r\nmake install\r\nmake install-init\r\nmake install-commandmode\r\nmake install-config\r\nmake install-webconf\r\n<\/pre>\n<p>Create a password so you can login to the web interface<\/p>\n<pre>htpasswd -c \/usr\/local\/nagios\/etc\/htpasswd.users nagiosadmin<\/pre>\n<p>Enable Nagios on startup<\/p>\n<pre> chkconfig nagios on<\/pre>\n<p>Start the service<\/p>\n<pre>service nagios start<\/pre>\n<p>Install the plugins.<\/p>\n<pre>cd ..\r\ntar xvzf nagios-plugins-2.0.2.tar.gz\r\ncd nagios-plugins-2.0.2\r\n.\/configure\r\nmake\r\nmake install\r\n<\/pre>\n<p>Start apache and make sure it starts on boot.<\/p>\n<pre>service httpd start\r\nchkconfig httpd on<\/pre>\n<p>You should now be able to access Nagios by going to https:\/\/nagiosserverip\/nagios<\/p>\n<p>If you run into issues check your firewall and make sure SELinux is disabled.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install the prerequisite packages yum install gd gd-devel httpd php gcc glibc glibc-common make perl wget If you want to monitor SNMP you should install net-snmp now yum install net-snmp net-snmp-utils service snmpd start chkconfig snmpd on Create the Nagios &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-install-nagios-4-0-8-on-centos-6-5\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,3,122],"tags":[17,212,7,123,213],"class_list":["post-729","post","type-post","status-publish","format-standard","hentry","category-centos-linux","category-linux","category-nagios","tag-centos","tag-centos-6","tag-linux-2","tag-nagios-2","tag-nagios-4"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=729"}],"version-history":[{"count":5,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/729\/revisions"}],"predecessor-version":[{"id":744,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/729\/revisions\/744"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}