SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
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 steps from this document with root permissions. The following command can be run to switch to a root shell.
sudo -i
Package requirements may vary depending on what type of installation platform Nagios is being installed on.
For RHEL/CentOS 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-mod-
php5
Download Nagios Core and Nagios Plugins Tarballs
For all systems, run the following commands in your terminal:
cd /tmp
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.4.tar.gz
wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
This will download Nagios Core, and it's required plugins.
Adding the Nagios User and Group
Next add the appropriate user and group for the Nagios process to run:
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
Nagios Core Installation
Page 1
Copyright © 2010-2011 Nagios Enterprises, LLC
Revision 1.0 – May, 2014
Nagios – Installing Nagios Core From Source
Nagios Enterprises, LLC US: 1-888-NAGIOS-1 Web: www.nagios.com
P.O. Box 8154
Saint Paul, MN 55108
USA
Int'l: +1 651-204-9102 Email: sales@nagios.com
Fax: +1 651-204-9103
tar zxvf nagios-4.0.4.tar.gz
tar zxvf nagios-plugins-2.0.tar.gz
Change to the new Nagios directory and install the packages:
cd nagios-4.0.4
For RHEL/CentOS users:
./configure --with-command-group=nagcmd
For Ubuntu users:
./configure --with-nagios-group=nagios --with-command-group=nagcmd -–with-mail=/usr/bin/sendmail
All systems:
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R 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/CentOS users:
/etc/init.d/httpd start
Create a Default User for Web Access.
Add a default user for Web Interface Access:
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Nagios Plugin Installation
cd /tmp/nagios-plugins-2.0
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Page 2
Copyright © 2010-2011 Nagios Enterprises, LLC
Revision 1.0 – May, 2014
Nagios – Installing Nagios Core From Source
Nagios Enterprises, LLC US: 1-888-NAGIOS-1 Web: www.nagios.com
P.O. Box 8154
Saint Paul, MN 55108
USA
Int'l: +1 651-204-9102 Email: sales@nagios.com
Fax: +1 651-204-9103
Nagios Service Setup
The following commands will register the Nagios daemon to be run upon system startup.
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
chkconfig --level 35 httpd on
For Ubuntu:
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
Nagios Web Interface
After correctly following the procedures you should now
be able to access your Nagios Core installation from a
web browser.
Simply use the following:
http://<your.nagios.server.ip>/nagios
And log in with the credentials you chose when adding
the nagiosadmin user to the htpasswd.users file.
Finishing Thoughts
If you have further questions please visit our support forum at:
http://support.nagios.com/forum/
Nagios Core Documentation:
http://library.nagios.com/library/products/nagioscore/manuals/
Page 3
Copyright © 2010-2011 Nagios Enterprises, LLC
Revision 1.0 – May, 2014
Nagios – Installing Nagios Core From Source
Nagios Enterprises, LLC US: 1-888-NAGIOS-1 Web: www.nagios.com
P.O. Box 8154
Saint Paul, MN 55108
USA
Int'l: +1 651-204-9102 Email: sales@nagios.com
Fax: +1 651-204-9103

Contenu connexe

Tendances

EuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsEuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD Systems
Vinícius Zavam
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yum
Walter Liu
 
Rapport de-stage-supervision-nagios-et-nagvis
Rapport de-stage-supervision-nagios-et-nagvisRapport de-stage-supervision-nagios-et-nagvis
Rapport de-stage-supervision-nagios-et-nagvis
linkinx
 

Tendances (20)

Setup a New Virtualenv for Django in Windows
Setup a New Virtualenv for Django in WindowsSetup a New Virtualenv for Django in Windows
Setup a New Virtualenv for Django in Windows
 
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
 
Downloads
DownloadsDownloads
Downloads
 
Ch2.setup.node.and.npm
Ch2.setup.node.and.npmCh2.setup.node.and.npm
Ch2.setup.node.and.npm
 
vagrant-php
vagrant-phpvagrant-php
vagrant-php
 
EuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsEuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD Systems
 
How tos nagios - centos wiki
How tos nagios - centos wikiHow tos nagios - centos wiki
How tos nagios - centos wiki
 
Docker deploy
Docker deployDocker deploy
Docker deploy
 
Introduction to Node.js - March 2015
Introduction to Node.js - March 2015Introduction to Node.js - March 2015
Introduction to Node.js - March 2015
 
GCC ARM nRF51 IoT SDK -cheat sheet-
GCC ARM nRF51 IoT SDK -cheat sheet-GCC ARM nRF51 IoT SDK -cheat sheet-
GCC ARM nRF51 IoT SDK -cheat sheet-
 
How to install OpenStack MITAKA --allinone - cheat sheet -
How to install OpenStack MITAKA --allinone - cheat sheet -How to install OpenStack MITAKA --allinone - cheat sheet -
How to install OpenStack MITAKA --allinone - cheat sheet -
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
 
Porting Puppet to OpenBSD
Porting Puppet to OpenBSD Porting Puppet to OpenBSD
Porting Puppet to OpenBSD
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yum
 
DrupalCafe Vol.35 - Dockerで始めるDrupal
DrupalCafe Vol.35 - Dockerで始めるDrupalDrupalCafe Vol.35 - Dockerで始めるDrupal
DrupalCafe Vol.35 - Dockerで始めるDrupal
 
TDC2016SP - Protocolo Firmata - controle o Arduino com sua linguagem favorita
TDC2016SP - Protocolo Firmata - controle o Arduino com sua linguagem favoritaTDC2016SP - Protocolo Firmata - controle o Arduino com sua linguagem favorita
TDC2016SP - Protocolo Firmata - controle o Arduino com sua linguagem favorita
 
install mosquitto-auth-plug - cheat sheet -
install mosquitto-auth-plug - cheat sheet -install mosquitto-auth-plug - cheat sheet -
install mosquitto-auth-plug - cheat sheet -
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
 
Rapport de-stage-supervision-nagios-et-nagvis
Rapport de-stage-supervision-nagios-et-nagvisRapport de-stage-supervision-nagios-et-nagvis
Rapport de-stage-supervision-nagios-et-nagvis
 

En vedette

NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...
NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...
NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...
European School of Oncology
 
Data envelopment analysis
Data envelopment analysisData envelopment analysis
Data envelopment analysis
Ajit Kumar Ray
 

En vedette (13)

Slide 1
Slide 1Slide 1
Slide 1
 
Tony kelly
Tony kellyTony kelly
Tony kelly
 
Ingles
InglesIngles
Ingles
 
NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...
NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...
NY Prostate Cancer Conference - A. Vickers - Session 1: Traditional statistic...
 
Cellulair imuunrespons
Cellulair imuunresponsCellulair imuunrespons
Cellulair imuunrespons
 
Политический капитал оппозиционного политика
Политический капитал оппозиционного политикаПолитический капитал оппозиционного политика
Политический капитал оппозиционного политика
 
Securities and Exchange Commission Filings - Reynolds Week 2011
Securities and Exchange Commission Filings - Reynolds Week 2011Securities and Exchange Commission Filings - Reynolds Week 2011
Securities and Exchange Commission Filings - Reynolds Week 2011
 
Tabernakel1
Tabernakel1Tabernakel1
Tabernakel1
 
Calendario student card 2017
Calendario student card 2017Calendario student card 2017
Calendario student card 2017
 
Data envelopment analysis
Data envelopment analysisData envelopment analysis
Data envelopment analysis
 
Target audience guidance
Target audience guidanceTarget audience guidance
Target audience guidance
 
Reken maar 6
Reken maar 6Reken maar 6
Reken maar 6
 
Paulus' voetsporen - studie 31
Paulus' voetsporen - studie 31Paulus' voetsporen - studie 31
Paulus' voetsporen - studie 31
 

Similaire à Installing nagios core_from_source

Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
Carlos Eduardo
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
nejadmand
 
Install nagios
Install nagiosInstall nagios
Install nagios
hassandb
 
Install nagios
Install nagiosInstall nagios
Install nagios
hassandb
 

Similaire à Installing nagios core_from_source (20)

101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package management
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
 
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
 
Linux
LinuxLinux
Linux
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Sun raysetup
Sun raysetupSun raysetup
Sun raysetup
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
Snort-IPS-Tutorial
Snort-IPS-TutorialSnort-IPS-Tutorial
Snort-IPS-Tutorial
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
CloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineCloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngine
 
How to Install Odoo 17 on Ubuntu.pdf
How to Install Odoo 17 on Ubuntu.pdfHow to Install Odoo 17 on Ubuntu.pdf
How to Install Odoo 17 on Ubuntu.pdf
 
Install nagios
Install nagiosInstall nagios
Install nagios
 
Install nagios
Install nagiosInstall nagios
Install nagios
 

Plus de laonap166

Plus de laonap166 (20)

Huong dan xu ly cac loi khi su dung phan mem reset may in
Huong dan xu ly cac loi khi su dung phan mem reset may inHuong dan xu ly cac loi khi su dung phan mem reset may in
Huong dan xu ly cac loi khi su dung phan mem reset may in
 
Huong dan reset muc l200 epson
Huong dan reset muc l200 epsonHuong dan reset muc l200 epson
Huong dan reset muc l200 epson
 
NEC Server Documents
NEC Server DocumentsNEC Server Documents
NEC Server Documents
 
Mtcv giám đốc tt cntt
Mtcv giám đốc tt cnttMtcv giám đốc tt cntt
Mtcv giám đốc tt cntt
 
Nếu bạn làm it bạn cần biết
Nếu bạn làm it  bạn cần biếtNếu bạn làm it  bạn cần biết
Nếu bạn làm it bạn cần biết
 
Nhạp mon lap trinh khong code
Nhạp mon lap trinh khong code Nhạp mon lap trinh khong code
Nhạp mon lap trinh khong code
 
Ha active active bang gfs2
Ha active  active bang gfs2Ha active  active bang gfs2
Ha active active bang gfs2
 
Hướng dẫn cài đặt phần mềm turnoffmonitor
Hướng dẫn cài đặt phần mềm turnoffmonitorHướng dẫn cài đặt phần mềm turnoffmonitor
Hướng dẫn cài đặt phần mềm turnoffmonitor
 
Bao cao web cake php
Bao cao web cake phpBao cao web cake php
Bao cao web cake php
 
He 74 a-thltht-lãxuântâm-11tlt
He 74 a-thltht-lãxuântâm-11tltHe 74 a-thltht-lãxuântâm-11tlt
He 74 a-thltht-lãxuântâm-11tlt
 
Quản lý cua hang giai khat lxt
Quản lý cua hang giai khat lxtQuản lý cua hang giai khat lxt
Quản lý cua hang giai khat lxt
 
Ve ngoi nha lap trinh do hoa bang c
Ve ngoi nha lap trinh do hoa bang cVe ngoi nha lap trinh do hoa bang c
Ve ngoi nha lap trinh do hoa bang c
 
Don xin thanh lap doanh nghiep lien doanh
Don xin thanh lap doanh nghiep lien doanhDon xin thanh lap doanh nghiep lien doanh
Don xin thanh lap doanh nghiep lien doanh
 
Thu cam on khach hang
Thu cam on khach hangThu cam on khach hang
Thu cam on khach hang
 
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloatCai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
 
Xd email server zimbra
Xd email server zimbraXd email server zimbra
Xd email server zimbra
 
Tom tat ly thuyet thi bằng lái xe b2
Tom tat ly thuyet thi bằng lái xe b2Tom tat ly thuyet thi bằng lái xe b2
Tom tat ly thuyet thi bằng lái xe b2
 
