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. ant学习(1)

    路径:/home/framework_Study/springinAction/webRoot/WEB-INF <?xml version="1.0" encoding=&q ...

  2. Notification (通知)的 新版和旧版用法

    Notification (通知)的 新版和旧版用法   一.先来看旧版,Api 11 之前的用法: NotificationManager manager = (NotificationManage ...

  3. WCF websocket

    WebSocket, like as TCP, is a bi-directional, full-duplex communication channel over a single TCP con ...

  4. C# 窗体程序入门 之计算器

    之前一直在java的B/S,这次被要求做一个C/S,其中客户端主要是界面和socket通信.因为没有使用过C#和Visual Studio的控件编程,先来个HelloWorld. 我的环境是visua ...

  5. poj1094 topsort

    Sorting It All Out Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 32275   Accepted: 11 ...

  6. SharpZipLib 压缩文档下载

    using ICSharpCode.SharpZipLib.Zip; Response.Clear(); Response.ClearContent(); Response.ClearHeaders( ...

  7. jquery国内cdn

    推荐几个国内的jquery CDN服务地址吧: 新浪CDN,感觉很快,用的人很多,推荐使用! http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.m ...

  8. talos项目记录

    1. 跑schedule : php src/cli-schedule/cli.php -a sales.coupon.offer-coupons  所用方法在schedule里

  9. Python中range的用法

    函数原型:range(start, end, scan): 参数含义:start:计数从start开始.默认是从0开始.例如range(5)等价于range(0, 5); end:技术到end结束,但 ...

  10. Hdu1096

    #include <stdio.h> int main() { int T,n; ; while(scanf("%d",&T)!=EOF){ while(sca ...