How to Install Nagios XI on Ubuntu 22.04

This guide walks you through installing Nagios XI on Ubuntu 22.04 LTS.

Alby Andersen

Nagios XI is a powerful enterprise-grade monitoring tool designed to track the performance of IT infrastructure, including servers, networks, and applications. It provides real-time insights, customizable dashboards, and automated alerts, making it a critical tool for system administrators.

Install Nagios XI on Ubuntu 22.04


Prerequisites

  • Ubuntu 22.04 server (minimal install recommended)
  • Root or sudo privileges
  • At least 4 GB RAM and 20 GB disk space
  • Static IP address configured
  • LAMP Stack (Apache, MySQL, PHP) will be installed automatically by the Nagios XI installer

How to Install Nagios XI on Ubuntu 22.04
Nagios XI

Step 1: Update System

sudo apt update && sudo apt upgrade -y

Reboot if kernel updates are applied:

sudo reboot

Step 2: Download Nagios XI Installer

Download the latest Nagios XI installer from the official site:

cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz

Extract the archive:

tar xzf xi-latest.tar.gz
cd nagiosxi

Step 3: Run the Installer

Execute the installation script:

sudo ./fullinstall

The installer will:

  1. Install required dependencies (Apache, PHP, MySQL, etc.)
  2. Configure the database
  3. Set up Nagios XI web interface

Step 4: Complete Web Setup

  1. Access the Nagios XI web interface:
   http://your-server-ip/nagiosxi/
  1. Follow the setup wizard to:
  • Accept the license agreement
  • Set up admin credentials
  • Configure basic settings

Step 5: Get License Key (Optional)

Nagios XI requires a license for full functionality:

  1. If you have a license, upload it via Admin > License Key.
  2. For evaluation, use the free trial mode.

Step 6: Configure Firewall

Allow HTTP/HTTPS traffic:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

Step 7: Verify Installation

Check services:

sudo systemctl status nagios
sudo systemctl status apache2
sudo systemctl status mysql

Key Post-Installation Steps

  1. Secure MySQL:
   sudo mysql_secure_installation
  1. Set Up Email Alerts:
    Configure SMTP in Admin > Notification Settings.
  2. Add Monitoring Targets:
    Use the web interface to add hosts/services.

Upgrade Nagios XI

To update to newer versions:

cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi
sudo ./upgrade

Uninstall Nagios XI

To completely remove:

sudo ./uninstall

Important Notes

  • Default Credentials:
  • Web Interface: nagiosadmin / password set during installation
  • Configuration Files:
  • Main Config: /usr/local/nagios/etc/
  • Web Interface: /var/www/html/nagiosxi/
  • Logs: /usr/local/nagios/var/log/

Troubleshooting

  1. Port Conflicts:
    Ensure Apache (port 80/443) is not blocked.
  2. PHP Errors:
    Verify PHP extensions are installed:
   sudo apt install php-cli php-gd php-mysql php-curl
  1. Database Issues:
    Check MySQL/MariaDB service status and credentials in:
   /usr/local/nagiosxi/html/config.inc.php

For official documentation, visit Nagios XI Docs.

Share This Article