环境内核信息:
代码语言:javascript复制[root@zabbix-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启动失败的原因
启动时出这 个错误:
[root@m01 zabbix-3.2.7]# /etc/init.d/zabbix_server start /usr/local/sbin/zabbix_server not installed!
解决方案:
1. 首先复制的启动脚本是core目录下的,并不是core5下面的 [root@m01 zabbix-3.2.7]# cp /server/tools/zabbix-3.2.7/misc/init.d/fedora/core/* /etc/init.d/
2. 复制过来之后,修改启动脚本中的目录信息 [root@m01 zabbix-3.2.7]# vim /etc/init.d/zabbix_server
zabbix_agentd也要这样改,两个文件一样 BASEDIR=/usr/local/zabbix ----根据个人情况来改,zabbix软件路径
启动
代码语言:javascript复制[root@m01 zabbix-3.2.7]# /etc/init.d/zabbix_server start
Starting zabbix_server: [ OK ]
[root@m01 zabbix-3.2.7]# /etc/init.d/zabbix_agentd start
Starting zabbix_agentd: [ OK ]
zabbix页面没有mysql选择项
代码语言:javascript复制php编译中少了参数
/application/php-5.5.32/bin/php -i |grep configure ----- 查看历史的编译记录
[root@m01 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 模块参数
解决方案:
添加该编译参数
代码语言:javascript复制/server/tools/php-5.5.32/ext/mysqli/目录下执行:
[root@m01 mysqli]# ./configure --with-mysqli=mysqlnd --with-php-config=/application/php-5.5.32/bin/php-config
[root@m01 mysqli]# make && make install
编译完成后修改php.ini中的参数,没有这个参数就加上
代码语言:javascript复制[root@m01 php]# vim lib/php.ini
extension="mysqli.so"
然后到网页中强制刷新一下,就有选择mysql的一项了