nagios插件nagiosql安装配置
# Nagiosql install[root@Cagios ~]# yum install -y libssh2 libssh-devel[root@Cagios ~]# cd /usr/local/src[root@Cagios src]# wget http://pecl.php.net/get/ssh2-0.12.tgz[root@Cagios ssh2-0.12]# phpize[root@Cagios ssh2-0.12]# ./configure --with--ssh2[root@Cagios ssh2-0.12]# make && make install[root@Cagios ~]# vi /etc/php.d/ssh2.iniextension=ssh2.sowget http://nchc.dl.sourceforge.net/project/nagiosql/nagiosql/NagiosQL%203.2.0/nagiosql_320.tar.gz# nagiosql 权限设置[root@Cagios src]# tar zxf nagiosql_320.tar.gz[root@Cagios src]# mv nagiosql/ /usr/local/nagios/[root@Cagios ~]# cd /usr/local/nagios/nagiosql/[root@Cagios nagiosql]# chmod 777 config/[root@Cagios nagiosql]# chown -R nagios:nagcmd *[root@Cagios nagiosql]# find . -type d -exec chmod 775 {} \;[root@Cagios nagiosql]# find . -type f -exec chmod 664 {} \;# 配置nagiosql文件写路径及权限[root@Cagios ~]# mkdir -p /etc/nagiosql/backup/hosts[root@Cagios ~]# mkdir -p /etc/nagiosql/backup/services[root@Cagios ~]# mkdir -p /etc/nagiosql/hosts[root@Cagios ~]# mkdir -p /etc/nagiosql/services[root@Cagios ~]# chown -R nagios:nagcmd /etc/nagiosql[root@Cagios ~]# chmod -R 775 /etc/nagiosql[root@Cagios ~]# chown -R nagios.nagcmd /usr/local/nagios# 配置apache[root@Cagios ~]# vi /etc/httpd/conf.d/nagios.confAlias /nagiosql "/usr/local/nagios/nagiosql"# SSLRequireSSL Options None AllowOverride None Order allow,deny Allow from all # 编辑nagios配置文件,注释以cfg开头的配置,并添加vim /usr/local/nagios/etc/nagios.cfg## Timeperiodscfg_file=/etc/nagiosql/timeperiods.cfg## Commandscfg_file=/etc/nagiosql/commands.cfg## Contactscfg_file=/etc/nagiosql/contacts.cfgcfg_file=/etc/nagiosql/contactgroups.cfgcfg_file=/etc/nagiosql/contacttemplates.cfg## Hostscfg_dir=/etc/nagiosql/hostscfg_file=/etc/nagiosql/hosttemplates.cfgcfg_file=/etc/nagiosql/hostgroups.cfgcfg_file=/etc/nagiosql/hostextinfo.cfgcfg_file=/etc/nagiosql/hostescalations.cfgcfg_file=/etc/nagiosql/hostdependencies.cfg## Servicescfg_dir=/etc/nagiosql/servicescfg_file=/etc/nagiosql/servicetemplates.cfgcfg_file=/etc/nagiosql/servicegroups.cfgcfg_file=/etc/nagiosql/serviceextinfo.cfgcfg_file=/etc/nagiosql/serviceescalations.cfgcfg_file=/etc/nagiosql/servicedependencies.cfg# 安装页面http://192.168.88.128/nagiosql/install/