Fedora18安裝nagios,先確定已下的服務已經安裝
Apache
PHP
GCC compiler
GD development libraries
如果沒有
# yum install httpd php
# yum install gcc glibc glibc-common
# yum install gd gd-devel
建立新的nagios帳號和密碼
/usr/sbin/useradd -m nagios
passwd nagios
開一個新的Group給nagios使用
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache
安裝nagios
# yum install nagios
設定檔Sample
cp /etc/nagios/cgi.cfg.sample /etc/nagios/cgi.cfg
cp /etc/nagios/resource.cfg.sample /etc/nagios/resource.cfg
cp /etc/nagios/nagios.cfg.sample /etc/nagios/nagios.cfg
cp /etc/nagios/objects/commands.cfg.sample /etc/nagios/objects/commands.cfg
cp /etc/nagios/objects/contacts.cfg.sample /etc/nagios/objects/contacts.cfg
cp /etc/nagios/objects/localhost.cfg.sample /etc/nagios/objects/localhost.cfg
cp /etc/nagios/objects/templates.cfg.sample /etc/nagios/objects/templates.cfg
cp /etc/nagios/objects/timeperiods.cfg.sample /etc/nagios/objects/timeperiods.cfg
啟動https
service httpd restart
登入nagios
http://127.0.0.1/nagios
輸入帳密
nagios登入預設Default帳號和密碼
nagiosadmin/nagiosadmin