您好,登錄后才能下訂單哦!
1、下載nagios-4.0.8、nagios-plugins-2.0.3
wget http://jaist.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
2、安裝組件
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp
3、創(chuàng)建nagios用戶與用戶組
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
4、安裝nagios-4.0.8
tar zxvf nagios-4.0.8.tar.gz
cd nagios-4.0.8
./configure --prefix=/usr/local/nagios --with-command-group=nagcmd --with-nagios-group=nagcmd
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:nagcmd /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios start
5、配置httpd
1)配置web登陸用戶名和密碼
htpasswd -c /usr/local/nagios/etc/htpasswd nagiosadmin
vi /etc/httpd/conf/httpd.conf 加入以下內(nèi)容
2)找到
user apache
group apache
修改為
user nagios
group nagcmd
3)找到
#ServerName www.example.com:80
將前面的#刪除
6、安裝nagios-plugins
tar zxvf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-user=nagios --with-command-group=nagcmd
make
make install
7、設(shè)置開機(jī)啟動
chkconfig nagios on
service nagios start
chkconfig httpd on
service httpd start
8、訪問
http://IP/nagios 輸入用戶名密碼
nagiosadmin:$apr1$CZJUFBRq$TBWA4x8B6nbH0nA4ekHg7. http://tool.oschina.net/htpasswd
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。