LAMP搭建完成后,访问http://ip/zabbix,在检查环境界面,有的检查项目提示fail。常见如下:
zabbix:Check of pre-requisites
1、PHP bcmath fail
处理方法:
安装php-bcmath扩展
#cd php-5.6.8/ext/bcmath
#phpize
#/etc/php/bin/phpize(phpize的路径根据各自安装有所不同)
#./configure --with-php-config=/usr/bin/php-config(php-config文件的路径根据各自安装有所不同)
#make
#make install
最后还需要把生成的bcmath.so文件加入到php.ini中extesion=bcmath.so
(如果没有设定extesion_dir,可能要加上全路径,查看phpize执行后的生成的so文件的路径即可,
这里是:extension_dir=extension_dir="/opt/data/php5/lib/php/extensions/no-debug-zts-20131226/")

# ls /opt/data/php5/lib/php/extensions/no-debug-zts-20131226/ --php的模块默认就是安装到这个目录
bcmath.so mysqli.so opcache.so xmlrpc.so

然后重启web服务器,就Ok了
./apachectl stop
./apachectl start

2、PHP databases support fail
需要安装mysqli模块
同上,cd php-5.6.8/ext/mysqli
./configure --prefix=/usr/local/mysqli \
--with-php-config=/usr/bin/php-config \ --根据环境实际路径:find / -name php-config
--with-mysqli=/usr/local/mysql/bin/mysql_config ---根据环境实际路径:find / -name mysql_config
make
make install

然后修改php的配置文件:php.ini
加上一句:
extension=mysqli.so
重新启动apache,访问zabbix,可以看到database support 检查项已通过

3、PHP time zone、PHP option max_input_time、PHP option max_execution_time 这三项检查不通过
修改php.ini
date.timezone = Asia/Shanghai
post_max_size = 16M
max_execution_time = 300
max_input_time = 300

4、PHP gd JPEG support fail
处理方法:GD库添加jpeg文件的支持
必须正确安装zlib,jpeg,gd.libpng,而且版本还有能出错。
zlib下载地址:http://www.zlib.net/
libpng下载地址: http://libmng.com/pub/png/libpng.html
jpegsrc下载地址:http://www.ijg.org/
gd 使用php源文件自带文件编译安装../php/ext/gd

zlib和libpng使用这两个版本兼容性较好:zlib-1.2.7 libpng-1.5.9。之前由于这两个兼容性问题,折腾很久。

4.1 编译安装zlib

./configure --prefix=/usr/local/zlib

4.2编译安装jpeg
tar zxvf jpegsrc.v8d.tar.gz
cd jpeg-8d/
./configure --prefix=/usr/local/jpeg --enable-shared
make && make install

4.3编译安装gd
cd ../gd
phpize
./configure --with-jpeg-dir=/usr/local/jpeg --with-php-config=/usr/bin/php-config
make clean
make && make install

4.4 安装libpng,libpng-1.5.9  

./configure --prefix=/usr/local/libpng

安装完成后,重新启动apache,访问zabbix,可以看到PHP gd JPEG support通过

============

php编译安装命令:版本5.6.8

./configure --prefix=/opt/data/php5 \
--with-apxs2=/opt/data/apache2/bin/apxs \
--with-gd --with-freetype-dir=/usr/include/freetype2/freetype \
--with-jpeg-dir=/usr/local/jpeg \
--with-png-dir=/usr/local/libpng \
--with-mysql \
--with-zlib \
--with-config-file-path=/etc \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--with-curl \
--with-exec-dir=/usr/bin \
--enable-xml \
--with-xmlrpc=shared \
--enable-magic-quotes \
--enable-sockets \
--enable-mbstring=all \
--with-pdo-mysql \
--with-gettext \

