您好,登錄后才能下訂單哦!
nagios安裝步驟
1、安裝前準(zhǔn)備
1)創(chuàng)建nagios用戶(hù)和用戶(hù)組
useradd -s /usr/sbin/nologin nagios mkdir /usr/local/nagios chown -R nagios.nagios /usr/local/nagios
2)開(kāi)啟系統(tǒng)sendmail服務(wù)
/etc/init.d/sendmail start
2、編譯安裝nagios
tar -zxvf nagios-3.2.0.tar.gz cd nagios-3.2.0 ./configure --prefix=/usr/local/nagios make all make install make install-init make install-commandmode make install-config
3、Nagios目錄
bin
etc
sbin
Share
libexec外部插件所在的目錄
var
var/archives
var/rw
4、安裝Nagios插件
nagios-plugins-1.4.14
5、安裝Nagios中文化插件
http://sourceforge.net/projects/nagios-cn/files/ ./configure 不指定安裝路徑,默認(rèn)為/usr/local make all make install
6、安裝與配置apache和php
1)安裝apache與php
2)配置apache
/usr/local/apache2/conf/httpd.conf
修改
User nobody Group #-1
修改為
User nagios Group nagios
然后找到
DirectoryIndex index.html index.html.var
修改為
DirectoryIndex index.html index.php
增加:
AddType application/x-httpd-php .php
在httpd.conf最后添加授權(quán)信息
#setting for nagios ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin" <Directory "/usr/local/nagios/sbin"> AuthType Basic Options ExecCGI AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthUserFile /usr/local/nagios/etc/htpasswd Require valid-user </Directory> Alias /nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share"> AuthType Basic Options None AllowOverride None Order allow,deny Allow from all AuthName "nagios Access" AuthUserFile /usr/local/nagios/etc/htpasswd Require valid-user </Directory>
3)創(chuàng)建apache目錄驗(yàn)證文件
/usr/local/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpassed ixdba 啟動(dòng)服務(wù) /usr/local/apache2/bin/apachectl start http://ip/nagios/
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。