{"id":1272,"date":"2009-10-09T14:20:18","date_gmt":"2009-10-09T19:20:18","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1272"},"modified":"2010-04-16T11:48:38","modified_gmt":"2010-04-16T16:48:38","slug":"install-nagios-on-rhel5","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1272","title":{"rendered":"Install Nagios on RHEL5"},"content":{"rendered":"<span id=\"Dependencies\"><h2>Dependencies<\/h2><\/span>\n<p>* Install Apache and PHP<br \/>\n* GCC<br \/>\n* GD development lib<\/p>\n<span id=\"Create_User_Account\"><h2>Create User Account<\/h2><\/span>\n<pre lang=\"bash\">\r\n\/usr\/sbin\/useradd -m nagios\r\npasswd nagios\r\n\/usr\/sbin\/groupadd nagcmd\r\n\/usr\/sbin\/usermod -a -G nagcmd nagios\r\n\/usr\/sbin\/usermod -a -G nagcmd apache\r\n<\/pre>\n<span id=\"Build_and_Install_Nagios_Core\"><h2>Build and Install Nagios Core<\/h2><\/span>\n<pre lang=\"bash\">\r\nwget http:\/\/prdownloads.sourceforge.net\/sourceforge\/nagios\/nagios-3.2.0.tar.gz\r\ntar zxf nagios-3.2.0.tar.gz\r\ncd nagios-3.2.0\r\n.\/configure --with-command-group=nagcmd\r\n\r\nmake all\r\nmake install\r\n# Installs the init script in \/etc\/rc.d\/init.d\r\nmake install-init\r\n# Installs and configures permissions on the directory for holding the external command file\r\nmake install-config\r\n# Installs sample config files in \/usr\/local\/nagios\/etc\r\nmake install-commandmode\r\n\r\n# Set contact email\r\nvi \/usr\/local\/nagios\/etc\/objects\/contacts.cfg\r\n\r\n# Install web interface\r\nmake install-webconf\r\n# Create web interface account\r\nhtpasswd -c \/usr\/local\/nagios\/etc\/htpasswd.users nagiosadmin\r\n\r\n# Restart Apache\r\n\/usr\/local\/apache2\/bin\/apachectl stop\r\n\/usr\/local\/apache2\/bin\/apachectl start\r\n# Or\r\n\/sbin\/service httpd restart\r\n<\/pre>\n<span id=\"Compile_and_Install_Nagios_Plugins\"><h2>Compile and Install Nagios Plugins<\/h2><\/span>\n<pre lang=\"bash\">\r\nwget http:\/\/prdownloads.sourceforge.net\/sourceforge\/nagiosplug\/nagios-plugins-1.4.14.tar.gz\r\ntar zxf nagios-plugins-1.4.14.tar.gz\r\ncd nagios-plugins-1.4.14\r\n.\/configure --with-nagios-user=nagios --with-nagios-group=nagios\r\nmake\r\nmake install\r\n<\/pre>\n<span id=\"Start_Nagios\"><h2>Start Nagios<\/h2><\/span>\n<pre lang=\"bash\">\r\n# Auto start Nagios\r\n\/sbin\/chkconfig --add nagios\r\n\/sbin\/chkconfig nagios on\r\n# Check config file\r\n\/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg\r\n\/sbin\/service nagios start\r\n<\/pre>\n<span id=\"Access_Web_Interface\"><h2>Access Web Interface<\/h2><\/span>\n<p>http:\/\/myhost\/nagios\/index.php<\/p>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p><a href=\"http:\/\/nagios.sourceforge.net\/docs\/3_0\/quickstart-fedora.html\">http:\/\/nagios.sourceforge.net\/docs\/3_0\/quickstart-fedora.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dependencies * Install Apache and PHP * GCC * GD development lib Create User Account \/usr\/sbin\/useradd -m nagios passwd nagios \/usr\/sbin\/groupadd nagcmd \/usr\/sbin\/usermod -a -G nagcmd nagios \/usr\/sbin\/usermod -a -G nagcmd apache Build and Install Nagios Core wget http:\/\/prdownloads.sourceforge.net\/sourceforge\/nagios\/nagios-3.2.0.tar.gz tar &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1272\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[61],"tags":[],"class_list":["post-1272","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-kw","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1272"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1272\/revisions"}],"predecessor-version":[{"id":1539,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1272\/revisions\/1539"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}