您好,登录后才能下订单哦!
一、安装Nagios所需组件(事先需配置好yum环境)
# yum -y install httpd php gcc glibc glib-common gd gd-devel libpng libjpeg zlib
二、安装Nagios(软件包位置:http://down.51cto.com/data/1906099)
1、解压软件包
# tar -zxf nagios-3.2.1.tar.gz -C /usr/local/
# cd /usr/local/nagios-3.2.1/
可以参照帮助文档:file:///usr/local/nagios-3.2.1/html/docs/quickstart.html
2、创建Nagios运行用户
# useradd -m nagios
# passwd nagios
# groupadd nagcmd
# usermod -a -G nagcmd nagios
# usermod -a -G nagcmd apache
3、源码包编译安装
# cd /usr/local/nagios-3.2.1/
# . /configure --with-command-group=nagcmd
# make all
# make install
# make install-init
# make install-config
# make install-commandmode
# make install-webconf
4、创建nagios登陆密码
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
5、重新启动Apache
# service httpd restart
# chkconfig httpd on
三、安装nagios插件
# tar -zxf nagios-plugins-1.4.14.tar.gz
# cd nagios-plugins-1.4.14
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
# make
# make install
四、将nagios加入到系统服务中使其开机自启动,并启动nagios
# chkconfig --add nagios
# chkconfig nagios on
# service nagios start
五、Nagios使用手册在源码包/html/docs/目录下为Web方式
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。