zoukankan      html  css  js  c++  java
  • gearmand的安装

    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文件中加入扩展

  • 相关阅读:
    windows10更新导致中文乱码
    优化国际网站从一分钟到4~6秒
    修改elementUI组件自带的提示文字并支持国际化
    Python钉钉报警及Zabbix集成钉钉报警
    Go热门开源项目大全
    CentOS7基于ss5搭建Socks5代理服务器
    sass map !default 属性覆盖
    Linux下mv命令高级用法
    设置与查看Linux系统中的环境变量
    Linux下more命令高级用法
  • 原文地址:https://www.cnblogs.com/oo-oo/p/gearman_setup.html
Copyright © 2011-2022 走看看