Library

Docs
Beta

Projects

Nagios Core 4 Home PageNagios Core 4 Host InformationNagios Core 4 Host Status DetailsNagios Core 4 IntroductionNagios Core 4 Service InformationNagios Core 4 Service Overview For All Host GroupsNagios Core 4 Service Overview For All Service GroupsNagios Core 4 Service Status DetailsNagios Core 4 Status MapsNagios Core 4 Tactical OverviewNagios Core Active ChecksNagios Core Adaptive MonitoringNagios Core Alerting With MySQL and Nagios NWC13Nagios Core Authentication And Authorization In The CGIsNagios Core CGI Configuration File OptionsNagios Core Cached ChecksNagios Core Configuration OverviewNagios Core Configuring SSL/TLSNagios Core Custom CGI Headers and FootersNagios Core Detection and Handling of State FlappingNagios Core Distributed MonitoringNagios Core Enhanced CGI Security and AuthenticationNagios Core Event HandlersNagios Core External CommandsNagios Core Fast Startup OptionsNagios Core Graphing Performance Info With MRTGNagios Core Host ChecksNagios Core Host and Service DependenciesNagios Core How To Monitor A Linux/Unix MachineNagios Core How To Monitor A Netware ServerNagios Core How To Monitor A Network PrinterNagios Core How To Monitor A Publicly Available Service (HTTP, FTP, SSH, etc.)Nagios Core How To Monitor A Router/SwitchNagios Core How To Monitor A Windows MachineNagios Core How to Maintain Over 20 Monitoring Appliances NWC14Nagios Core Integration OverviewNagios Core Leveraging SNMP Extensions with Nagios NWC13Nagios Core Main Configuration File OptionsNagios Core Monitoring Remote Locations with Nagios NWC13Nagios Core Monitoring Service and Host ClustersNagios Core Nagios, AWS, and Hosted VoIP NWC13Nagios Core Nagios Plugin APINagios Core Nagios URL In NotificationsNagios Core Nagios on AWS NWC14Nagios Core Notification EscalationsNagios Core NotificationsNagios Core Object Configuration OverviewNagios Core Object DefinitionsNagios Core Object InheritanceNagios Core On Call RotationsNagios Core Passive ChecksNagios Core Passive Host State TranslationNagios Core Performance DataNagios Core Performance Graphs Using InfluxDB + Nagflux + Grafana + HistouNagios Core Performance Graphs Using PNP4NagiosNagios Core Plugin Development GuidelinesNagios Core Predictive Dependency ChecksNagios Core SNMP Explained NWC15Nagios Core SNMP Monitoring Architecture With Nagios NWC13Nagios Core SNMP Trap IntegrationNagios Core Scheduled DowntimeNagios Core Security ConsiderationsNagios Core Service And Daemon ChecksNagios Core Service and Host Freshness ChecksNagios Core Standard Macros in NagiosNagios Core Starting and Stopping NagiosNagios Core State StalkingNagios Core State TypesNagios Core Status Map Customization (Legacy)Nagios Core Status Map CustomizationNagios Core TCP Wrapper IntegrationNagios Core Time Period InheritanceNagios Core Time PeriodsNagios Core Understanding Macros and How They WorkNagios Core Upgrading From Previous VersionsNagios Core Upgrading Nagios Core From SourceNagios Core Using Grafana With PNP4NagiosNagios Core Using The Nagiostats UtilityNagios Core Verifying Your ConfigurationNagios Core Volatile ServicesNagios Core Writing a Custom Worker

Nagios Core - Upgrading Nagios Core From Source

This document describes how to upgrade Nagios Core from source.

This guide is broken up into several sections and covers different operating system (OS) distributions. If your OS Distribution is not included in this guide then please contact us to see if we can get it added. Some distributions may be missing as we don't have access to a test environment that allows us to develop the documentation.

Nagios Core 4.4.1 is what this guide instructs you to upgrade to, however future versions should also work fine with these steps. This guide is focussed at upgrading from an earlier version of Nagios Core 4.x, it may work with previous major versions of Nagios Core however you may experience some issues (which are outside the scope of this documentation).

IMPORTANT

Do NOT follow this guide if you are running Nagios XI. Nagios XI includes Nagios Core and the version of Core used is specific to the release of Nagios XI you are running.

Please select your OS:

CentOS | RHEL | Oracle Linux

Stop Service / Daemon

This command stops Nagios Core.

===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====

service nagios stop

===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x =====

systemctl stop nagios.service

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure
make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sed -i 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command Starts Nagios Core.

===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====

service nagios start

===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x =====

systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====

service nagios status

===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x =====

systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Ubuntu

Stop Service / Daemon

This command stops Nagios Core.

===== Ubuntu 14.x =====

sudo service nagios stop

===== Ubuntu 15.x / 16.x / 17.x / 18.x =====

sudo systemctl stop nagios.service

Downloading the Source

cd /tmp
sudo rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
sudo ./configure --with-httpd-conf=/etc/apache2/sites-enabled
sudo make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

sudo make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

sudo make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sudo sh -c "sed -i 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg"

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

