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

    
    #gearman服务的安装与使用
    #date:2017-11-29
    
    set -x
    set -e
    
    #安装开发依赖库
    yum install gcc gcc-c++  make automake  glibc libgomp libstdc++-devel boost-devel* libevent-devel* libuuid-devel gperf*  mysql-devel -y
    
    #下载安装gearman
    #官方下载,请到https://launchpad.net/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-*
    ./configure       #建议直接默认./configure,不要指定路径等
    make && make install
    
    
    
    #启动gearman
    /usr/local/sbin/gearmand --job-retries 10 --keepalive --protocol http --port 4730 --http-port 8080 --mysql-host xx.xx.xx.xx --mysql-port 3306 --mysql-user gearmand --mysql-password 123456 --mysql-db DB_Gearmand --mysql-table Tbl_GearmanQueue --log-file=/mnt/logs/gearman/gearmand.log --listen xx.xx.xx.xecho "end at `date`" 连接到mysql的数据信息 (数据库名和表名可以更改) CREATE DATABASE `DB_Gearman` /*!40100 DEFAULT CHARACTER SET utf8mb4 */
    use
    DB_Gearman
    
    CREATE TABLE `Tbl_Queue` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `unique_key` char(64) NOT NULL DEFAULT '',
    `function_name` char(255) NOT NULL DEFAULT '',
    `priority` int(11) NOT NULL DEFAULT '0',
    `data` longblob NOT NULL,
    `when_to_run` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    UNIQUE KEY `unique_key__function_name` (`unique_key`,`function_name`(128))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4


  • 相关阅读:
    BZOJ 1449: [JSOI2009]球队收益 最小费用最大流 网络流
    HDU 4348 To the moon 主席树 在线更新
    省选模拟赛20180416
    线性基总结
    Write-up-Bulldog2
    [Write-up]BSides-Vancouver
    Write-up-Bob_v1.0.1
    Genymotion设置代理至BurpSuite和Charles
    PE之RVA转FOA
    django的序列化
  • 原文地址:https://www.cnblogs.com/tianfen/p/7918814.html
Copyright © 2011-2022 走看看