You are on page 1of 3

%agios ( Insta$$ing %agios ore )ro* Source

The Industry Standard in IT Infrastructure Monitoring


Purpose
This document describes how install Nagios Core and Nagios Plugins from source on CentOS and Ubuntu servers.

Target Audience
This document is intended for use by anyone wishing to install Nagios Core from source.

Prerequisites
For Ubuntu users, run all ste s from this document with root ermissions. The following command can be run to switch to a root shell. sudo -i Pac!age re"uirements may vary de ending on what ty e of installation latform Nagios is being installed on. For RHEL/ ent!S users# yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp For Ubuntu users# sudo apt-get install wget build-essential apache2 php5-gd libgd2-xpm libgd2-xpm-dev libapache2-modphp5

"o#n$oad %agios

ore and %agios P$ugins Tarba$$s

For all systems, run the following commands in your terminal# cd /tmp wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4. .2.tar.g! wget https://www.nagios-plugins.org/download/nagios-plugins-".5.tar.g! This will download Nagios Core, and it$s re"uired lugins.

Adding the %agios User and &roup


Ne%t add the a ro riate user and grou for the Nagios rocess to run#

useradd nagios groupadd nagcmd usermod -a -# nagcmd nagios

%agios

ore Insta$$ation

%agios Enterprises+ LL P0!0 1o2 .'34 Saint Pau$+ M% 33'5. USA

US, '-...-%A&I!S-' Int6$, 7' 83'-954-:'59 )a2, 7' 83'-954-:'5<

/eb, ###0nagios0co* E*ai$, sa$es;nagios0co*

Page '
Co yright & '()(*'()) Nagios +nter rises, ,,C -evision ).( . February, '()/

%agios ( Insta$$ing %agios ore )ro* Source


tar !xvf nagios-4. .2.tar.g! tar !xvf nagios-plugins-".5.tar.g! Change to the new Nagios directory and install the ac!ages# cd nagios For RHEL/ ent!S users# ./configure --with-command-group$nagcmd For Ubuntu users# ./configure --with-nagios-group$nagios --with-command-group$nagcmd -%with-mail$/usr/bin/sendmail A$$ syste*s, make make make make make make all install install-init install-config install-commandmode install-webconf

cp -& contrib/eventhandlers/ /usr/local/nagios/libexec/ chown -& nagios:nagios /usr/local/nagios/libexec/eventhandlers /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg /etc/init.d/nagios start For RHEL/ ent!S users# /etc/init.d/httpd start

reate a "efau$t User for /eb Access0


0dd a default user for 1eb 2nterface 0ccess# htpasswd %c /usr/local/nagios/etc/htpasswd.users nagiosadmin

%agios P$ugin Insta$$ation


cd /tmp/nagios-plugins-".5 ./configure --with-nagios-user$nagios --with-nagios-group$nagios make make install

%agios Enterprises+ LL P0!0 1o2 .'34 Saint Pau$+ M% 33'5. USA

US, '-...-%A&I!S-' Int6$, 7' 83'-954-:'59 )a2, 7' 83'-954-:'5<

/eb, ###0nagios0co* E*ai$, sa$es;nagios0co*

Page 9
Co yright & '()(*'()) Nagios +nter rises, ,,C -evision ).( . February, '()/

%agios ( Insta$$ing %agios ore )ro* Source


%agios Ser=ice Setup
The following commands will register the Nagios daemon to be run u on system startu . chkconfig chkconfig chkconfig chkconfig For Ubuntu# ln -s /etc/init.d/nagios /etc/rc(.d/())nagios --add nagios --level '5 nagios on --add httpd --level '5 httpd on

%agios /eb Interface


0fter correctly following the rocedures you should now be able to access your Nagios Core installation from a web browser. Sim ly use the following# http://*your.nagios.server.ip+/nagios 0nd log in with the credentials you chose when adding the nagiosadmin user to the ht asswd.users file.

)inishing Thoughts
2f you have further "uestions lease visit our su htt #33su ort.nagios.com3forum3 ort forum at#

Nagios Core 4ocumentation# htt #33library.nagios.com3library3 roducts3nagioscore3manuals3

%agios Enterprises+ LL P0!0 1o2 .'34 Saint Pau$+ M% 33'5. USA

US, '-...-%A&I!S-' Int6$, 7' 83'-954-:'59 )a2, 7' 83'-954-:'5<

/eb, ###0nagios0co* E*ai$, sa$es;nagios0co*

Page <
Co yright & '()(*'()) Nagios +nter rises, ,,C -evision ).( . February, '()/

You might also like