检查包是否安装,因为Nagios需要依赖这些包提供服务 [root@bogon nagios]# rpm -q gcc glibc glibc-common gd gd-devel xinetd openssl-devel [root@bogon nagios]#yum install -y gd gd-devel xinetd openssl-devel 建立nagios账号 [root@bogon ~]# useradd nagios -s /sbin/nologin [root@bogon ~]# mkdir /usr/local/nagios [root@bogon ~]# chown -R nagios.nagios /usr/local/nagios/ 下载地址 你可以通过下面链接地址http://www.nagios.org/download/plugins/ 下载各种插件。 Nagios Addons是Nagios 扩展项目, 解压安装文件 [root@bogon nagios]# tar zxvf nagios-3.5.0.tar.gz [root@bogon nagios]# cd nagios 编译安装包 [root@bogon nagios]# ./configure --prefix=/usr/local/nagios/ [root@bogon nagios]# make all [root@bogon nagios]# make install [root@bogon nagios]# make install-init [root@bogon nagios]# make install-commandmode [root@bogon nagios]# make install-config 安装Nagios 插件 [root@bogon nagios]# tar zxvf nagios-plugins-1.4.16.tar.gz [root@bogon nagios]# cd nagios-plugins-1.4.16 [root@bogon nagios-plugins-1.4.16]# ./configure --prefix=/usr/local/nagios [root@bogon nagios]#make && make install Apache基本配置 [root@bogon nagios-plugins-1.4.16]# cd /usr/local/apache/conf/ [root@bogon conf]# vim httpd.conf ScriptAlias /nagios/cgi-bin "/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 Alias /nagios "/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 [root@bogon conf]# htpasswd -c /usr/local/nagios/etc/htpasswd nagios 启动Nagios服务 [root@bogon conf]# service nagios start
客户端需要安装nrpe插件
创新互联公司是专业的下花园网站建设公司,下花园接单;提供成都网站建设、成都做网站,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行下花园网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!