1.首先下载所需软件

 
wget https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz 
 
wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download
 
wget https://launchpad.net/gearmand/1.2/1.1.6/+download/gearmand-1.1.6.tar.gz
 
wget http://pecl.php.net/get/gearman-1.1.1.tgz
 
wget http://ncu.dl.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.zip
 
 
 
2.安装编译软件
 
 
tar zxvf libevent-2.0.20-stable.tar.gz
cd libevent-2.0.20-stable
./configure --prefix=/usr 
make
make install
/sbin/ldconfig
 
 
 
unzip boost_1_53_0.zip
cd boost_1_53_0 
./bootstrap.sh --prefix=/opt/local/boost-1.53
 
 
vi tools/build/v2/user-config.jam
 
             在最后增加
using mpi 
 
./b2
./b2 install
 
 
 
tar zxvf gearmand-1.1.6.tar.gz
cd gearmand-1.1.6
./configure --with-boost=/opt/local/boost-1.53
make 
make install
/sbin/ldconfig
 
 
 
 
tar -zxvf re2c-0.13.5.tar.gz
cd re2c-0.13.5
./configure 
make 
make install
 
 
 
tar zxvf gearman-1.1.1.tgz
cd gearman-1.1.1
/opt/local/php/bin/phpize
./configure --with-php-config=/opt/local/php/bin/php-config --with-gearman
make
make install
 
 
3. 编辑 php.ini
 
 
vi php.ini
 
增加
 
extension = "gearman.so"
 
 
重启php
 
 
 
 
 
4. 启动gearmand 服务
 
gearmand -L 10.6.0.6 -p 4730  -u root -l /var/log/gearmand.log -d 
 
其他参数请  gearmand --help
 
 
 
 
 
 
5. 一个监控的工具
 
wget https://nodeload.github.com/yugene/Gearman-Monitor/zip/master
 
 
ps: 
错误.1
 
error: tr1/cinttypes: No such file or directory
 
yum install gcc44 gcc44-c++ libstdc++44-devel
 
export CC="gcc44"
export CXX="g++44"
 
 
错误.2
configure: error: Please install libgearman 
 
export GEARMAN_LIB_DIR=/usr/include/libgearman 
export GEARMAN_INC_DIR=/usr/include/libgearman
 
 
 
错误.3
libhostile/function.c: In function 'print_function_cache_usage':
libhostile/function.c:54: error: 'for' loop initial declarations are only allowed in C99 mode
libhostile/function.c:54: note: use option -std=c99 or -std=gnu99 to compile your code
 
 
 
 
那是因为 C++ 默认是用 c89 来编译的···需要更改成 c99 编译!
 
./configure 以后
 
vim Makefile
 
搜搜 CC
 
这里更改为
 
CC = gcc44 -std=c99
 
-------------------------------------------------------------------------------------
 
 
 
错误.4
 
collect2: ld returned 1 exit status   
make[1]: *** [benchmark/blobslap_worker] Error 1
 
 
GOOGLE 解决办法 
 
cd /opt/local/boost-1.53/lib  
cp -rf * /usr/lib/;  
cp -rf * /usr/lib64/;  
ln -s /opt/local/boost-1.53/include/boost /usr/include/boost 
 
-------------------------------------------------------------------------------------
 
 
错误.5
 
gearmand   make 出现 sqlite3  的错误.. 找不到解决办法~只能在configure 里把 sqlite3 先关闭掉...
 
./configure --with-boost=/opt/local/boost-1.53 --with-sqlite3=no

