首页 > 其他 > 详细

gearmand的安装

时间:2016-03-12 11:45:50      阅读:230      评论:0      收藏:0      [点我收藏+]

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的安装

原文:http://www.cnblogs.com/oo-oo/p/gearman_setup.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!