分类: LINUX
2009-08-06 09:53:36
Nagios Installation Manual
By Cycle
一.安装指南(基于Fedora 11平台)
1.安装前准备
1.1在root根用户下进行安装
su -l
1.2安装Apache
yum install httpd
1.3安装GCC编译器
yum install gcc
1.4安装GD库与开发库
yum install gd gd-devel
1.5下载Nagios和插件程序包
Step 1 - Download Nagios Core
Step 2 - Download Nagios Plugins
Step 3 - Download Nagios Addons
2.安装过程
2.1建立一个帐号
/usr/sbin/useradd nagios
passwd nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagcmd nagios
/usr/sbin/usermod -G nagcmd apache
2.2编译与安装Nagios
tar
xzf nagios-
cd
nagios-
./configure –with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmod
2.3客户化配置
配置文件样本在/usr/local/nagios/etc/
编辑/usr/local/nagios/etc/objects/contacts.cfg配置文件
更改email地址,nagiosadmin的联系人定义信息中的email信息为自己的emial信息以接收报警内容
vi /usr/local/nagios/etc/objects/contacts.cfg
2.4配置Web接口
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
2.5编译与安装Nagios插件
tar
xzf nagios-plugins-
cd
nagios-plugins-
./configure
--with-nagios-user=nagios --with-nagios-group=nagios
make
make install
2.6启动Nagios
chkconfig
--add nagios
chkconfig nagios on
/usr/local/nagios/bin/nagios
-v /usr/local/nagios/etc/nagios.cfg
service nagios start
2.7更改SELinux设置
vi /etc/selinux/config
SELINUX=enforcing改为SELINUX=permissive
2.8登录Web接口
安装Nagios的Web配置文件到Apache的conf.d目录下
make install-webconf
这一步出现问题,请问可以怎么样解决。
是不是这一步如果没有成功,再登录http://localhost/nagios/时报404错误?
谢谢您!