环境:Ubuntu 11.04 VirtualBOX4.0.6r71344 Ubuntu 10.10 Server
要求:对网络内的二台DHCP服务器监测
第一步:安装nagios3、apache2
$sudo apt-get install apache2
$sudo apt-get install nagios3 //nagios Version 3.2.1。
第二步:安装过程中设置nagios3
1、管理员警报邮箱设置(这次我直接选择 No configruation)
No configuration:
Should be chosen to leave the current configuration unchanged.
Internet site:
Mail is sent and received directly using SMTP.
Internet with smarthost:
Mail is received directly using SMTP or by running a utility such as fetchmail. Outgoing mail is sent using a smarthost.
Satellite system:
All mail is sent to another machine, called a 'smarthost', for delivery.
Local only:
The only delivered mail is the mail for local users. There is no network.
General type of mail configuration:
No configuration
Internet Site
Internet with smarthost
Satellite system
Local only
<确定> <取消>
2、nagios的web管理页用户认证要用的密码设置(上一步没有设置报警邮箱,所以直接到这一步)
Please provide the password to be created with the "nagiosadmin" user.
This is the username and password you will use to log in to your nagios installation after configuration is complete. If you do not provide a password, you will have to configure access to nagios yourself.
Nagios web administration password:
输入后会要求再次确认密码,确认后回车
在这里最好就创建了nagiosadmin的密码,要不然还要在后面创建,不过也不麻烦用下面的命令就可以了:
htpasswd -C /etc/nagios3/htpasswd.users nagiosadmin
以后再添加用户就不用“-C”了
例如:htpasswd /etc/nagios3/htpasswd.users test
系统提示:
New password: //输入新密码
Re-type new password: //确认密码
Adding password for user test
其实在这时在浏览器里输入http://localhost/nagios3/就可以看到nagios的管理页面了,当然里面还没有什么东西
