{"id":3938,"date":"2023-09-26T13:06:58","date_gmt":"2023-09-26T10:06:58","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=3938"},"modified":"2023-09-26T13:07:08","modified_gmt":"2023-09-26T10:07:08","slug":"how-to-install-nagios-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/","title":{"rendered":"How to install Nagios on Ubuntu 22.04"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" data-attachment-id=\"3939\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/attachment\/tutorial-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?fit=1920%2C1080&amp;ssl=1\" data-orig-size=\"1920,1080\" 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=\"Tutorial\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?fit=750%2C422&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?resize=750%2C422&#038;ssl=1\" alt=\"How to install Nagios on Ubuntu 22.04\" class=\"wp-image-3939\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Tutorial.png?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>In this tutorial, we&#8217;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 open-source monitoring tool, plays a vital role in ensuring the stability and performance of your IT infrastructure. So, let&#8217;s get started!<\/p>\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-ubuntu-22-04\/#Requirements\" title=\"Requirements\">Requirements<\/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-ubuntu-22-04\/#Update_and_Upgrade\" title=\"Update and Upgrade\">Update and Upgrade<\/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-ubuntu-22-04\/#Install_Prerequisites\" title=\"Install Prerequisites\">Install Prerequisites<\/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-ubuntu-22-04\/#Create_a_Nagios_User_and_Group\" title=\"Create a Nagios User and Group\">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-ubuntu-22-04\/#Download_and_Compile_Nagios_on_Ubuntu\" title=\"Download and Compile Nagios on Ubuntu\">Download and Compile Nagios on Ubuntu<\/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-ubuntu-22-04\/#Extract_and_Compile_Nagios_Core\" title=\"Extract and Compile Nagios Core\">Extract and Compile Nagios Core<\/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-ubuntu-22-04\/#Install_Nagios_Core_Binaries_and_Web_Interface_Files\" title=\"Install Nagios Core Binaries and Web Interface Files\">Install Nagios Core Binaries and Web Interface Files<\/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-ubuntu-22-04\/#Install_Nagios_on_Ubuntu_Plugins\" title=\"Install Nagios on Ubuntu Plugins\">Install Nagios on Ubuntu Plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/#Configure_Apache_Web_Server\" title=\"Configure Apache Web Server\">Configure Apache Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/#Set_Nagios_Admin_Password\" title=\"Set Nagios Admin Password\">Set Nagios Admin Password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/#Start_Nagios_and_Apache_Services\" title=\"Start Nagios and Apache Services\">Start Nagios and Apache Services<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/#Access_Nagios_Web_Interface\" title=\"Access Nagios Web Interface\">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-13\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/#Final_Thoughts\" title=\"Final Thoughts\">Final Thoughts<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Requirements\"><\/span>Requirements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Make sure you have the following prerequisites in place before we start the installation process:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/virtono.com\/cloud-vps\" target=\"_blank\" rel=\"noopener\">Ubuntu 22.04 Virtono Server<\/a><\/strong>: Ensure that you have a fresh installation of Ubuntu 22.04 on a dedicated server or virtual machine.<\/li>\n\n\n\n<li><strong>Root or Sudo Access<\/strong>: To execute administrative tasks, you&#8217;ll need either root access or a user account with sudo privileges.<\/li>\n\n\n\n<li><strong>Stable Internet Connection<\/strong>: A stable internet connection is essential, as we&#8217;ll be downloading packages and updates from the internet.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Update_and_Upgrade\"><\/span>Update and Upgrade<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The first step is to ensure that your system is up to date. Open a terminal and 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 apt update &amp;&amp; apt upgrade -y<\/code><\/pre>\n\n\n\n<p>This will upgrade your system to the most recent packages and security patches and update the package list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Install_Prerequisites\"><\/span>Install Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Nagios has specific software prerequisites that must be installed on your Ubuntu 22.04 server. We&#8217;ll go through each of them and install them one by one.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt install autoconf gcc libc6 make wget unzip apache2 apache2-utils php libgd-dev libmcrypt-dev libssl-dev bc gawk dc build-essential snmp libnet-snmp-perl gettext<\/code><\/pre>\n\n\n\n<p>This script sets up the necessary software for Nagios to run properly, including <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/setup-linux-apache-mysql-phplamp-ubuntu-20-04\/\">Apache, PHP<\/a>, and a number of libraries.<\/p>\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=\"174\" data-attachment-id=\"3941\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/attachment\/screenshot-2023-09-22-at-13-59-38\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?fit=5032%2C1164&amp;ssl=1\" data-orig-size=\"5032,1164\" 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-09-22-at-13.59.38\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?fit=750%2C174&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?resize=750%2C174&#038;ssl=1\" alt=\"How to install Nagios on Ubuntu 22.04\" class=\"wp-image-3941\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?resize=1024%2C237&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?resize=300%2C69&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?resize=768%2C178&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?resize=1536%2C355&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?resize=2048%2C474&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-22-at-13.59.38.png?w=2250&amp;ssl=1 2250w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Create_a_Nagios_User_and_Group\"><\/span>Create a Nagios User and Group<br><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Nagios should run as a separate user and group. Create them with 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 useradd -m -s \/bin\/bash nagios\nsudo groupadd nagcmd\nsudo usermod -a -G nagcmd nagios\nsudo usermod -a -G nagcmd www-data<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Download_and_Compile_Nagios_on_Ubuntu\"><\/span>Download and Compile Nagios on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Let&#8217;s download and <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/\">build Nagios Core<\/a> right away. To store the Nagios source code, we will create a directory, go there, and then download the source archive:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>cd \/tmp\nwget https:\/\/assets.nagios.com\/downloads\/nagioscore\/releases\/nagios-4.4.6.tar.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Extract_and_Compile_Nagios_Core\"><\/span>Extract and Compile Nagios Core<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Extract the downloaded archive and navigate to the Nagios on Ubuntu source directory:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>tar -zxvf nagios-4.4.6.tar.gz\ncd nagios-4.4.6<\/code><\/pre>\n\n\n\n<p>Next, configure Nagios on Ubuntu and compile it:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>.\/configure --with-nagios-group=nagios --with-command-group=nagcmd\nmake all<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Install_Nagios_Core_Binaries_and_Web_Interface_Files\"><\/span>Install Nagios Core Binaries and Web Interface Files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Install Nagios on Ubuntu binaries, init script, and web interface files:<\/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\nsudo make install-commandmode\nsudo make install-init\nsudo make install-config\nsudo \/usr\/bin\/install -c -m 644 sample-config\/httpd.conf \/etc\/apache2\/sites-available\/nagios.conf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Install_Nagios_on_Ubuntu_Plugins\"><\/span><strong>Install Nagios on Ubuntu<\/strong> <strong>Plugins<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Ubuntu&#8217;s package manager, <code>apt<\/code>, provides pre-compiled Nagios Plugins that you can easily install. This is the recommended method as it simplifies the installation process and ensures that you get the latest stable versions of the plugins. Run the following commands to install Nagios Plugins using <code>apt<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt update\nsudo apt install nagios-plugins\ncp \/usr\/lib\/nagios\/plugins\/* \/usr\/local\/nagios\/libexec\/<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"106\" data-attachment-id=\"3945\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/attachment\/screenshot-2023-09-26-at-13-00-20\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?fit=5038%2C712&amp;ssl=1\" data-orig-size=\"5038,712\" 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-09-26-at-13.00.20\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?fit=750%2C106&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?resize=750%2C106&#038;ssl=1\" alt=\"Install Nagios on Ubuntu Plugins\" class=\"wp-image-3945\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?resize=1024%2C145&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?resize=300%2C42&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?resize=768%2C109&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?resize=1536%2C217&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?resize=2048%2C289&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-13.00.20.png?w=2250&amp;ssl=1 2250w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>It&#8217;s important to rebuild the Nagios configuration and restart Nagios after installing or updating plugins:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo \/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg\nsudo systemctl restart nagios\nsudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Configure_Apache_Web_Server\"><\/span>Configure Apache Web Server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Create a symbolic link for the Nagios Apache configuration file and enable the site:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo ln -s \/etc\/apache2\/sites-available\/nagios.conf \/etc\/apache2\/sites-enabled\/<\/code><\/pre>\n\n\n\n<p>Enable CGI and rewrite modules for Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code><code>sudo a2enmod cgi rewrite<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Set_Nagios_Admin_Password\"><\/span><strong>Set Nagios Admin Password<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Set a password for the Nagios admin user:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code><code>sudo htpasswd -c \/usr\/local\/nagios\/etc\/htpasswd.users nagiosadmin<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Start_Nagios_and_Apache_Services\"><\/span>Start Nagios and Apache Services<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Start the Nagios and Apache services and enable them to start on boot:<\/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 enable nagios<br>sudo systemctl enable apache2<br>sudo systemctl restart nagios<br>sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Access_Nagios_Web_Interface\"><\/span>Access Nagios Web Interface<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Open your web browser and navigate to <code>http:\/\/your_server_ip\/nagios<\/code>. Log in with the username <code>nagiosadmin<\/code> and the password you set earlier.<\/p>\n\n\n\n<p>Congratulations! You have successfully installed Nagios on Ubuntu 22.04. Now you can start configuring Nagios to monitor your network, hosts, and services.<\/p>\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=\"480\" data-attachment-id=\"3943\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-ubuntu-22-04\/attachment\/screenshot-2023-09-26-at-11-59-08\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?fit=1766%2C1132&amp;ssl=1\" data-orig-size=\"1766,1132\" 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-09-26-at-11.59.08\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?fit=750%2C480&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?resize=750%2C480&#038;ssl=1\" alt=\"How to install Nagios on Ubuntu 22.04\" class=\"wp-image-3943\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?resize=1024%2C656&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?resize=300%2C192&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?resize=768%2C492&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?resize=1536%2C985&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-26-at-11.59.08.png?w=1766&amp;ssl=1 1766w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This guide has provided step-by-step instructions for installing Nagios on Ubuntu 22.04. Nagios is a powerful monitoring tool that will help you keep your network infrastructure, servers, and services in check. By following these instructions, you&#8217;ve taken the first step toward proactive system monitoring and maintenance. <\/p>\n\n\n\n<p>Stay tuned for articles in the future where we will go into more detail about setting up monitoring plugins, configuring Nagios, and developing custom checks to meet your unique requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we&#8217;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<\/p>\n","protected":false},"author":8,"featured_media":3940,"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":[803,809,802,804,806,808,805,810,807,811],"class_list":["post-3938","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-nagios-admin","tag-nagios-it-infrastructure","tag-nagios-network-monitoring","tag-nagios-on-ubuntu-22-04","tag-nagios-open-source-monitoring","tag-nagios-server-monitoring","tag-nagios-setup-ubuntu","tag-nagios-system-monitoring","tag-nagios-ubuntu-installation","tag-nagios-web-interface"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"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","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-11w","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3255,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nagios-on-centos-7\/","url_meta":{"origin":3938,"position":0},"title":"How to install Nagios on CentOS 7","author":"George B.","date":"April 16, 2023","format":false,"excerpt":"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.\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-Nagios-on-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-Nagios-on-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-Nagios-on-CentOS.png?fit=600%2C330&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":3938,"position":1},"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":3791,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-zabbix-on-ubuntu\/","url_meta":{"origin":3938,"position":2},"title":"How to Install Zabbix on Ubuntu","author":"George B.","date":"September 2, 2023","format":false,"excerpt":"We will walk you through installing Zabbix on Ubuntu 22.04 in this detailed guide, giving you access to a potent tool for monitoring your IT infrastructure. Monitoring is crucial in the world of system administration. One of the most important aspects of maintaining a strong IT infrastructure is making sure\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-Install-Zabbix-on-Ubuntu.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3954,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-and-configure-docker-swarm-on-ubuntu-22-04\/","url_meta":{"origin":3938,"position":3},"title":"How to Install and Configure Docker Swarm on Ubuntu 22.04","author":"George B.","date":"September 27, 2023","format":false,"excerpt":"This tutorial will show you how to install and configure Docker Swarm on Ubuntu 22.04 ensuring that you harness its full potential for your containerized applications. For effectively scaling and managing containers, Docker Swarm is still a great option. Many developers and DevOps experts prefer it because of its ease\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-Install-and-Configure-Docker-Swarm-on-Ubuntu.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3728,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-use-influxdb-with-python-on-ubuntu-22-04\/","url_meta":{"origin":3938,"position":4},"title":"How to use InfluxDB with Python on Ubuntu 22.04","author":"George B.","date":"August 9, 2023","format":false,"excerpt":"This tutorial will walk you through installing and configuring InfluxDB with Python on a VPS running Ubuntu 22.04. InfluxDB is an open-source time-series database (TSDB) developed by InfluxData. It's written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring,\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\/08\/How-to-use-InfluxDB-with-Python-on-Ubuntu-22-04.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3730,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-directadmin-on-ubuntu-22-04\/","url_meta":{"origin":3938,"position":5},"title":"How to install DirectAdmin on Ubuntu 22.04","author":"George B.","date":"August 8, 2023","format":false,"excerpt":"DirectAdmin is an incredibly efficient and user-friendly web hosting control panel. It offers a graphical interface and automation tools designed to simplify the process of hosting a website. This tutorial will guide you through the process of installing DirectAdmin on Ubuntu 22.04. The steps are detailed, clear, and easy to\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\/08\/How-to-install-DirectAdmin-on-Ubuntu.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3938","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=3938"}],"version-history":[{"count":2,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3938\/revisions"}],"predecessor-version":[{"id":3946,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3938\/revisions\/3946"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/3940"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=3938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=3938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=3938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}