您好,登录后才能下订单哦!
Nagios 快速配置
1 所需软件包:
Apache
GCC compiler
GD development libraries
yum install httpd php
yum install gcc glibc glibc-common
yum install gd gd-devel
/usr/sbin/useradd -m nagios
passwd nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache
wget http://ncu.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.5.1/nagios-3.5.1.tar.gz
wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
tar xvf nagios-3.5.1.tar.gz
cd nagios
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
vim/usr/local/nagios/etc/objects/contacts.cfg
#安装Nagio web 配置文件到Apacheconf.d 目录
make install-webconf
#创建用于登录的nagiosadmin账户
htpasswd -c/usr/local/nagios/etc/htpasswd.users nagiosadmin
#重启Apache使服务生效
service httpd restart
#解压
tar xvf nagios-plugins-2.0.tar.gz
cd nagios-plugins-2.0
#配置
./configure --with-nagios-user=nagios--with-nagios-group=nagios
make && make install
#添加到开机启动项
chkconfig --add nagios
#设置开机自启动
chkconfig nagios on
#检测配置文件的语法
/usr/local/nagios/bin/nagios -v/usr/local/nagios/etc/nagios.cfg
#启动
service nagios start
#在浏览器中输入
http://localhost/nagios
#由于所用服务器没有图形界面,所以在Ubuntu查看时输入
http://10.10.54.111/nagios
A.关闭SELinux
B.设置好防火墙规则
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。