這篇文章主要為大家展示了“nagios如何安裝配置”,內(nèi)容簡(jiǎn)而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“nagios如何安裝配置”這篇文章吧。

1安裝前準(zhǔn)備:
Apache2
GCC編譯器與開發(fā)庫
GD庫與開發(fā)庫
php
2創(chuàng)建帳號(hào):
/usr/sbin/useradd nagios --創(chuàng)建帳號(hào)組
mkdir /usr/local/nagios --創(chuàng)建安裝目錄
chown nagios:nagios /usr/local/nagios --修改目錄權(quán)限
usermod -G nagios apache --將Web帳號(hào)加入nagios組,可以在web操作。
3安裝:
wget http://ncu.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz
tar -zxvf nagios-3.2.3.tar.gz
./configure --prefix=/usr/local/nagios
make all
make install -- 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
make install-config -- This installs *SAMPLE* config files in /usr/local/nagios/etc
make install-webconf -- This installs the Apache config file for the Nagios
4.配置文件:
more /etc/httpd/conf.d/nagios.conf
¥¥¥AuthUserFile /usr/local/nagios/etc/htpasswd.users
cp /etc/httpd/conf.d/nagios.conf /var/www/html/
nagios頁面訪問賬號(hào):
/usr/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password: --nagiosadmin 帳號(hào)權(quán)限已經(jīng)默認(rèn)設(shè)置了。
Re-type new password: --配置文件看/usr/local/nagios/etc/nagios.cfg
Adding password for user root --重點(diǎn)/usr/local/nagios/etc/cgi.cfg
這里注意: nagiosadmin作為默認(rèn)用戶是用從WEB頁面直接操作CGI功能,換句話說也就可以在頁面中直接進(jìn)行操作,如果需要修改用戶名,那么需要在/usr/local/nagios/etc/cgi.cfg 賦予新永明WEB頁面操作權(quán)限,當(dāng)然一般使用nagios就不建議采用頁面操作。
log日志
touch /usr/local/nagios/var/nagios.log
chown nagios:nagios /usr/local/nagios/var/nagios.log
5.配置開機(jī)啟動(dòng):
設(shè)置nagios為開機(jī)啟動(dòng)
[root@localhostnagios]# chkconfig nagios on
[root@localhostnagios]# service nagios start
[root@localhost soft]# service httpd restart
6.測(cè)試
http://192.168.28.X/nagios/
安裝首要插件:nagios-plugins
以上是“nagios如何安裝配置”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
本文名稱:nagios如何安裝配置-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:http://chinadenli.net/article2/edpic.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、網(wǎng)站設(shè)計(jì)、全網(wǎng)營(yíng)銷推廣、商城網(wǎng)站、建站公司、服務(wù)器托管
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容