Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Install Nagios Core from Source Along with Plugins

This lab goes through the procedure of compiling and installing Nagios Core directly from the source. This is the long way around, but it comes with advantages such as having the latest version of Nagios Core with all the features. A secondary benefit is a greater understanding of the Nagios Core structure, how it is intended to work, and what files are where.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 19, 2025
Duration
3h 30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Download and Compile Nagios Core
    1. Edit the SELinux config file.

      sudo vim /etc/selinux/config
      
    2. Change the line defining the SELINUX variable to the following.

      SELINUX=permissive
      
    3. Save the changes and exit the editor.

    4. Modify the current mode for SELinux.

      sudo setenforce 0
      
    5. Check the current SELinux mode. Verify we are in permissive mode.

      getenforce
      
    6. Install all necessary prerequisites.

      sudo yum install -y gcc glibc glibc-common wget unzip httpd php gd gd-devel perl postfix
      
    7. Download the Nagios Core.

      wget https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.3.tar.gz
      
    8. Extract the files from the repository.

      tar -xvzf nagios-4.4.3.tar.gz
      
    9. Navigate to the appropriate directory.

      cd nagioscore-nagios-4.4.3
      
    10. Run the configuration script.

      ./configure
      
    11. Compile the necessary files.

      sudo make all
      
  2. Challenge

    Install Nagios
    1. Create a user and group for Nagios.
    ```bash
    sudo make install-groups-users
    ```
    
    1. Add the Nagios user to the Apache group.

      sudo usermod -a -G nagios apache
      
    2. Install the necessary binaries.

      sudo make install
      
    3. Configure Nagios to run as a daemon.

      sudo make install-daemoninit
      
    4. Enable the web server.

      sudo systemctl enable httpd.service
      
    5. Install the Nagios command mode.

      sudo make install-commandmode
      
    6. Install sample files for Nagios.

      sudo make install-config
      
    7. Install Apache configuration files.

      sudo make install-webconf
      
  3. Challenge

    Configure and Run Nagios
    1. Configure a firewall rule for Nagios.

      sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
      
    2. Reload the firewall.

      sudo firewall-cmd --reload
      
    3. Create a "nagiosadmin" user and remember the password you assign. The password is up to you.

      sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
      
    4. Start the web server.

      sudo systemctl start httpd.service
      
    5. Start the Nagios service.

      sudo systemctl start nagios.service
      
    6. Check that the web server is running.

      sudo systemctl status httpd
      
    7. Check that Nagios is running

      sudo systemctl status nagios
      
  4. Challenge

    Add Nagios Plugins and Verify Nagios
    1. Open up a browser and navigate to the public IP address provided in the lab instructions. Attempt to login using nagiosadmin and the password you supplied in a previous step.

    2. Install necessary prerequisites.

      sudo yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release unzip perl-Net-SNMP
      
    3. Download the plugins.

      wget https://github.com/nagios-plugins/nagios-plugins/archive/master.zip
      
    4. Unzip the file.

      unzip master.zip
      
    5. Nagivate to the appropriate directory.

      cd nagios-plugins-master/
      
    6. Run the setup command.

      ./tools/setup
      
    7. Run the configure command.

      sudo ./configure
      
    8. Compile the necessary files.

      sudo make
      sudo make install
      
    9. Restart Nagios.

      sudo systemctl restart nagios
      
    10. Switch back to your browser and refresh it. Click on Hosts in the left-hand menu.

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight