詳細參考資料:Installation Documentation
安裝版本:Nagios Core [ open source版本 ]
系統環境:CentOS 6.7
環境需求:
web servergd1.6.3 或更高版本
unzip需要套件
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp
一 、介紹
Nagios 有open source 的Nagios Core 版本 和商業的 Nagios XI 版本二 、安裝
下載 Nagios Core 和 Nagios Plugins
Nagios Core 安裝
- 增加執行 nagios 的使用者帳號和群組
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
- 解開所下載的 Nagios Core 和 Nagios Plugins
- 切換目錄至解開的Nagios Core中
./configure --with-command-group=nagcmd
- 接著依序編譯
make all說明:
make install
make install-init
make install-config
make install-commandmode
make install-webconf
- This installs the main program, CGIs, and HTML files
make install-init
- This installs the init script in /etc/rc.d/init.d
make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file
make install-config
- This installs *SAMPLE* config files in /usr/local/nagios/etc
You'll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!
make install-webconf
- This installs the Apache config file for the Nagios
web interface
make install-exfoliation
- This installs the Exfoliation theme for the Nagios
web interface
make install-classicui
- This installs the classic theme for the Nagios
web interface
接者執行
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
Nagios Plugin 安裝
切換至解該的Nagios Plugins目錄中
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install