一,軟體安裝
ll-rwxrwxr-x 1 root root 9097591 2009-12-31 nagios-20091231.tar.bz2
1.解壓軟體包
tar jxvf nagios-20091231.tar.bz2
2.安裝
/soft/monitoring/nagios/nagios/bin/
./install.sh
3.檢查配置檔案
4.新增啟動項
chkconfig --add nagios
chkconfig nagios on
5.檢查配置檔案是否正確
root@monitor nagios]# nagios -v nagios.cfg
6啟動服務
/etc/init.d/nagios start
7.檢視服務程序
ps axw | grep nagios
24782 ? ssl 0:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
24800 pts/1 r+ 0:00 grep nagios
8. 配置訪問控制
7 allow from 10.24.29.0 #設定允許其它網段訪問
8 authtype basic
9 authuserfile /etc/nagios/passwd
10 authname "nagios"
11 require valid-user
12
1314 alias /nagios/ /usr/share/nagios/html/
15 16 options none
17 order deny,allow
18 deny from all
19 allow from 127.0.0.1
20 allow from 10.24.29.0 #設定允許其它網段訪問
21 authtype basic
22 authtype basic
23 authuserfile /etc/nagios/passwd #訪問密碼存放位置
9.建立nagios 訪問登陸使用者密碼
[root@monitor conf.d]# cd /etc/nagios/
[root@monitor nagios]# ls
cgi.cfg commands.cfg localhost.cfg nagios.cfg private
10. 新增登陸使用者密碼
[root@monitor nagios]# htpasswd -bmc passwd michael michael
adding password for user michael
11.驗證使用者和密碼生成
[root@monitor nagios]# ls
cgi.cfg commands.cfg localhost.cfg nagios.cfg passwd private
[ root@monitor nagios]# pwd
/etc/nagios
root@monitor nagios]# cat passwd
michael:$apr1$nob5f...$/hlz07.veqcim/ucjdkx50
12.重啟web 服務
13.頁面訪問測試
14.修改web訪問管理許可權
[root@monitor nagios]# pwd
/etc/nagios
[root@monitor nagios]# ls
cgi.cfg commands.cfg localhost.cfg nagios.cfg passwd private
[root@monitor nagios]# sed -i 's/^#\(authorized_for.*\)=.*$/\1=michael/g' cgi.cfg #指令碼修改排至檔案
授權michel 登陸管理
[root@monitor nagios]# grep authorized cgi.cfg
驗證authorized_for_system_information=michael
authorized_for_configuration_information=michael
authorized_for_system_commands=michael
authorized_for_all_services=michael
authorized_for_all_hosts=michael
authorized_for_all_service_commands=michael
authorized_for_all_host_commands=michael
15.登陸驗證
登入成功! 監控裝置新增和配置檔案修改待續。。。。。。。。。。。。。。。
監控軟體nagios之安裝
1.安裝軟體依賴包和建立nagios使用者 root tong1 yum install gcc gcc c make y root tong1 groupadd g 500 nagios root tong1 useradd r u 500 s sbin nologin g nagios nagi...
Nagios 監控軟體
過程如下 解壓nagios tar zvxf nagios 3.2.1.tar.gz cd nagios 3.2.1 編譯 configure with command group nagcmd make all 安裝nagios,初始化指令碼及配置檔案,nagios將會被安裝至 usr local...
Nagios 監控平台快速安裝
nagios是一款開源的免費網路監視工具,能有效監控windows linux和unix的主機狀態,交換機路由器等網路設定,印表機等。一 首先安裝apache 安裝apache,採用yum方式安裝,安裝的命令是yum install y httpd 安裝完apache後,啟動apache命令 etc...