{"id":3255,"date":"2023-04-16T13:07:24","date_gmt":"2023-04-16T10:07:24","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=3255"},"modified":"2023-04-13T13:08:37","modified_gmt":"2023-04-13T10:08:37","slug":"how-to-install-nagios-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/","title":{"rendered":"How to install Nagios on CentOS 7"},"content":{"rendered":"\n<p>In this article, we will discuss how to install Nagios on CentOS 7. Nagios is a powerful monitoring system that can help you keep track of your network resources, services, and applications.<\/p>\n\n\n\n<p>Before we begin, make sure that you have root access to the server you will be installing Nagios. You should also have a basic understanding of Linux commands.<\/p>\n\n\n\n<p><strong>Important: Disable SELinux On CentOS:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo sed -i 's\/SELINUX=.*\/SELINUX=disabled\/g' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_1_Update_Your_CentOS_7_Server\" title=\"Step 1: Update Your CentOS 7 Server\">Step 1: Update Your CentOS 7 Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_2_Install_the_Required_Dependencies\" title=\"Step 2: Install the Required Dependencies\">Step 2: Install the Required Dependencies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_3_Download_and_Compile_Nagios\" title=\"Step 3: Download and Compile Nagios\">Step 3: Download and Compile Nagios<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_4_Create_a_Nagios_User_and_Group\" title=\"Step 4: Create a Nagios User and Group\">Step 4: Create a Nagios User and Group<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_5_Install_Binaries_HTML_and_CGIs_files\" title=\"Step 5: Install Binaries, HTML, and CGIs files\">Step 5: Install Binaries, HTML, and CGIs files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_6_Create_Nagios_Web_User\" title=\"Step 6: Create Nagios Web User\">Step 6: Create Nagios Web User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_7_Access_Nagios_Web_Interface\" title=\"Step 7: Access Nagios Web Interface\">Step 7: Access Nagios Web Interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/#Step_8_Download_and_Compile_Nagios_Plugins\" title=\"Step 8: Download and Compile Nagios Plugins\">Step 8: Download and Compile Nagios Plugins<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_1_Update_Your_CentOS_7_Server\"><\/span>Step 1: Update Your CentOS 7 Server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Before you install Nagios on CentOS 7, it&#8217;s important to update your CentOS 7 server to ensure that all the latest packages are installed. To do this, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo yum update -y<\/code><\/pre>\n\n\n\n<p>This will update all packages on your CentOS 7 server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_2_Install_the_Required_Dependencies\"><\/span>Step 2: Install the Required Dependencies<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Next, we need to install some dependencies that Nagios on CentOS 7 requires. Run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo yum install gcc glibc glibc-common wget unzip httpd php gd gd-devel perl postfix<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3256\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/attachment\/screenshot-2023-04-13-at-12-23-12\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?fit=929%2C418&amp;ssl=1\" data-orig-size=\"929,418\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-13-at-12.23.12\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?fit=300%2C135&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?fit=750%2C337&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?resize=750%2C337&#038;ssl=1\" alt=\"How to install Nagios on CentOS 7\" class=\"wp-image-3256\" width=\"750\" height=\"337\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?w=929&amp;ssl=1 929w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?resize=300%2C135&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.23.12.png?resize=768%2C346&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>This command will install Apache, PHP, and some other dependencies that Nagios on CentOS 7 needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_3_Download_and_Compile_Nagios\"><\/span>Step 3: Download and Compile Nagios<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Next, we need to download Nagios and compile it on our CentOS 7 server. Run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>cd \/usr\/src\/\nsudo wget -O nagioscore.tar.gz https:\/\/github.com\/NagiosEnterprises\/nagioscore\/archive\/nagios-4.4.5.tar.gz\nsudo tar xzf nagioscore.tar.gz\ncd nagioscore-nagios-*\/\n.\/configure\nsudo make all\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_4_Create_a_Nagios_User_and_Group\"><\/span>Step 4: Create a Nagios User and Group<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>We need to create a Nagios user and group on our CentOS 7 server. Run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo make install-groups-users<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"172\" data-attachment-id=\"3257\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/attachment\/screenshot-2023-04-13-at-12-29-57\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?fit=879%2C201&amp;ssl=1\" data-orig-size=\"879,201\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-13-at-12.29.57\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?fit=300%2C69&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?fit=750%2C172&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?resize=750%2C172&#038;ssl=1\" alt=\"Download and Compile Nagios\" class=\"wp-image-3257\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?w=879&amp;ssl=1 879w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?resize=300%2C69&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.29.57.png?resize=768%2C176&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo usermod -a -G nagios apache<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_5_Install_Binaries_HTML_and_CGIs_files\"><\/span>Step 5: Install Binaries, HTML, and CGIs files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo make install\nsudo make install-daemoninit\nsystemctl enable httpd.service\nsudo make install-commandmode\nsudo make install-config\nsudo make install-webconf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_6_Create_Nagios_Web_User\"><\/span>Step 6: Create Nagios Web User<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo htpasswd -c \/usr\/local\/nagios\/etc\/htpasswd.users nagiosadmin\nsudo systemctl restart httpd<\/code><\/pre>\n\n\n\n<p><em><strong>Note: <\/strong>You can use our password generator: <\/em><a href=\"https:\/\/whois.virtono.com\/generate-password.php\" target=\"_blank\" rel=\"noopener\">click here<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_7_Access_Nagios_Web_Interface\"><\/span>Step 7: Access Nagios Web Interface<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Finally, we need to access the Nagios <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-cwp-centos-web-panel-on-centos-8\/\">web interface<\/a> to make sure that everything is working properly. Open a web browser and go to:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>http:&#47;&#47;your_server_ip\/nagios<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"518\" height=\"331\" data-attachment-id=\"3258\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/attachment\/screenshot-2023-04-13-at-12-13-36\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.36.png?fit=518%2C331&amp;ssl=1\" data-orig-size=\"518,331\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-13-at-12.13.36\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.36.png?fit=300%2C192&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.36.png?fit=518%2C331&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.36.png?resize=518%2C331&#038;ssl=1\" alt=\"Web Nagios on CentOS 7\" class=\"wp-image-3258\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.36.png?w=518&amp;ssl=1 518w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.36.png?resize=300%2C192&amp;ssl=1 300w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"609\" data-attachment-id=\"3259\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/attachment\/screenshot-2023-04-13-at-12-13-49\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?fit=1040%2C845&amp;ssl=1\" data-orig-size=\"1040,845\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-13-at-12.13.49\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?fit=300%2C244&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?fit=750%2C609&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?resize=750%2C609&#038;ssl=1\" alt=\"Access Nagios Web Interface\" class=\"wp-image-3259\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?resize=1024%2C832&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?resize=300%2C244&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?resize=768%2C624&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.13.49.png?w=1040&amp;ssl=1 1040w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_8_Download_and_Compile_Nagios_Plugins\"><\/span>Step 8: Download and Compile Nagios Plugins<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Nagios Plugins are a collection of over 50 plugins that Nagios uses to monitor various network resources. We need to download and compile Nagios on CentOS 7 Plugins. Run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release\n\nsudo yum install -y perl-Net-SNMP\n\ncd \/usr\/src\/\nsudo wget --no-check-certificate -O nagios-plugins.tar.gz https:\/\/github.com\/nagios-plugins\/nagios-plugins\/archive\/release-2.2.1.tar.gz\nsudo tar zxf nagios-plugins.tar.gz\ncd nagios-plugins-release-2.2.1\nsudo .\/tools\/setup\nsudo .\/configure\nsudo make\nsudo make install<\/code><\/pre>\n\n\n\n<p>Restart the Nagios service<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl restart nagios<br>sudo systemctl status nagios<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"363\" data-attachment-id=\"3260\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/attachment\/screenshot-2023-04-13-at-12-57-50\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?fit=1043%2C505&amp;ssl=1\" data-orig-size=\"1043,505\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-13-at-12.57.50\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?fit=300%2C145&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?fit=750%2C363&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?resize=750%2C363&#038;ssl=1\" alt=\"Nagios on CentOS 7 Status\" class=\"wp-image-3260\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?resize=1024%2C496&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?resize=300%2C145&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?resize=768%2C372&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.57.50.png?w=1043&amp;ssl=1 1043w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"692\" data-attachment-id=\"3261\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/attachment\/screenshot-2023-04-13-at-12-17-03\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?fit=911%2C840&amp;ssl=1\" data-orig-size=\"911,840\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-13-at-12.17.03\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?fit=300%2C277&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?fit=750%2C692&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?resize=750%2C692&#038;ssl=1\" alt=\"\" class=\"wp-image-3261\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?w=911&amp;ssl=1 911w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?resize=300%2C277&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-13-at-12.17.03.png?resize=768%2C708&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>In this article, we will discuss how to install Nagios on CentOS 7. Nagios is a powerful monitoring system that can help you keep track of your network resources, services, and applications. Before we begin, make sure that you have root access to the server you will be installing Nagios.<\/p>\n","protected":false},"author":8,"featured_media":3263,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[291,290,293,289],"class_list":["post-3255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-install-nagios","tag-install-nagios-centos","tag-nagios-centos","tag-nagios-on-centos-7"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-Nagios-on-CentOS.png?fit=600%2C330&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-Qv","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3938,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/","url_meta":{"origin":3255,"position":0},"title":"How to install Nagios on Ubuntu 22.04","author":"George B.","date":"September 26, 2023","format":false,"excerpt":"In this tutorial, we'll walk you through each step of installing Nagios on Ubuntu 22.04. You will have a Nagios setup that is fully operational by the end of this article, which will make it easier for you to keep a close eye on your network and systems. Nagios, an\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Deploy-Redis-on-Kubernetes.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3176,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-change-ssh-port-on-linux-or-unix\/","url_meta":{"origin":3255,"position":1},"title":"How to Change SSH Port on Linux or Unix","author":"George B.","date":"April 6, 2023","format":false,"excerpt":"By default, SSH listens on port 22, if you want to change SSH port to a non-standard port can help enhance server security by making it harder for attackers to find and exploit SSH vulnerabilities. In this article, we will walk through the process of changing the SSH port on\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Change-SSH-Port-on-Linux-or-Unix.png?fit=600%2C340&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Change-SSH-Port-on-Linux-or-Unix.png?fit=600%2C340&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Change-SSH-Port-on-Linux-or-Unix.png?fit=600%2C340&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1302,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/monitor-virtualized-environments-with-nagios-and-icinga\/","url_meta":{"origin":3255,"position":2},"title":"Monitor virtualized environments with Nagios and Icinga","author":"Daniel Draga","date":"January 9, 2018","format":false,"excerpt":"As easy as real servers today can be converted into virtual machines, as fast as the overview is lost.\u00a0With special monitoring adapted for virtual environments, you keep track of things. Virtualization is a technology that has been in the data center for many years and has its origins in host\u2026","rel":"","context":"In &quot;IT News&quot;","block_context":{"text":"IT News","link":"https:\/\/www.virtono.com\/community\/category\/internet-and-technology-news\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/Captura-de-pantalla-2012-11-12-a-las-18.20.51.png?fit=800%2C378&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/Captura-de-pantalla-2012-11-12-a-las-18.20.51.png?fit=800%2C378&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/Captura-de-pantalla-2012-11-12-a-las-18.20.51.png?fit=800%2C378&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/Captura-de-pantalla-2012-11-12-a-las-18.20.51.png?fit=800%2C378&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2877,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-cwp-centos-web-panel-on-centos-8\/","url_meta":{"origin":3255,"position":3},"title":"How to install CWP (CentOS Web Panel) on Centos 8","author":"George B.","date":"July 28, 2022","format":false,"excerpt":"What Is CWP? CentOS Web Panel (CWP) is a web hosting control panel. It's a no-cost alternative to cPanel. It has an easy-to-use interface and a variety of other features for beginners who want to set up and manage hosting servers. Using CWP is simple and convenient because you don't\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-21-at-16.19.14.png?fit=1057%2C704&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-21-at-16.19.14.png?fit=1057%2C704&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-21-at-16.19.14.png?fit=1057%2C704&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-21-at-16.19.14.png?fit=1057%2C704&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-21-at-16.19.14.png?fit=1057%2C704&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3275,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-teamspeak-on-centos-7\/","url_meta":{"origin":3255,"position":4},"title":"How to install Teamspeak on CentOS 7","author":"George B.","date":"April 20, 2023","format":false,"excerpt":"In this article, we will discuss how to install TeamSpeak on CentOS 7. TeamSpeak is a popular voice communication software that allows users to communicate with each other over the Internet. It is widely used by gamers, businesses, and organizations to facilitate communication and collaboration. Step 1: Update Your System\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/how-to-install-teamspeak-centos.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/how-to-install-teamspeak-centos.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/how-to-install-teamspeak-centos.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3322,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-vestacp-on-centos-7\/","url_meta":{"origin":3255,"position":5},"title":"How to Install VestaCP on CentOS 7","author":"George B.","date":"April 26, 2023","format":false,"excerpt":"In this article, we'll show you how to install VestaCP on CentOS 7 in a few simple steps. Are you looking for a powerful and easy-to-use control panel for your CentOS 7 server? If so, VestaCP may be the perfect solution for you. VestaCP is a free and open-source control\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Install-VestaCP-on-CentOS-7-1.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Install-VestaCP-on-CentOS-7-1.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Install-VestaCP-on-CentOS-7-1.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=3255"}],"version-history":[{"count":1,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3255\/revisions"}],"predecessor-version":[{"id":3262,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3255\/revisions\/3262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/3263"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=3255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=3255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=3255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}