zabbix-check of pre-requisites的更多相关文章

  1. Zabbix监控mysql主从复制状态

    原理 mysql slave show slave status\G 在输出信息中查看I/O线程和SQL线程的状态值(YES为正常,NO为错误) Slave_IO_Running: Yes Slave ...

  2. Zabbix如何监控Linux防火墙服务

    今天在巡检的时候,突然想到Zabbix能否监控Linux的防火墙服务呢? 显然是可以的,但是Zabbix 5下默认的模板"Template OS Linux by Zabbix agent& ...

  3. codeforces733D. Kostya the Sculptor 偏序cmp排序,数据结构hash,代码简化

    对于n==100.1,1,2或者1,2,2大量重复的形状相同的数据,cmp函数最后一项如果表达式带等于,整个程序就会崩溃 还没有仔细分析std::sort的调用过程,所以这里不是很懂..,mark以后 ...

  4. Step by step configuration of Outgoing Emails from SharePoint to Microsoft Online

    First of all your SharePoint server should be added to Microsoft online safe sender list, so that Sh ...

  5. Loj 1003–Drunk(拓扑排序)

    1003 - Drunk PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB One of my fr ...

  6. HITOJ 2662 Pieces Assignment(状压DP)

    Pieces Assignment My Tags   (Edit)   Source : zhouguyue   Time limit : 1 sec   Memory limit : 64 M S ...

  7. Codeforces Round #226 (Div. 2 )

    这次精神状态不怎么好,第一题的描述看得我就蛋疼...看完就速度写了~~~最终fst了%>_<%,第二题写复杂了,一直WA pretest 3,然后就紧张,导致精神更不好了,一直纠结在第二题 ...

  8. Hdu 4514 湫湫系列故事——设计风景线

    湫湫系列故事--设计风景线 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total ...

  9. BZOJ 刷题记录 PART 6

    [BZOJ2709]水的二分加验证.可是好像被读入萎到了... [BZOJ3229]强大的算法见此.被机房的一堆大神"推荐".于是被坑了...写了一个下午... [BZOJ3631 ...

  10. hdu_3886_Final Kichiku “Lanlanshu”(数位DP)

    题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3886 题意:这题的题意有点晦涩难懂,大概意思就是给你一个区间,让你找一些满足递增递减条件的数,举个列: ...

随机推荐

  1. ios浅谈关于nil和 NIL区别及相关问题(转)

    转自:http://blog.csdn.net/guozh/article/details/8469131 个就是将引用技术减1,所谓的引用计数就是看看有多个指针指向一块内存实体,当release一次 ...

  2. 转载--DEV GridControl 的一些基本操作

    1. 如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 2. 如何新增一条记录 (1).gridView.Ad ...

  3. ASP.net MVC 向子视图传递数据

    使用 RenderPage 加载子视图 @RenderPage("~/Shared/Component/Dialog.cshtml", new { title = "He ...

  4. java文件读写的两种方式

    今天搞了下java文件的读写,自己也总结了一下,但是不全,只有两种方式,先直接看代码: public static void main(String[] args) throws IOExceptio ...

  5. C#在foreach循环中修改字典等集合出错的处理

    C#在foreach循环中修改字典等集合出错:System.InvalidOperationException: Collection was modified; enumeration operat ...

  6. hdu 1262寻找素数对

    Problem Description 哥德巴赫猜想大家都知道一点吧.我们现在不是想证明这个结论,而是想在程序语言内部能够表示的数集中,任意取出一个偶数,来寻找两个素数,使得其和等于该偶数. 做好了这 ...

  7. Android电子书翻页效果实现

    这篇文章是在参考了别人的博客基础上,修改了其中一个翻页bug,并且加了详细注释 先看效果 其中使用了贝赛尔曲线原理,关于贝赛尔曲线的知识,推荐大家看下http://blog.csdn.net/hmg2 ...

  8. No2_1.接口继承多态_Java学习笔记_接口

    接口.继承与多态 1.继承和多态是面向对象开发语言中的重要一个环节,使用得当,可以将整个程序的架构变得非常有弹性,减少代码冗余: 2.继承:复用定义好的类: 3.多态:可以动态调整对象的调用,降低对象 ...

  9. bower解决js库的依赖管理

    从零开始nodejs系列文章,将介绍如何利Javascript做为服务端脚本,通过Nodejs框架web开发.Nodejs框架是基于V8的引擎,是目前速度最快的Javascript引擎.chrome浏 ...

  10. NSString、NSData、char* 类型之间的转换-备

    1. NSString转化为UNICODE String: (NSString*)fname = @“Test”; char fnameStr[10]; memcpy(fnameStr, [fname ...