精华内容
下载资源
问答
  • Gearman

    2015-11-20 07:43:00
    Gearman

    Gearman

    展开全文
  • gearman

    2017-05-09 11:29:00
    http://gearman.org https://launchpad.net/gearmand 下载最新的版本 gearmand-X.Y.tar.gz 把gearmand-1.1.12.tar.gz放到 /root/tools 下面去 yum install -y boost boost-devel gperf libevent...

    任务队列

    安装配置
    http://gearman.org 
     
     
    https://launchpad.net/gearmand 下载最新的版本 gearmand-X.Y.tar.gz
     
     
    把gearmand-1.1.12.tar.gz放到 /root/tools 下面去
    yum install -y boost  boost-devel gperf libevent-devel libuuid-devel
    (yum install boost*  boost-devel* gperf* libevent-devel* libuuid-devel*)
     
     
    cd /root/tools
    tar xzf gearmand-X.Y.tar.gz
    cd gearmand-X.Y
     
    find / -name 'mysql_config '  #(如果没有mysql就要安装mysql (yum install mysql mysql-server  mysql-devel),找到mysql_config具体的路径对应下面的内容要修改)
     
    ./configure  --with-mysql=/usr/bin/mysql_config 
     
    make
    make install
     
     
     
     
     
     
    遇到问题:
    错误提示:
    error: could not find boost
    解决方法:
    yum install -y boost boost-devel
     
     
    错误提示:
    could not find gperf
    解决方法:
    yum install -y gperf
     
     
    因为默认的命令yum install boost  boost-devel 安装到的只是 旧版本,可能是与操作系统默认的资源库有关,
    所以需要手动安装最新版的boost  
     
    yum install gcc-c++
     
     
     
    ###boost文件太大,不建议下载更新.
    wget http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.zip/download
    unzip boost_1_60_0.zip
    cd boost_1_60_0
    ./bootstrap.sh --prefix=/usr/local/boost/ 
    ./b2 install
     
     
     
     
    greaman的PHP扩充  : 到 http://pecl.php.net/package/gearman下载最新版
     
    cd /root/tools
     
     
     
    wget http://pecl.php.net/get/gearman-1.1.2.tgz
     
    tar -zxvf gearman-X.Y.tgz
    cd gearman-X.Y
    phpize
    ./configure
    make
    make install
     
     
     
    如果有错误: configure: error: Please install libgearman
    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/libgearman-devel-1.1.8-2.el6.x86_64.rpm
     
    yum install libgearman-devel.i686 libgearman.i686 后,此问题解决
     
     
    如果出现错误:libgearman version 0.21 or later required,说明libgearman版本过低,libgearman所有版本地址:
    http://fr2.rpmfind.net/linux/rpm2html/search.php?query=libgearman-devel&system=&arch=
    rpm包地址:http://dl.fedoraproject.org/pub/epel/6/x86_64/
    如果仍然出错,可考虑换一个低版本的gearman: wget http://pecl.php.net/get/gearman-0.8.0.tgz
     
     
     
     
     
    在 /usr/lib64/php/modules/ 会生成文件gearman.so
     
    vi /etc/php.ini
     
    在最后增加一句
    extension="gearman.so"
     
     
    重启nginx
    service nginx restart
    service php-fpm restart
     
     
    启动gearman
    gearmand -d
     
     
    gearman增加mysql的支持
    创建数据库和表
    create database gearman;
    create table `gearman_queue` (
    `unique_key` varchar(64) NOT NULL,
    `function_name` varchar(255) NOT NULL,
    `priority` int(11) NOT NULL,
    `data` LONGBLOB NOT NULL,
    `when_to_run` INT, PRIMARY KEY  (`unique_key`)
    );
     
     
     
    gearmand -q MySQL --mysql-host=localhost --mysql-user=root --mysql-password=123456 --mysql-db=gearman --mysql-table=gearman_queue  -d
     
    php /root/gearman/GearmanWorker.php -d
     
    gearmand -p 4730 -L 0.0.0.0 --log-file=/tmp/gearmand-4730.log --pid-file=/tmp/gearmand-4730.pid -q MySQL --mysql-host=localhost --mysql-user=root --mysql-password --mysql-db=gearman 
     
     
     
    创建一个后台job
    gearman -f testqueue -b xx00
     
    查看队列
    select * from gearman.gearman_queue
     
    执行队列中的job
    gearman -f testqueue -w
     
    查看队列
    select * from gearman.gearman_queue  //这条job删除掉了
     
     
     
    http://www.cppblog.com/guojingjia2006/archive/2013/01/07/197076.html
     
    http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/
     
    http://www.tuicool.com/articles/mInQvm
     
    http://blog.csdn.net/e421083458/article/details/21283113   
                                                                                                                                                                                                                                                                                                                            

     

    转载于:https://www.cnblogs.com/kinmos/p/6829765.html

    展开全文
  • gearman下载gearman下载

    2011-05-23 03:46:54
    gearman下载gearman下载gearman下载gearman下载gearman下载
  • Gearman support

    2020-12-02 10:46:25
    <div><p>I have implemented gearman support for raven sentry client. For more information what gearman is, and what is does please refer to http://gearman.org/.</p> <p>This pull request includes: - ...
  • Gearman Support

    2020-11-22 03:19:26
    <div><p>I suggest to add full gearman support to the fuelphp core. <p>"Gearman is a generic application framework for farming out work to multiple machines or processes. It allows applications to ...
  • Gearman中文手册,gearman手册chm,Gearman中文详解,分享gearman技术心得,主要是为了分享技术,所以不要大家的资源分。
  • gearman安装apt-get install gearman gearman-server libgearman-dev配置bindip/etc/defalut/gearman-job-serverPARAMS="--listen=0.0.0.0"/etc/init.d/gearman-job-server start/etc/init.d/gearman-job-server ...

    9291e9ba91aa6c011dfb0b04d9ed9e6b.png

    gearman安装

    apt-get install gearman gearman-server libgearman-dev

    配置bindip

    /etc/defalut/gearman-job-server

    PARAMS="--listen=0.0.0.0"

    /etc/init.d/gearman-job-server start

    /etc/init.d/gearman-job-server status

    * gearmand is running

    mysql_config无就安装下面的

    apt-get install libmysqld-dev libmysqlclient-dev

    mysql 查找plugin目录:

    show variables like '%plugin%';

    编译安装 udf

    CPPFLAGS=" -Werror -Wno-unused-but-set-variable" ./configure --with-mysql=/usr/bin/mysql_config --libdir=/usr/lib/mysql/plugin

    make install

    Libraries have been installed in:

    /usr/lib/mysql/plugin

    If you ever happen to want to link against installed libraries

    in a given directory, LIBDIR, you must either use libtool, and

    specify the full pathname of the library, or use the `-LLIBDIR'

    flag during linking and do at least one of the following:

    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable

    during execution

    - add LIBDIR to the `LD_RUN_PATH' environment variable

    during linking

    - use the `-Wl,-rpath -Wl,LIBDIR' linker flag

    - have your system administrator add LIBDIR to `/etc/ld.so.conf'

    安装函数UDF

    CREATE FUNCTION gman_do RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    CREATE FUNCTION gman_do_high RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    CREATE FUNCTION gman_do_low RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    CREATE FUNCTION gman_do_background RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    CREATE FUNCTION gman_do_high_background RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    CREATE FUNCTION gman_do_low_background RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    CREATE AGGREGATE FUNCTION gman_sum RETURNS INTEGER

    SONAME "libgearman_mysql_udf.so";

    CREATE FUNCTION gman_servers_set RETURNS STRING

    SONAME "libgearman_mysql_udf.so";

    配置GearmanIP

    SELECT gman_servers_set('127.0.0.1:4730');

    CREATE FUNCTION json_array RETURNS STRING SONAME 'lib_mysqludf_json.so';

    select * from mysql.func;

    mysql> select * from mysql.func;

    +--------------+-----+----------------------+----------+

    | name | ret | dl | type |

    +--------------+-----+----------------------+----------+

    | json_array | 0 | lib_mysqludf_json.so | function |

    | json_members | 0 | lib_mysqludf_json.so | function |

    | json_values | 0 | lib_mysqludf_json.so | function |

    +--------------+-----+----------------------+----------+

    DROP FUNCTION json_array;

    查看gearman队列

    watch -n 1 "(echo status; sleep 0.1) | nc 127.0.0.1 4730"

    展开全文
  • Gearman Implementation

    2021-01-12 08:21:58
    <div><p>Is there something like that? When I can stub automatically gearman responses?</p><p>该提问来源于开源项目:vcr/vcr</p></div>
  • Gearman extension

    2020-11-27 01:56:52
    about: Gearman extension labels: enhancement <p>Related issue: #116 <h3>Description <p>This PR adds a possibility to isntall gearman extension <p>In case this PR introduced TypeScript/JavaScript ...
  • 一、安装gearman1、下载最新的gearman宝wget --no-check-certificate https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz2、解压gearmand包tar -zxvf ./gearmand-1.1.12.tar.gz3、安装...

    一、安装gearman

    1、下载最新的gearman宝

    wget --no-check-certificate https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz

    2、解压gearmand包

    tar -zxvf ./gearmand-1.1.12.tar.gz

    3、安装gearman

    cd ./gearmand-1.1.12.tar.gz

    ./configure

    make &&make install

    二、安装lib_mysqludf_json

    wget https://launchpad.net/gearman-mysql-udf/trunk/0.6/+download/gearman-mysql-udf-0.6.tar.gz

    tar xf gearman-mysql-udf-0.6.tar.gz -C ./

    cd gearman-mysql-udf-0.6

    ./configure --with-mysql=/usr/bin/mysql_config --libdir=/usr/lib64/mysql/plugin/

    make && make install

    三、安装gearman-mysql-udf

    wget https://launchpad.net/gearman-mysql-udf/trunk/0.6/+download/gearman-mysql-udf-0.6.tar.gz

    tar xf gearman-mysql-udf-0.6.tar.gz -C ./

    cd gearman-mysql-udf-0.6

    ./configure --with-mysql=/usr/bin/mysql_config --libdir=/usr/lib64/mysql/plugin/

    make && make install

    展开全文
  • gearman安装apt-get install gearman gearman-server libgearman-dev配置bindip/etc/defalut/gearman-job-serverPARAMS="--listen=0.0.0.0"/etc/init.d/gearman-job-server start/etc/init.d/gearman-job-server ...
  • import java.util.concurrent....import org.gearman.client.GearmanClient;import org.gearman.client.GearmanClientImpl;import org.gearman.client.GearmanJob;import org.gearman.client.Gearma...
  • gearman 创建Mysql持久化队列的方式如下:1. 登入mysql命令行,运行:create database gearman;2. 启动gearman,命令如下:/usr/local/gearman/sbin/gearmand -p 4730 -L 0.0.0.0 --log-file=/tmp/gearmand-4730.log...
  • gearman安装

    2018-11-30 15:38:02
    #gearman服务 Gearman 任务分发程序; Gearman client: 请求的发起者 Gearman job server: gearman worker的调度者,不处理业务逻辑 Gearman worker: 提供worker API给应用程序调用,复制客户端请求,处理结果返回...
  • Gearman PHP Extension

    2018-08-09 17:51:58
    Gearman是一个分发任务的程序框架,可以用在各种场合,与Hadoop相比,Gearman更偏向于任务分发功能。它的 任务分布非常 简单,简单得可以只需要用脚本即可完成。Gearman最初用于LiveJournal的图片resize功能,由于...
  • 最近的一个旧项目重构过程中,使用到了gearman这个开源项目,简单来讲,这是一个类似MQ的异步系统,一边派发任务,一边处理任务(有类似MQ中的消息发送方与接收方),目前支持java,php等多种语言,缺点是存在单点问题...
  • Gearman 的安装和使用介绍Gearman是一个用来把工作委派给其他机器、分布式的调用更适合做某项工作的机器、并发的做某项工作在多个调用间做负载均衡、或用来在调用其它语言的函数的系统。Gearman提供了一种通用的程序...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,685
精华内容 674
关键字:

gearman