1.yum -y install php-mysql mysql perl-DBI perl-DBD-MySQL gcc glibc glibc-common gd gd-devel php-pear mysql-devel perl gettext mysql-server
重新编译PHP 加入--with-gettext --with-mysql --enable-ftp
#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-gd --with-mysqld --with-gettext --enable-ftp
#make
#make install
2.安装HTML_Template_IT,执行如下命令
# pear install HTML_Template_IT
3.下载NagiosQL
解压,NagiosQL是一个WEB管理工具,只要把其放到下Apache即可。因为这里它要和Nagios整合到一起,为了方便管理,把其放在Nagios目录下
# mv nagiosql32 /usr/local/nagios/
# chown -R nagios:nagios /usr/local/nagios/nagiosql
修改config目录的访问权限,以使apache对其具有写权限,
# chmod -R 777 /usr/local/nagios/nagiosql/config
创建配置文件目录,并修改权限
mkdir -p /etc/nagiosql/{hosts,services,backup/{,hosts,services},import}
chown -R apache:nagios /etc/nagiosql/
chmod -R 755 /etc/nagiosql
chmod 777 /usr/local/nagios/nagiosql/config
在install下创建ENABLE_INSTALLER文件
[root@localhost rpm]# cd /usr/local/nagios/nagiosql/install/
[root@localhost install]# touch ./ENABLE_INSTALLER
[root@localhost install]# vim /usr/local/apache2/conf/httpd.conf
修改apache的httpd.conf ,在其后面加入以下语句:
Alias /nagiosQL "/usr/local/nagios/nagiosql"
# SSLRequireSSL Options None AllowOverride None Order allow,deny Allow from all
[root@localhost install]# /usr/local/apache2/bin/apachectl restart
[root@localhost install]# service mysqld restart
进入 提示以下错误
Fatal error: Call to undefined function gettext() in /usr/local/nagios/nagiosql/functions/translator.php on line 21
进入安装测试环境界面提示以下错误:
重新编译PHP 加入--with-gettext --with-mysql --enable-ftp
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-gd --with-gettext --with-mysql --enable-ftp
提示未完成,需要修改php.ini,位置为/etc/php.ini,找到date.timezone,启用添加date.timezone=PRC
阅读(2361) | 评论(0) | 转发(0) |