1、安装gperf libuuid-devel
  yum install -y gperf libuuid-devel

2、安装 libevent
  yum install libevent libevent-devel

  如果libevent版本低,则手动安装

  wget https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
  tar -zxvf libevent-2.0.22-stable.tar.gz
  cd libevent-2.0.22-stable
  ./configure
  make
  make install

3、添加环境变量
  echo export LD_LIBRARY_PATH=/usr/local/lib >> ~/.bash_profile
  shutdown -r now

4、安装gearmand服务
  wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
  tar -zxvf gearmand-1.1.12.tar.gz
  cd gearmand-1.1.12
  ./configure --prefix=/usr/local/gearmand (如果libevent安装时指定的目录,则带上参数 --with-libevent-prefix=/usr/lib64)
  make
  make install

5、安装成功图

# /usr/local/gearmand/bin/gearman

6、创建日志/home/data/gearmand/gearmand.log
  # touch /home/data/gearmand/gearmand.log
    
7、启动

  # /usr/local/gearmand/sbin/gearmand -d -u root -L 192.168.161.136 --log-file=/home/data/gearmand/gearmand.log
  

  查是否运行
  # ps axu | grep gearmand
    
  查看监听端口
  # netstat -anp | grep 4730  centos6

  # ss -anp | grep 4730  centos7

8、安装php扩展
  wget http://pecl.php.net/get/gearman-1.1.2.tgz
  tar -zxvf gearman-1.1.2.tgz
  cd gearman-1.1.2
  /usr/local/php/bin/phpize
  ./configure --with-php-config=/usr/local/php/bin/php-config --with-gearman=/usr/local/gearmand
  make
  make install
  安装成功后会显示gearman.so的路径,在php.ini文件中加入扩展

gearmand的安装的更多相关文章

  1. PHP 安装使用 gearman

    1.安装服务器端: 官方下载,请到https://launchpad.net/gearmand. yum install boost-devel* gperf* libevent-devel* lib ...

  2. 利用gearman同步mysql数据到redis

    一.Gearman 1.Gearman是一个分发任务的程序框架. 2.体系:a.client:发送一个jobb.server:找到合适的worker,把job交给该workerc.worker:处理j ...

  3. CentOSx64 安装 Gearmand 和 Gearman php扩展

    1.首先下载所需软件   wget https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz    wg ...

  4. centos6.5编译安装gearmand Job Server(C)

    1)下载安装包: wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz 2)安装编译器: yu ...

  5. gearmand安装过程

    51 cd boost_1_53_0 52 tail -f build_log 53 dir 54 cd gearmand-1.1.8 55 ./configure 56 could not find ...

  6. gearmand安装

    下载 https://github.com/gearman/gearmand/releases 解压,进入目录 sudo ./configure make sudo make install 问题1: ...

  7. gearman 安装

    yum install gperfyum install libevent-develyum install libuuid-develwget https://launchpad.net/gearm ...

  8. php安装gearman扩展实现异步分步式任务

    参考: 1.小喵爱你的博客 2.PHP Manual 依赖 1.gcc44 2.boost >=1.39 3.libevent 4.php5.3+ 5.update ld.so.conf 安装依 ...

  9. Gearman 安装使用教程

    Gearman是一个分发任务的程序框架,可以用在各种场合,Gearman更偏向于任务分发功能.它的任务分布非常简单,简单得可以只需要用脚本即可完成. Gearman 分布式任务实现原理上只用到2个字段 ...

随机推荐

  1. phpMyAdmin view_create.php 跨站脚本漏洞

    漏洞名称: phpMyAdmin view_create.php 跨站脚本漏洞 CNNVD编号: CNNVD-201307-066 发布时间: 2013-07-05 更新时间: 2013-07-05 ...

  2. 嵌入式设备web服务器比较

    目录(?)[-] Boa Thttpd Mini_httpd Shttpd Lighttpd Goahead AppWeb Apache 开发语言和开发工具 结论 备注   现在在嵌入式设备中所使用的 ...

  3. 数据结构(线段树):Educational Codeforces Round 6 620E. New Year Tree

    E. New Year Tree time limit per test 3 seconds memory limit per test 256 megabytes input standard in ...

  4. Implement Trie (Prefix Tree) ——LeetCode

    Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs ar ...

  5. zznu 1052 前n项和

    这算是循环的入门题目了,因为n 是小于 10 的非负数,所以可以知道结果不过超出int范围. 等式左边的数每次自增一个a,可以用一个变量来表示 na = na * 10 + a, 意思就是每循环一次就 ...

  6. typedef struct

    突然忘了这玩意儿了..今天就来搞一发 typedef是类型定义的意思.typedef struct 是为了使用这个结构体方便.具体区别在于:若struct node {}这样来定义结构体的话.在申请n ...

  7. Spark GraphX的函数源码分析及应用实例

    1. outerJoinVertices函数 首先给出源代码 override def outerJoinVertices[U: ClassTag, VD2: ClassTag] (other: RD ...

  8. pat 1062. Talent and Virtue (25)

    难得的一次ac 题目意思直接,方法就是对virtue talent得分进行判断其归属类型,用0 1 2 3 4 表示 不合格 sage noblemen foolmen foolmen 再对序列进行排 ...

  9. [Angular 2] Pipe Purity

    Explaining how Pipes only change by default when your Pipe input parameters change and not when your ...

  10. POJ 1470 Closest Common Ancestors(LCA&RMQ)

    题意比较费劲:输入看起来很麻烦.处理括号冒号的时候是用%1s就可以.还有就是注意它有根节点...Q次查询 在线st算法 /*************************************** ...