CentOS6.9-zabbix3.2启动失败原因及页面没有mysql选择项

Posted 酷酷的二连长

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6.9-zabbix3.2启动失败原因及页面没有mysql选择项相关的知识,希望对你有一定的参考价值。

 环境内核信息:
[[email protected]01 ~]# uname -a

Linux lodboyedu-01 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
zabbix启动失败的原因
启动时出这 个错误:
[[email protected] zabbix-3.2.7]# /etc/init.d/zabbix_server start
/usr/local/sbin/zabbix_server not installed!  
解决方案:
1. 首先复制的启动脚本是core目录下的,并不是core5下面的
[[email protected] zabbix-3.2.7]# \cp /server/tools/zabbix-3.2.7/misc/init.d/fedora/core/* /etc/init.d/
2. 复制过来之后,修改启动脚本中的目录信息
[[email protected] zabbix-3.2.7]# vim /etc/init.d/zabbix_server       zabbix_agentd也要这样改,两个文件一样     
BASEDIR=/usr/local/zabbix    ----根据个人情况来改,zabbix软件路径
启动
[[email protected] zabbix-3.2.7]# /etc/init.d/zabbix_server start
Starting zabbix_server:                                    [  OK  ]
[[email protected] zabbix-3.2.7]# /etc/init.d/zabbix_agentd start
Starting zabbix_agentd:                                    [  OK  ]

zabbix页面没有mysql选择项

php编译中少了参数
/application/php-5.5.32/bin/php -i |grep configure ----- 查看历史的编译记录
[[email protected] php-5.5.32]# ./configure -h |grep mysql  ----查看帮助
--with-mysql=DIR Include MySQL support. DIR is the MySQL base
mysqlnd the MySQL native driver will be used

--with-mysql-sock=SOCKPATH
--with-mysqli=FILE Include MySQLi support. FILE is the path
to mysql_config. If no value or mysqlnd is passed

--enable-embedded-mysqli
--with-pdo-mysql=DIR PDO: MySQL support. DIR is the MySQL base directory
If no value or mysqlnd is passed as DIR, the
--enable-mysqlnd Enable mysqlnd explicitly, will be done implicitly
--disable-mysqlnd-compression-support
Disable support for the MySQL compressed protocol in mysqlnd
--with-zlib-dir=DIR mysqlnd: Set the path to libz install prefix
连接不到mysql数据库的原因:
缺少 --with-mysqli=mysqlnd 模块参数

解决方案:

添加该编译参数

/server/tools/php-5.5.32/ext/mysqli/目录下执行:
[[email protected] mysqli]# ./configure --with-mysqli=mysqlnd --with-php-config=/application/php-5.5.32/bin/php-config 
[[email protected] mysqli]# make && make install

编译完成后修改php.ini中的参数,没有这个参数就加上

[[email protected] php]# vim lib/php.ini
extension="mysqli.so"

然后到网页中强制刷新一下,就有选择mysql的一项了

 

以上是关于CentOS6.9-zabbix3.2启动失败原因及页面没有mysql选择项的主要内容,如果未能解决你的问题,请参考以下文章

在安装Mysql中出现启动服务失败的原因是啥?

Gradle 同步失败:原因:启动失败:

namenode启动失败,这是啥原因

namenode启动失败,这是啥原因

JavaWeb学习—常见Tomcat启动失败的原因

系统启动失败的原因分析及解决办法