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. OpenGL ES着色器语言之着色概览(官方文档)

    OpenGL ES着色器语言之着色概览(官方文档第二章) 事实上,OpenGL ES着色语言是两种紧密关联的语言.这些语言用来在OpenGL ES处理管线的可编程处理器创建着色器. 在本文档中,除非另 ...

  2. ReactiveCocoa 用法实例

      我个人非常推崇ReactiveCocoa,它就像中国的太极,太极生两仪,两仪生四象,四象生八卦,八卦生万物.ReactiveCocoa是一个高度抽象的编程框架,它真的很抽象,初看你不知道它是要干嘛 ...

  3. Win7下用easyBCD引导安装Ubuntu15.04

    1 准备工作 easyBCD中添加一个启动项 修改启动项配置文件 注意两点:C盘设备号,镜像名称 title Install Ubuntu root (hd0,) kernel (hd0,)/vmli ...

  4. Zend Optimizer not installed可能原因及解决方法

    Zend Optimizer not installed可能原因及解决方法 Optimizer, Zend 在配置php服务器的时候,所有的东西都安装好了,就是浏览一个要求zend的程序的时候,总是提 ...

  5. AS-->如何更高效的使用 Gradle, 快速build apk

    版权声明:欢迎转载,转载请注明出处;http://blog.csdn.net/angcyo 看本文之前,推荐先看我之前写的一篇文章: 传送门 日前Android Stuido 已经更新到 2.0.0 ...

  6. Android命令行工具logcat详细用法!

    logcat是Android中一个命令行工具,可以用于得到程序的log信息. 见板凳详细说明!     本贴内容来自网络,引用网址为:http://hi.baidu.com/%C9%C1%D2%AB% ...

  7. 详细版在虚拟机安装和使用hadoop分布式集群

    集群模式: 一台master 192.168.85.2 一台slave  192.168.85.3 jdk jdk1.8.0_74(版本不重要,看喜欢) hadoop版本 2.7.2(版本不重要,2. ...

  8. Counting Islands II

    Counting Islands II 描述 Country H is going to carry out a huge artificial islands project. The projec ...

  9. 我的android学习脚步----------- 的第一个应用

    刚刚开始学android开发,以前都是在别人调好的应用中修改JNI,现在需要自己一步步走 开发环境:Eclipse+ADT 配置不多讲了,引自:http://www.cnblogs.com/allen ...

  10. 1381: Munching(BFS)

    Description Bessie loves her grass and loves to hurry to the barn for her evening milking session. S ...