Upgrading From Previous Nagios 3.x Releases

As newer alpha, beta, and stable releases of Nagios 3.x are released, you should strongly consider upgrading as soon as possible. Newer releases usually contain critical bug fixes, so its important to stay up to date. Assuming you've already installed Nagios from source code as described in the Quickstart Installation Guides for Fedora, OpenSuse or Ubuntu, you can install newer versions of Nagios 3.x easily. You don't even need root access to do it, as everything that needed to be done as root was done during the initial install. Here's the upgrade process...

Make sure you have a good backup of your existing Nagios installation and configuration files. If anything goes wrong or doesn't work, this will allow you to rollback to your old version.

Become the nagios user. Debian/Ubuntu users should use sudo -s nagios.

su -l nagios

Removed the following old HTML files that were used by the web frontend. They have been replaced by PHP equivalents.

rm /usr/local/nagios/share/{main,side,index}.html

Download the source code tarball of the latest version of Nagios (visit for the link to the latest version).


Extract the Nagios source code tarball.

tar xzf nagios-3.x.tar.gz
cd nagios-3.x

Run the Nagios configure script, passing the name of the group used to control external command file permissions like so:

./configure --with-command-group=nagcmd

Compile the Nagios source code.

make all

Install updated binaries, documentation, and web web interface. Your existing configuration files will not be overwritten by this step.

make install

Verify your configuration files. Correct any errors shown here before proceeding with the next step.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Restart Nagios. Debian/Ubuntu users should use /etc/init.d/nagios restart.

/sbin/service nagios restart

That's it - you're done!

Upgrading From Nagios 2.x

It shouldn't be too difficult to upgrade from Nagios 2.x to Nagios 3. The upgrade is essentially the same as what is described above for upgrading to newer 3.x releases. You will, however, have to change your configuration files a bit so they work with Nagios 3:

Also make sure to read the "What's New" section of the documentation. It describes all the changes that were made to the Nagios 3 code since the latest stable release of Nagios 2.x. Quite a bit has changed, so make sure you read it over.

Upgrading From an RPM Installation

If you currently have an RPM- or Debian/Ubuntu APT package-based installation of Nagios and you would like to transition to installing Nagios from the official source code distribution, here's the basic process you should follow:

  1. Stop Nagios
  2. Backup your existing Nagios installation
    • Configuration files
      • Main config file (usually nagios.cfg)
      • Resource config file (usually resource.cfg)
      • CGI config file (usually cgi.cfg)
      • All your object definition files
    • Retention file (usually retention.dat)
    • Current Nagios log file (usually nagios.log)
    • Archived Nagios log files
  3. Uninstall the original RPM or APT package
  4. Install Nagios from source by following the quickstart guides for Fedora, OpenSuse or Ubuntu
  5. Restore your original Nagios configuration files, retention file, and log files
  6. Verify your configuration and start Nagios

Note that different RPMs or APT packages may install Nagios in different ways and in different locations. Make sure you've backed up all your critical Nagios files before removing the original RPM or APT package, so you can revert back if you encounter problems.

See Also See Also: Quickstart Installation Guides for Fedora, OpenSuse or Ubuntu

English Deutsch 日本語

Table of Contents