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. 编程实现Windows瞬间关机

    我们先来看看Windows正常的关机流程:①关机指令通知Windows子系统csrss.exe,csrss.exe收到通知后会和Winlogon.exe做一个数据交换,再由Winlogon.exe通知 ...

  2. 【转】How to build and install PHP 5.6.9 from source on Ubuntu 14.04 VPS

    原文 https://vpsineu.com/blog/how-to-build-and-install-php-5-6-9-from-source-on-ubuntu-14-04-vps/ In t ...

  3. HTML+CSS D08浮动

    1. <html> <head> <title>div浮动</title> <style type="text/css"> ...

  4. IDL和生成代码分析

    IDL:接口描述语言 这里使用thrift-0.8.0-xsb这个版本来介绍IDL的定义以及简单实例分析. 1. namespace 定义包名 2.struct 结构体,定义服务接口的参数和返回值用到 ...

  5. Apache 的常见问题

    Apache "No services installed"问题的处理以及Apache提示 the requested operation has failed而无法启动 安装完 ...

  6. HDU1258 Sum it up

    Sum it up 题意:给定一个数sum,和n个数,求sum可以由这n个数里面的那几个数的和表示. Given a specified total t and a list of n integer ...

  7. ReactiveCocoa 用法实例

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

  8. js滚动条

    /*滚动条在Y轴上的滚动距离*/function ScrollTop(){ var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0; i ...

  9. Linux学习 -- Shell基础 -- Bash变量

    变量 默认是字符串型,数值型需要显示指定 等号两侧都不能有空格 单引号:原始字符串  双引号:保留转义 命令结果作为值:反引号 或 $() 环境变量一般用大写 自定义变量 变量定义    name=& ...

  10. AutoMapper使用简单总结

    近期,在用AutoMapper整理一些模型对象映射,顺便小结一下使用的体会.难免有写得不对的地方,谢谢指出! 1. AutoMapper是一个.NET的对象映射工具,可以方便地进行对象间的赋值处理. ...