zabbix-check of pre-requisites
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的更多相关文章
- Zabbix监控mysql主从复制状态
原理 mysql slave show slave status\G 在输出信息中查看I/O线程和SQL线程的状态值(YES为正常,NO为错误) Slave_IO_Running: Yes Slave ...
- Zabbix如何监控Linux防火墙服务
今天在巡检的时候,突然想到Zabbix能否监控Linux的防火墙服务呢? 显然是可以的,但是Zabbix 5下默认的模板"Template OS Linux by Zabbix agent& ...
- codeforces733D. Kostya the Sculptor 偏序cmp排序,数据结构hash,代码简化
对于n==100.1,1,2或者1,2,2大量重复的形状相同的数据,cmp函数最后一项如果表达式带等于,整个程序就会崩溃 还没有仔细分析std::sort的调用过程,所以这里不是很懂..,mark以后 ...
- 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 ...
- Loj 1003–Drunk(拓扑排序)
1003 - Drunk PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB One of my fr ...
- HITOJ 2662 Pieces Assignment(状压DP)
Pieces Assignment My Tags (Edit) Source : zhouguyue Time limit : 1 sec Memory limit : 64 M S ...
- Codeforces Round #226 (Div. 2 )
这次精神状态不怎么好,第一题的描述看得我就蛋疼...看完就速度写了~~~最终fst了%>_<%,第二题写复杂了,一直WA pretest 3,然后就紧张,导致精神更不好了,一直纠结在第二题 ...
- Hdu 4514 湫湫系列故事——设计风景线
湫湫系列故事--设计风景线 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total ...
- BZOJ 刷题记录 PART 6
[BZOJ2709]水的二分加验证.可是好像被读入萎到了... [BZOJ3229]强大的算法见此.被机房的一堆大神"推荐".于是被坑了...写了一个下午... [BZOJ3631 ...
- hdu_3886_Final Kichiku “Lanlanshu”(数位DP)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3886 题意:这题的题意有点晦涩难懂,大概意思就是给你一个区间,让你找一些满足递增递减条件的数,举个列: ...
随机推荐
- ashx调用session对象
1.引入命名空间 using System.Web.SessionState 2.必须实现接口 public class Login : IHttpHandler, IRequiresSessionS ...
- Windows命令行(DOS命令)教程-8 (转载)http://arch.pconline.com.cn//pcedu/rookie/basic/10111/15325_7.html
15. pass [功能] 设定DOS寻找.COM..EXE..BAT文件的所在目录 [格式] path=[[drive:]path[;-]]或path [说明] 只打path没有参数时,只显示环境变 ...
- oracle登录错误(ORA-01033:ORACLE initialization or shutdown in progress
在网上查找出现这种错误的原因一般是因为删除数据库 安装文件下的某个文件造 成的, 但是在我们的服务器上是因为 机子重启(意外断电)了一下就造 成这样的错误,不过解决办法是一样的,下面贴上解决方案 解决 ...
- 决策树简单介绍(二) Accord.Net中决策树的实现和使用
决策树介绍 决策树是一类机器学习算法,可以实现对数据集的分类.预测等.具体请阅读我另一篇博客(http://www.cnblogs.com/twocold/p/5424517.html). Accor ...
- 1、工程log4j 配置
### set log levels ### log4j.rootLogger = debug,stdout,R ### 输出到控制台 ### log4j.appender.stdout = org. ...
- C/C++中的函数传值
一.运行如下程序段 #include <iostream> #include <string> #include <cstring> //strcpy #inclu ...
- 从配置文件中读取数据获取Connection
配置文件 db.driver=com.mysql.jdbc.Driver db.url=jdbc\:mysql\://localhost\:3306/mybase db.user=root db.ps ...
- HTML/CSS代码片段
内容简介:本文收集了我常用的CSS代码片段! *reset @charset "utf-8"; /* reset */ body, dl, dd, h1, h2, h3, h4, ...
- Python多线程,threading的用法
虫师的文章: 需要注意的是: threads = [ ] t1 = threading.Thread(target=music,args=(u'爱情买卖',)) threads.append(t1) ...
- Java学习笔记--Swing2D图形
1.处理2D图形 要想使用java 2D库绘制图形,需要获得一个Graphics2D类对象.这个类是Graphics类的子类.paintComponent方法自动获得一个Graphics2D类对象,我 ...