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. Singleton ——运行时全局唯一对象

    Singleton 运行时全局唯一对象 Singleton模式只解决一个问题,如何做到运行时创建一个全局唯一的对象? 1:隐藏类的实例化操作,即将构造函数声明为private或protected.任何 ...

  2. AIX创建用户

    -bash-3.2# mkuser test                    创建用户3004-689 User "test" exists.-bash-3.2# finge ...

  3. Android中Edittext的属性

    //此为转载别人的,挺不错的 1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: 把该EditText设为:android:password="true"  ...

  4. POJ1182--食物链(经典并查集)并查集看不出来系列2

    食物链 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 65906   Accepted: 19437 Description ...

  5. lucene的多种搜索2-SpanQuery

    SpanQuery按照词在文章中的距离或者查询几个相邻词的查询 SpanQuery包括以下几种: SpanTermQuery:词距查询的基础,结果和TermQuery相似,只不过是增加了查询结果中单词 ...

  6. dos命令创建安卓签名

    1.dos下进入到jdk安装目录的bin目录, 如:C:\Program Files\Java\jdk1.7.0_79\bin 2.输入命令格式如: keytool -genkey -alias aa ...

  7. MaterialWidgetLibrary 学习

    studio项目地址:https://github.com/keithellis/MaterialWidget 修改后的eclipse项目地址: 修改后的eclipse项目 Demo地址: activ ...

  8. maven学习笔记 1

    1    概述 1.1 Maven是什么 1.2 为什么要用Maven 2    怎么用Maven 2.1 Maven仓库 2.2 Maven安装 2.3 Eclipse插件 2.4 Maven常用命 ...

  9. JavaScript 小技巧汇总

    判断一个变量是否申明 if (typeof v === "undefined") { // ... } 判断一个变量是否是函数 function f() {} typeof f / ...

  10. Apache无法启动提示the requested operation has failed

    主要参考这篇 http://apps.hi.baidu.com/share/detail/15868128 但还是遇到一些问题,记录如下: 1. 配置完成后,restart apache,出现 the ...