CentOSx64 安装 Gearmand 和 Gearman php扩展的更多相关文章

  1. linux 下安装redis以及php Redis扩展

    [php] view plaincopy在CODE上查看代码片派生到我的代码片 linux 下安装redis以及php Redis扩展 环境配置: centos6. nginx/ php/ mysql ...

  2. memcached的安装以及php两个扩展软件安装(memcache、memcached)

    百度云安装包:http://pan.baidu.com/s/1pKZeDwn  k3ap 1.安装memcached Memcached是基于libevent的事件处理,所以它的安装依赖libeven ...

  3. centos7安装redis3.0和phpredis扩展详细教程(图文)

    整理一下centos7安装redis3.0和phpredis扩展的过程,有需要的朋友可以拿去使用. 一.安装redis3.0 1.安装必要的包 yum install gcc 2.centos7安装r ...

  4. 在windows环境下安装redis和phpredis的扩展

    在windows环境下安装redis和phpredis的扩展 1.首先配置php: 需要在windows的集成环境中找到php的扩展文件夹,ext,然后在网上寻找自己的php对应的.dll文件 比如说 ...

  5. CentOS7安装redis数据库及php-redis扩展

    redis 首先把redis安装到服务器中 1.wget http://download.redis.io/redis-stable.tar.gz 下载redis源码 2. tar xvzf redi ...

  6. hackbar增强版 & 在Firefox上安装未通过验证的扩展

    hackbar是Firefox的经典插件之一.介绍如下(懒得翻译了) This toolbar will help you in testing sql injections, XSS holes a ...

  7. wkhtmltopdf 安装过程不包含php扩展部分

    Qt Webkit HTML Converter Install wkhtmltopdf This page documents installation of wkhtmltopdf on Gent ...

  8. 为订阅内虚拟机批量安装并配置 Microsoft Anti-Malware 扩展

    本文提供了对订阅内的 Windows 经典部署虚拟机和资源管理器部署虚拟机执行批量安装并配置 Microsoft Anti-Malware 扩展的 PowerShell 脚本. 关于安装 Window ...

  9. Ubuntu 17.10 用 apt 搭建 lamp 环境、安装 phpmyadmin、redis 服务+扩展、mysql 扩展、开启错误提示、配置虚拟主机

    2018-02-24 13:50:30 更新: 个人喜欢相对原生又不太麻烦,所以用 apt 构建环境.不过,最近使用到现在记得出现过了 3 次 apache 或 mysql 服务器无法启动或无法连接的 ...

随机推荐

  1. 常见html标签

    1.flash嵌入标签 <object> <embed allowscriptaccess="always" allowfullscreen="true ...

  2. n++与++n的区别

    n++ 是先执行n++再进行赋值返回的只却是n. ++n 是先赋值之后再执行++n. 其实执行 n++ and ++n 都算是一次赋值 所以若 n = n++ and n = ++n 其实就是2次赋值 ...

  3. 初学.net 网页打开过程

    一个网页打开的过程 1.进入控制器里的方法里  控制器的命名必须以Controll结尾前面的名字要和view层的命名一致 2.控制器完了以后 就进入view层对应的视图里 3.视图里调用model   ...

  4. TextureView+SurfaceTexture+OpenGL ES来播放视频(一)

    引自:http://www.ithao123.cn/content-8733143.html 最近发现视频直播类应用层出不穷,比如233手游直播,蓝鲸直播,微录客等等什么的,连android界大神老罗 ...

  5. ABI & API

    API defines the programning language and function entry point, arguments type, order. ABI defines th ...

  6. 青蛙的约会<数论,extgcd>

    青蛙的约会 题意: 在一个圆上有一个零刻度点,公青蛙和母青蛙分别在A点和B点<不同的位 置>,他们每秒行走的距离分别是m和n,圆的周长是L.问题是这两个青 蛙能不能相遇,若能在什么时候相遇 ...

  7. 基于IDL 的WebRS系统设计图

    图1 用例图 图2 结构图

  8. SystemClock.sleep和Thread.sleep的区别

    在Java中我们处理线程同步问题时,处理延迟可能会使用Thread类的sleep方法,这里抛开concurrent类的一些方法,其实 Android平台还提供了一个SystemClock.sleep方 ...

  9. C#入门经典第八章面向对象编程-3-Windows应用程序中的OOP

    实例一:使用对象.代码如下: 首先从工具箱中拖一个按钮,并添加事件. private void button2_Click(object sender, EventArgs e) {//按钮的Butt ...

  10. struts2 里escape="false"的问题?

    <s:property value="html" escape="false"/> 没有name 不知道你是怎么取的值 <s:hidden n ...