Menu
User

DropVPS Team

Writer: Cooper Reagan

How to install Nagios on Ubuntu 24.10?

How to install Nagios on Ubuntu 24.10?

Publication Date

07/11/2025

Category

Articles

Reading Time

2 Min

Table of Contents

Nagios is one of the most popular open-source monitoring tools for servers and networks. In this guide, you’ll learn how to install Nagios Core (the free version) on Ubuntu 24.10 step by step.

Step 1: Update Your System and Install Dependencies

Begin by updating your system and installing all required packages:

sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 php php-gd libgd-dev unzip wget build-essential libapache2-mod-php libperl-dev libssl-dev daemon

Enable and start Apache:

sudo systemctl enable apache2 --now

Step 2: Create Nagios User and Group

Create a dedicated user and group for Nagios:

sudo useradd nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios
sudo usermod -a -G nagcmd www-data

Step 3: Download and Compile Nagios Core

Download the latest Nagios Core source code:

cd /tmp
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.1.tar.gz
tar -xzf nagios-4.5.1.tar.gz
cd nagios-4.5.1

Compile and install Nagios:

./configure --with-command-group=nagcmd
make all
sudo make install
sudo make install-commandmode
sudo make install-init
sudo make install-config
sudo make install-webconf

Step 4: Set Up Web Access for Nagios

Create a user for web authentication:

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Restart Apache to apply changes:

sudo systemctl restart apache2

Allow HTTP access through UFW if it’s active:

sudo ufw allow Apache

Step 5: Install Nagios Plugins

Nagios needs plugins to perform service checks:

cd /tmp
wget https://nagios-plugins.org/download/nagios-plugins-2.4.6.tar.gz
tar -xzf nagios-plugins-2.4.6.tar.gz
cd nagios-plugins-2.4.6
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
sudo make install

Step 6: Enable and Start Nagios Service

sudo systemctl enable nagios
sudo systemctl start nagios

Check status:

sudo systemctl status nagios

Step 7: Access the Nagios Web UI

Open your browser and go to:

http://your-server-ip/nagios

Log in with:

  • Username: nagiosadmin

  • Password: (what you set earlier)

That’s it — your Nagios Core installation is complete on Ubuntu 24.10. You can now begin configuring monitored hosts, services, and notifications.

Linux VPS
U
Loading...

Related Posts