部署nagios监控系统
程序员文章站
2022-06-21 12:30:16
...
检查包是否安装,因为Nagios需要依赖这些包提供服务
[[email protected] nagios]# rpm -q gcc glibc glibc-common gd gd-devel xinetd openssl-devel
[[email protected] nagios]#yum install -y gd gd-devel xinetd openssl-devel
建立nagios账号
[[email protected] ~]# useradd nagios -s /sbin/nologin
[[email protected] ~]# mkdir /usr/local/nagios
[[email protected] ~]# chown -R nagios.nagios /usr/local/nagios/
下载地址
你可以通过下面链接地址http://www.nagios.org/download/plugins/ 下载各种插件。
Nagios Addons是Nagios 扩展项目,
解压安装文件
[[email protected] nagios]# tar zxvf nagios-3.5.0.tar.gz
[[email protected] nagios]# cd nagios
编译安装包
[[email protected] nagios]# ./configure --prefix=/usr/local/nagios/
[[email protected] nagios]# make all
[[email protected] nagios]# make install
[[email protected] nagios]# make install-init
[[email protected] nagios]# make install-commandmode
[[email protected] nagios]# make install-config
安装Nagios 插件
[[email protected] nagios]# tar zxvf nagios-plugins-1.4.16.tar.gz
[[email protected] nagios]# cd nagios-plugins-1.4.16
[[email protected] nagios-plugins-1.4.16]# ./configure --prefix=/usr/local/nagios
[[email protected] nagios]#make && make install
Apache基本配置
[[email protected] nagios-plugins-1.4.16]# cd /usr/local/apache/conf/
[[email protected] conf]# vim httpd.conf
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
</Directory>
[[email protected] conf]# htpasswd -c /usr/local/nagios/etc/htpasswd nagios
启动Nagios服务
[[email protected] conf]# service nagios start
客户端需要安装nrpe插件
转载于:https://blog.51cto.com/51request/1730295
上一篇: 时间大小比较工具
下一篇: java比较时间大小