首页 > 代码库 > centos6.5环境下的nagios管理工具nagiosql 320版本的安装
centos6.5环境下的nagios管理工具nagiosql 320版本的安装
下载nagiosql320及补丁
wget http://110.96.192.8:83/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/jaist.dl.sourceforge.net/project/nagiosql/nagiosql/NagiosQL%203.2.0/nagiosql_320.tar.bz2
wget http://110.96.193.8:82/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/jaist.dl.sourceforge.net/project/nagiosql/nagiosql/NagiosQL%203.2.0/nagiosql_320_service_pack_2_additional_fixes_only.zip
解压并复制到相应目录
tar jxvf nagiosql_320.tar.bz2 unzip nagiosql_320_service_pack_2_additional_fixes_only.zip \cp -rf NagiosQL_3.2.0_SP2/* nagiosql32/ mv nagiosql32 /var/www/html/ cd /var/www/html/ chown -R apache.apache nagiosql32/ 准备工作目录 mkdir -pv /etc/nagiosql/{hosts,services,backup/{hosts,services}} mkdir -pv /etc/nagios/ chown -R apache.apache /etc/nagiosql/ chown -R apache.apache /etc/nagios/
配置虚拟主机
cd /etc/httpd/conf.d/ vi nagiosql.conf Alias /nagiosql "/var/www/html/nagiosql32" <Directory "/var/www/html/nagiosql32"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>
重启httpd:
service httpd configtest service httpd restart
安装ssh2
yum -y install php-devel libssh2 libssh2-devel wget http://pecl.php.net/get/ssh2-0.12.tgz tar zxf ssh2-0.12.tgz cd ssh2-0.12 phpize ./configure make && make install vi /etc/php.d/ssh2.ini extension=ssh2.so
创建数据库并导入
mysql -uroot -p -e "create database db_nagiosql_v3;grant all on db_nagiosql_v3.* to nagiosql identified by ‘nagiosql‘"
update user set password=password(‘yourootpass‘) where user=‘root‘;//更新root帐号密码,如果没有设置的话
目录授权
chmod -R 777 /var/www/html/nagiosql32/config
访问web页面并进行安装
http://localhost/nagiosql/install/install.php
会出现下面这样的提示,无需理会,选“NEXT”
Settings file does not exist (config/settings.php): will be created
Database name * db_nagiosql_v3 //填写刚才创建的数据库名称
NagiosQL DB User * nagiosql //填写刚才创建好的数据库用户
NagiosQL DB Password * nagiosql //填写刚才创建好的数据库用户密码
Administrative Database User * root //填数据库管理员帐号
Administrative Database Password * ****** //填写数据库管理员帐号密码
Drop database if already exists? //勾选
Initial NagiosQL User * //nagiosql web登录帐号,默认为admin
Initial NagiosQL Password * //设置对应帐号的密码
Please repeat the password * //确认设置密码
Import Nagios sample config? //导入示例配置
Create NagiosQL config paths? //创建配置文件路径,勾选
选择下一步完成安装。
nagiosql的配置,参照下图完成。
centos6.5环境下的nagios管理工具nagiosql 320版本的安装