===== Ubuntu 14.x =====

sudo service nagios start

===== Ubuntu 15.x / 16.x / 17.x / 18.x =====

sudo systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

===== Ubuntu 14.x =====

sudo service nagios status

===== Ubuntu 15.x / 16.x / 17.x / 18.x =====

sudo systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

sudo /usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

SUSE SLES | openSUSE Leap

Stop Service / Daemon

This command stops Nagios Core.

===== SUSE SLES 11.x =====

sudo /sbin/service nagios stop

===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x =====

sudo systemctl stop nagios.service

Downloading the Source

cd /tmp
sudo rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
sudo ./configure --with-httpd-conf=/etc/apache2/vhosts.d
sudo make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

sudo make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

sudo make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sudo sh -c "sed -i 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg"

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

===== SUSE SLES 11.x =====

sudo /sbin/service nagios start

===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x =====

sudo systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

===== SUSE SLES 11.x =====

sudo /sbin/service nagios status

===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x =====

sudo systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

sudo /usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Debian | Raspbian

All steps on Debian require to run as root. To become root simply run:

Debian:

su

Raspbian:

sudo -i

All commands from this point onwards will be as root.

Stop Service / Daemon

This command stops Nagios Core.

===== 7.x =====

service nagios stop

===== 8.x / 9.x =====

systemctl stop nagios.service

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure --with-httpd-conf=/etc/apache2/sites-enabled
make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sed -i 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command restarts Nagios Core.

===== 7.x =====

service nagios start

===== 8.x / 9.x =====

systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

===== 7.x =====

service nagios status

===== 8.x / 9.x =====

systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Fedora

Stop Service / Daemon

This command stops Nagios Core.

systemctl stop nagios.service

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure
make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sed -i 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Arch Linux

Stop Service / Daemon

This command stops Nagios Core.

systemctl stop nagios.service

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure --with-httpd-conf=/etc/httpd/conf/extra
make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sed -i 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Gentoo

Stop Service / Daemon

This command stops Nagios Core.

===== openrc =====

rc-service nagios stop

===== systemd =====

systemctl stop nagios.service

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure --with-httpd-conf=/etc/apache2/vhosts.d --sysconfdir=/usr/local/nagios/etc
make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /run/nagios.lock using the following command:

sed -i 's/^lock_file=.*/lock_file=\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

===== openrc =====

rc-service nagios start

===== systemd =====

A stop is required first, even though the processes are not running. This appears to be a systemd feature.

systemctl start nagios.service

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

===== openrc =====

rc-service nagios status

===== systemd =====

systemctl status nagios.service

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

FreeBSD

Stop Service / Daemon

This command stops Nagios Core.

service nagios stop

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure --with-httpd-conf=/usr/local/etc/apache24/Includes
gmake all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

gmake install
chown nagios:nagios /usr/local/nagios/bin/*

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

gmake install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sed -i '' 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

service nagios start

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

service nagios status

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Solaris

Stop Service / Daemon

This command stops Nagios Core.

svcadm disable nagios

Downloading the Source

cd /tmp
rm -rf nagioscore*
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
./configure --with-httpd-conf=/etc/apache2/2.2/conf.d --with-gd-inc=/usr/include/gd2
gmake all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

gmake install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

gmake install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

perl -p -i -e 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

svcadm enable nagios

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

svcs -xv nagios

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Apple OS X

Stop Service / Daemon

This command stops Nagios Core.

sudo /etc/rc.d/init.d/nagios stop

Downloading the Source

cd /tmp
rm -rf nagioscore*
curl -L -o nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.1.tar.gz
tar xzf nagioscore.tar.gz

Compile

cd /tmp/nagioscore-nagios-4.4.1/
sudo ./configure --with-httpd-conf=/opt/local/apache2/conf/extra --with-gd-lib=/opt/local/lib --with-gd-inc=/opt/local/include
sudo make all

Install Binaries

This step installs the binary files, CGIs, and HTML files.

sudo make install

Install Service / Daemon

This installs the service or daemon files. While these will already exist they do get updated occasionally and hence need replacing.

sudo make install-daemoninit

Update nagios.cfg

If you are upgrading from Nagios Core 4.3.2 and earlier you will need to update the nagios.cfg file to point to /var/run/nagios.lock using the following command:

sudo sed -i '' 's/^lock_file=.*/lock_file=\/var\/run\/nagios.lock/g' /usr/local/nagios/etc/nagios.cfg

More information about this is detailed in the following KB article:

Nagios Core - nagios.lock Changes In 4.3.3 Onwards

Start Service / Daemon

This command starts Nagios Core.

sudo /etc/rc.d/init.d/nagios start

Confirm Nagios Is Running

You can confirm that the nagios service is now running with the following command:

sudo /etc/rc.d/init.d/nagios status

Confirm Nagios Version

You can confirm the nagios version being used with the following command:

/usr/local/nagios/bin/nagios -V

This will output something like:

Nagios Core 4.4.1

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

Nagios Enterprises, LLC

© All rights reserved. 2026