{"id":9185,"date":"2014-06-13T05:29:00","date_gmt":"2014-06-12T21:29:00","guid":{"rendered":"http:\/\/blog.pmail.idv.tw\/?p=9185"},"modified":"2014-06-13T05:29:00","modified_gmt":"2014-06-12T21:29:00","slug":"centos-6-5-%e5%ae%89%e8%a3%9d-nagios-core-4-0-1","status":"publish","type":"post","link":"https:\/\/blog.pmail.idv.tw\/?p=9185","title":{"rendered":"CentOS 6.5 \u5b89\u88dd Nagios Core 4.0.1"},"content":{"rendered":"<p>CentOS 6.5 \u5b89\u88ddNagios Core 4.0.1 \u7b46\u8a18<\/p>\n<p>\u4f7f\u7528yum install \u5b89\u88dd\u5fc5\u8981\u7684\u5957\u4ef6<\/p>\n<p>yum install -y httpd php gcc glibc glibc-common gd gd-devel make net-snmp<\/p>\n<p><!--more--><\/p>\n<p>\u5efa\u7acb\u4f7f\u7528\u8005\u96c6\u7fa4\u7d44<\/p>\n<p>\u6307\u4ee4:<br \/>useradd nagios<br \/>groupadd nagcmd<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4_thumb.jpg\" width=\"644\" height=\"407\"><\/a><\/p>\n<p>\u5c07 apache \u53ca nagios \u7528\u6236\u52a0\u5165nagcmd\u7fa4\u7d44<\/p>\n<p>usermod -G nagcmd nagios<br \/>usermod -G nagcmd apache<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-1\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-1\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-1_thumb.jpg\" width=\"644\" height=\"183\"><\/a><\/p>\n<p>\u4e0b\u8f09 Nagios Core 4.0.1 and Nagios Plugin 1.5<\/p>\n<p>wget <a href=\"http:\/\/prdownloads.sourceforge.net\/sourceforge\/nagios\/nagios-4.0.1.tar.gz\">http:\/\/prdownloads.sourceforge.net\/sourceforge\/nagios\/nagios-4.0.1.tar.gz<\/a><br \/>wget <a href=\"https:\/\/www.nagios-plugins.org\/download\/nagios-plugins-1.5.tar.gz\">https:\/\/www.nagios-plugins.org\/download\/nagios-plugins-1.5.tar.gz<\/a><\/p>\n<p>\u5c07\u4e0b\u8f09\u7684\u5957\u4ef6\u89e3\u58d3\u7e2e<\/p>\n<p>tar -xvf nagios-4.0.1.tar.gz\u5b6c<br \/>tar -xvf nagios-plugins-1.5.tar.gz<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-2.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-2\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-2\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-2_thumb.jpg\" width=\"644\" height=\"151\"><\/a><\/p>\n<p>\u5207\u63db\u5230 \u89e3\u58d3\u7e2e\u5f8c\u7684 nagios-4.0.1 \u76ee\u9304<\/p>\n<p>\u57f7\u884c<strong><font color=\"#ff0000\"> .\/configure &#8211;with-command-group=nagcmd<\/font><\/strong><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-4.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-4\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-4\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-4_thumb.jpg\" width=\"644\" height=\"453\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-3.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-3\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-3\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-3_thumb.jpg\" width=\"641\" height=\"484\"><\/a><\/p>\n<p>\u518d\u4f86\u57f7\u884c <\/p>\n<p>make all<br \/>make install<\/p>\n<p>install the init scripts for Nagios =&gt; \u8a72\u76ee\u9304\u57f7\u884c <font color=\"#ff0000\">make install-init<\/font><\/p>\n<p>install command-mode =&gt; \u8a72\u76ee\u9304\u57f7\u884c <font color=\"#ff0000\">make install-commandmode<\/font><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-5.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-5\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-5\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-5_thumb.jpg\" width=\"644\" height=\"266\"><\/a><\/p>\n<p>install sample nagios files&nbsp; =&gt; \u8a72\u76ee\u9304\u57f7\u884c <font color=\"#ff0000\">make install-config<\/font><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-6.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-6\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-6\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-6_thumb.jpg\" width=\"644\" height=\"237\"><\/a><\/p>\n<p>\u5b89\u88dd web \u4ecb\u9762 for Nagios<\/p>\n<p>make install-webconf<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-7.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-7\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-7\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-7_thumb.jpg\" width=\"644\" height=\"447\"><\/a><\/p>\n<p>htpasswd \u8a2d\u5b9a\u4f7f\u7528\u8005\u548c\u5bc6\u78bc<\/p>\n<p>\u6307\u4ee4: htpasswd -s -c \/usr\/local\/nagios\/etc\/htpasswd.users nagiosadmin<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-8.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-8\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-8\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-8_thumb.jpg\" width=\"644\" height=\"115\"><\/a><\/p>\n<p>\u91cd\u65b0\u555f\u52d5 apache <\/p>\n<p>\u6307\u4ee4 : service httpd restart<\/p>\n<p>\u5b89\u88dd Nagios Plugin<\/p>\n<p>\u5207\u63db\u81f3\u524d\u9762\u6b65\u9a5fplugin \u89e3\u58d3\u7e2e\u76ee\u9304&nbsp; nagios-plugins-1.5<\/p>\n<p>\u57f7\u884c\u4ee5\u4e0b\u6307\u4ee4:<\/p>\n<p>.\/configure &#8211;with-nagios-user=nagios &#8211;with-nagios-group=nagiosmake<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-9.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-9\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-9\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-9_thumb.jpg\" width=\"644\" height=\"300\"><\/a><br \/>make <br \/>make instll<\/p>\n<p>\u78ba\u5b9a\u8a2d\u5b9a\u6a94\u662f\u5426\u6709\u554f\u984c <\/p>\n<p>\u6307\u4ee4 <br \/>\/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-10.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-10\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-10\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-10_thumb.jpg\" width=\"644\" height=\"455\"><\/a><\/p>\n<p>\u555f\u52d5Nagios \u670d\u52d9 =&gt; \u6307\u4ee4 service nagios start<\/p>\n<p>\u958b\u6a5f\u81ea\u52d5\u555f\u52d5 =&gt; \u6307\u4ee4 chkconfig nagios on<\/p>\n<p>Nagios \u767b\u5165\u7db2\u5740 <a href=\"http:\/\/ip\/nagios\">http:\/\/ip\/nagios<\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-11.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"nagios-4-11\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"nagios-4-11\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2014\/06\/nagios-4-11_thumb.jpg\" width=\"644\" height=\"311\"><\/a><\/p>\n<div class=\"21cd169d3c0f71e95b84db320302cb4a\" data-index=\"1\" style=\"float: right; margin:10px 0 10px 10px;\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8711325745898650\"\r\n     crossorigin=\"anonymous\"><\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>CentOS 6.5 \u5b89\u88ddNagios Core 4.0.1 \u7b46\u8a18 \u4f7f\u7528yum  &hellip; <a href=\"https:\/\/blog.pmail.idv.tw\/?p=9185\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-9185","post","type-post","status-publish","format-standard","hentry","category-linux-nagios"],"_links":{"self":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/9185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9185"}],"version-history":[{"count":1,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/9185\/revisions"}],"predecessor-version":[{"id":11512,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/9185\/revisions\/11512"}],"wp:attachment":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}