Policy Based Assignment DHCP – Windows Server 2012
Policy Based Assignment DHCP – Windows Server 2012Policy Based Assignment DHCP – Windows Server 2012
Policy Based Assignment DHCP – Windows Server 2012
 
How to backup active directory domain services database in windows server 201...
How to backup active directory domain services database in windows server 201...How to backup active directory domain services database in windows server 201...
How to backup active directory domain services database in windows server 201...
 
Dns backup and recovery in windows server 2012 r2
Dns backup and recovery in windows server 2012 r2Dns backup and recovery in windows server 2012 r2
Dns backup and recovery in windows server 2012 r2
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Installing nagios core_from_source

  • 1. 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 steps from this document with root permissions. The following command can be run to switch to a root shell. sudo -i Package requirements may vary depending on what type of installation platform Nagios is being installed on. For RHEL/CentOS 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-mod- php5 Download Nagios Core and Nagios Plugins Tarballs For all systems, run the following commands in your terminal: cd /tmp wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.4.tar.gz wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz This will download Nagios Core, and it's required plugins. Adding the Nagios User and Group Next add the appropriate user and group for the Nagios process to run: useradd nagios groupadd nagcmd usermod -a -G nagcmd nagios Nagios Core Installation Page 1 Copyright © 2010-2011 Nagios Enterprises, LLC Revision 1.0 – May, 2014 Nagios – Installing Nagios Core From Source Nagios Enterprises, LLC US: 1-888-NAGIOS-1 Web: www.nagios.com P.O. Box 8154 Saint Paul, MN 55108 USA Int'l: +1 651-204-9102 Email: sales@nagios.com Fax: +1 651-204-9103
  • 2. tar zxvf nagios-4.0.4.tar.gz tar zxvf nagios-plugins-2.0.tar.gz Change to the new Nagios directory and install the packages: cd nagios-4.0.4 For RHEL/CentOS users: ./configure --with-command-group=nagcmd For Ubuntu users: ./configure --with-nagios-group=nagios --with-command-group=nagcmd -–with-mail=/usr/bin/sendmail All systems: make all make install make install-init make install-config make install-commandmode make install-webconf cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ chown -R 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/CentOS users: /etc/init.d/httpd start Create a Default User for Web Access. Add a default user for Web Interface Access: htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin Nagios Plugin Installation cd /tmp/nagios-plugins-2.0 ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install Page 2 Copyright © 2010-2011 Nagios Enterprises, LLC Revision 1.0 – May, 2014 Nagios – Installing Nagios Core From Source Nagios Enterprises, LLC US: 1-888-NAGIOS-1 Web: www.nagios.com P.O. Box 8154 Saint Paul, MN 55108 USA Int'l: +1 651-204-9102 Email: sales@nagios.com Fax: +1 651-204-9103
  • 3. Nagios Service Setup The following commands will register the Nagios daemon to be run upon system startup. chkconfig --add nagios chkconfig --level 35 nagios on chkconfig --add httpd chkconfig --level 35 httpd on For Ubuntu: ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios Nagios Web Interface After correctly following the procedures you should now be able to access your Nagios Core installation from a web browser. Simply use the following: http://<your.nagios.server.ip>/nagios And log in with the credentials you chose when adding the nagiosadmin user to the htpasswd.users file. Finishing Thoughts If you have further questions please visit our support forum at: http://support.nagios.com/forum/ Nagios Core Documentation: http://library.nagios.com/library/products/nagioscore/manuals/ Page 3 Copyright © 2010-2011 Nagios Enterprises, LLC Revision 1.0 – May, 2014 Nagios – Installing Nagios Core From Source Nagios Enterprises, LLC US: 1-888-NAGIOS-1 Web: www.nagios.com P.O. Box 8154 Saint Paul, MN 55108 USA Int'l: +1 651-204-9102 Email: sales@nagios.com Fax: +1 651-204-9103