{"id":18208,"date":"2014-02-28T06:53:38","date_gmt":"2014-02-27T22:53:38","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/02\/28\/nagios-%e7%9a%84-web-%e7%ae%a1%e7%90%86%e4%bb%8b%e9%9d%a2-vshell\/"},"modified":"2021-03-18T17:23:50","modified_gmt":"2021-03-18T09:23:50","slug":"nagios-%e7%9a%84-web-%e7%ae%a1%e7%90%86%e4%bb%8b%e9%9d%a2-vshell","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/02\/28\/nagios-%e7%9a%84-web-%e7%ae%a1%e7%90%86%e4%bb%8b%e9%9d%a2-vshell\/","title":{"rendered":"Nagios \u7684 Web \u7ba1\u7406\u4ecb\u9762 &#8211; vshell"},"content":{"rendered":"<p>Nagios \u672c\u8eab\u5c31\u6709\u4e00\u500b Web \u7ba1\u7406\u4ecb\u9762\uff0c\u53ea\u662f\u756b\u9762\u6709\u4e9b\u7a0d\u5fae\u8907\u96dc\uff0c\u6240\u4ee5\u6709\u4e00\u500b\u4f7f\u7528 PHP \u958b\u767c\u7684 Web \u4ecb\u9762\uff0c\u6bd4\u8f03\u7cbe\u7c21\u76f4\u89ba\u3002<br \/>Nagios vshell \u4e0b\u8f09\u7db2\u7ad9\uff1a<a href=\"http:\/\/exchange.nagios.org\/directory\/Addons\/Frontends-%28GUIs-and-CLIs%29\/Web-Interfaces\/Nagios-V-2DShell\/details\" target=\"_blank\" rel=\"noopener noreferrer\">Here<\/a>\u00a0<br \/>\u76ee\u524d\u6700\u65b0\u7248\u672c\u662f 1.9.1 \u7248\uff0c\u9069\u7528\u65bc Nagios 3.x \u548c Nagios XI<br \/><a id=\"res_2367308\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2367308.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2367308.png\" border=\"0\" alt=\"\" \/><\/a>[@more@]<br \/>\u5e95\u4e0b\u662f\u5b89\u88dd\u6b65\u9a5f\uff1a<br \/>1.\u4e0b\u8f09 vshell<br \/># <span style=\"color: #ff0000\">wget <\/span><span style=\"color: #ff0000\">http:\/\/assets.nagios.com\/downloads\/exchange\/nagiosvshell\/vshell.tar.gz<\/span><\/p>\n<p>2.\u89e3\u58d3\u7e2e<br \/># <span style=\"color: #ff0000\">tar xvzf vshell.tar.gz<\/span><\/p>\n<p>3.\u642c\u79fb\u76ee\u9304<br \/># <span style=\"color: #ff0000\">mv vshell \/usr\/local<\/span><\/p>\n<p>4.\u8907\u88fd\u6a94\u6848\u5230 <span style=\"color: #0000ff\">\/etc\/httpd\/conf.d<\/span> \u76ee\u9304\u4e4b\u4e0b<br \/># <span style=\"color: #ff0000\">cp \/usr\/local\/vshell\/config\/vshell_apache.conf \/etc\/httpd\/conf.d<br \/><\/span><br \/>5.\u4fee\u6539 <span style=\"color: #0000ff\">\/etc\/httpd\/conf.d\/vshell_apache.conf<\/span><br \/># <span style=\"color: #ff0000\">vim \/etc\/httpd\/conf.d\/vshell_apache.conf<\/span><\/p>\n<p><span style=\"color: #0000ff\">#modify this file to fit your apache configuration<\/span><\/p>\n<p><span style=\"color: #0000ff\">Alias \/vshell &#8220;\/usr\/local\/vshell&#8221;<\/span><\/p>\n<p><span style=\"color: #0000ff\">&lt;Directory &#8220;\/usr\/local\/vshell&#8221;&gt;<\/span><br \/><span style=\"color: #0000ff\">#\u00a0 SSLRequireSSL<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Options None<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 AllowOverride None<\/span><br \/><span style=\"color: #0000ff\">#\u00a0\u00a0 Order allow,deny<\/span><br \/><span style=\"color: #0000ff\">#\u00a0\u00a0 Allow from all<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Order deny,allow<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Deny from all<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Allow from 127.0.0.1 192.168.1.0\/24<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Allow from ::1<\/span><\/p>\n<p><span style=\"color: #0000ff\">#\u00a0 Allow from 127.0.0.1<\/span><\/p>\n<p><span style=\"color: #0000ff\">#use the below lines for Nagios XI<\/span><br \/><span style=\"color: #0000ff\">\u00a0# AuthName &#8220;Nagios Monitor XI&#8221;<\/span><br \/><span style=\"color: #0000ff\">\u00a0#\u00a0 AuthType Basic<\/span><br \/><span style=\"color: #0000ff\">\u00a0# AuthUserFile \/usr\/local\/nagiosxi\/etc\/htpasswd.users<\/span><\/p>\n<p><span style=\"color: #0000ff\">#Use the below lines for a typical Nagios Core installation<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 AuthName &#8220;Nagios Access&#8221;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 AuthType Basic<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 AuthUserFile \/etc\/nagios\/passwd<\/span><\/p>\n<p><span style=\"color: #0000ff\">\u00a0\u00a0 Require valid-user<\/span><br \/><span style=\"color: #0000ff\">&lt;\/Directory&gt;<\/span><\/p>\n<p>6.\u4fee\u6539 <span style=\"color: #0000ff\">\/usr\/local\/vshell\/config\/vshell.conf<\/span> \u8a2d\u5b9a\u6a94<br \/># <span style=\"color: #ff0000\">vim \/usr\/local\/vshell\/config\/vshell.conf<\/span><br \/>\u628a<br \/><span style=\"color: #0000ff\">; Full filesystem path to the Nagios status file<br \/>STATUSFILE = &#8220;\/usr\/local\/nagios\/var\/status.dat&#8221;<\/span><\/p>\n<p><span style=\"color: #0000ff\">; Full filesystem path to the Nagios object cache file<br \/>OBJECTSFILE = &#8220;\/usr\/local\/nagios\/var\/objects.cache&#8221;<\/span><\/p>\n<p><span style=\"color: #0000ff\">; Full filesystem path to the Nagios CGI permissions configuration file<br \/>CGICFG = &#8220;\/usr\/local\/nagios\/etc\/cgi.cfg&#8221;<\/span><\/p>\n<p><span style=\"color: #0000ff\">; Full filesystem path to the Nagios command pipe<br \/>NAGCMD = &#8220;\/usr\/local\/nagios\/var\/rw\/nagios.cmd&#8221;<\/span><\/p>\n<p>\u4fee\u6539\u6210<br \/><span style=\"color: #0000ff\">; Full filesystem path to the Nagios status file<br \/>STATUSFILE = &#8220;<span style=\"color: #ff0000\">\/var\/log\/nagios\/status.dat<\/span>&#8220;<\/span><\/p>\n<p><span style=\"color: #0000ff\">; Full filesystem path to the Nagios object cache file<br \/>OBJECTSFILE = &#8220;<span style=\"color: #ff0000\">\/var\/log\/nagios\/objects.cache<\/span>&#8220;<\/span><\/p>\n<p><span style=\"color: #0000ff\">; Full filesystem path to the Nagios CGI permissions configuration file<br \/>CGICFG = &#8220;<span style=\"color: #ff0000\">\/etc\/nagios\/cgi.cfg<\/span>&#8220;<\/span><\/p>\n<p><span style=\"color: #0000ff\">; Full filesystem path to the Nagios command pipe<br \/>NAGCMD = &#8220;<span style=\"color: #ff0000\">\/var\/spool\/nagios\/cmd\/nagios.cmd<\/span>&#8220;<\/span><\/p>\n<p>7.\u91cd\u65b0\u555f\u52d5 Apache Web Server<br \/># <span style=\"color: #ff0000\">service httpd restart<\/span><\/p>\n<p>8.\u00a0\u5982\u679c\u6709\u554f\u984c\uff0c\u53ef\u4ee5\u5c07\u8a2d\u5b9a\u6a94\u8907\u88fd\u5230 \/etc\u00a0\u76ee\u9304\u4e4b\u4e0b<br \/># <span style=\"color: #ff0000\">cp<\/span> <span style=\"color: #ff0000\">\/usr\/local\/vshell\/config\/vshell.conf \/etc<\/span><\/p>\n<p>9.\u4e00\u5207 OK \u4e86\uff01<\/p>\n<p>\u00a0\u5f8c\u8a18\uff1a\u5176\u5be6\u5f8c\u4f86\u767c\u73fe\uff0cvshell\u00a0\u6709\u63d0\u4f9b\u76f4\u63a5\u5f9e\u7db2\u9801\u4e0a\u5b89\u88dd\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u76f4\u63a5\u57f7\u884c http:\/\/Server&#8217;IP\/vshell\/install.php<br \/>\u4f46\u6211\u8a66\u4e86\u4e4b\u5f8c\u597d\u50cf\u6c92\u6709\u6210\u529f\uff0c\u6240\u4ee5\u5f8c\u4f86\u9084\u662f\u76f4\u63a5\u7528\u624b\u52d5\u5b89\u88dd\u7684\u65b9\u5f0f\u4f86\u5b8c\u6210\u3002<br \/><a id=\"res_2367309\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2367309.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2367309.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p>\u6700\u5f8c\u8a18\u5f97\u8981\u628a\u5b89\u88dd\u76ee\u9304\u4e2d\u7684 install.php\u00a0\u6a94\u6848\u522a\u9664<br \/># <span style=\"color: #ff0000\">rm -rf <span>\/usr\/local\/vshell\/install.php<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nagios \u672c\u8eab\u5c31\u6709\u4e00\u500b Web \u7ba1\u7406\u4ecb\u9762\uff0c\u53ea\u662f\u756b\u9762\u6709\u4e9b\u7a0d\u5fae\u8907\u96dc\uff0c\u6240\u4ee5\u6709\u4e00\u500b\u4f7f\u7528 PHP \u958b\u767c\u7684 Web \u4ecb &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/02\/28\/nagios-%e7%9a%84-web-%e7%ae%a1%e7%90%86%e4%bb%8b%e9%9d%a2-vshell\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Nagios \u7684 Web \u7ba1\u7406\u4ecb\u9762 &#8211; vshell\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,131],"tags":[],"class_list":["post-18208","post","type-post","status-publish","format-standard","hentry","category-c-78462","category-c-78476"],"meta_key":{"_encloseme":["1"],"lt_post_id":["471728"],"_pingme":["1"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18208"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18208"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18208\/revisions"}],"predecessor-version":[{"id":19865,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18208\/revisions\/19865"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}