nagios安装三剑客:
建立nagios账号
- /usr/sbin/useradd nagios && passwd nagios
创建一个用户组名为nagcmd用于从Web接口执行外部命令。将nagios用户和apache用户都加到这个组中。
- /usr/sbin/groupadd nagcmd
- /usr/sbin/usermod -G nagcmd nagios
- /usr/sbin/usermod -G nagcmd apache
安装nagios及插件
- tar zxvf nagios-3.2.1
- cd nagios-3.2.1
- ./configure --with-command-group=nagcmd --prefix=/usr/local/nagios
- make all
- make install
- make install-init
- make install-config
- make install-commandmode
正确安装完毕,/usr/local/nagios目录下将会有这几个文件夹
bin etc include libexec sbin share var
#p#
安装nagios‐plugins
- tar zxvf nagios-plugins-1.4.14
- cd nagios-plugins-1.4.14
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios --perfix=/usr/local/nagios
- make && make install
在另一台机上编译安装apache,需要用到htpasswd这工具来生成登陆的用户名和密码
- /usr/local/httpd/bin/htpasswd -c /usr/local/nagios/etc/viyin.net viyin
- [root@game bin]# ./htpasswd -c /root/viyin.net viyin
- New password:
- Re-type new password:
- Adding password for user viyin
通过文章的三剑客,我们都知道了nagios安装其实很简单,希望大家能真真掌握它!
【编辑推荐】