#gearman服务的安装与使用
#date:-- 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..tar.gz
cd gearmand-*
./configure #建议直接默认./configure,不要指定路径等
make && make install #启动gearman
/usr/local/sbin/gearmand --job-retries --keepalive --protocol http --port --http-port --mysql-host xx.xx.xx.xx --mysql-port --mysql-user gearmand
--mysql-password --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() unsigned NOT NULL AUTO_INCREMENT,
`unique_key` char() NOT NULL DEFAULT '',
`function_name` char() NOT NULL DEFAULT '',
`priority` int() NOT NULL DEFAULT '',
`data` longblob NOT NULL,
`when_to_run` int() unsigned NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `unique_key__function_name` (`unique_key`,`function_name`())
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

gearman的安装的更多相关文章

  1. gearman的安装和配置

    gearman作为并发任务管理服务,已经越来越多攻城狮在生产环境中使用了.为了日后方便部署到服务器,我写了一个shell. 一般服务器使用稳定的centos,我使用的是centos6.7. 安装she ...

  2. gearman的安装与使用

    Gearman是一个分发任务的程序框架,它会对作业进行排队自动分配到一系列机器上.gearman跨语言跨平台,很方便的实现异步后台任务.php官方收录:http://php.net/manual/zh ...

  3. mac机上搭建php56/nginx 1.8.x/thinkphp 3.2.x/gearman扩展/seaslog扩展/redis扩展环境

    php的各种扩展配置起来实在不容易,记录一下备忘: 一.php56 安装 虽然php7出来了,但是没用过,不知道有没有坑,这里仍然使用php5.6版本 1.1 安装php/php-pfm brew u ...

  4. 通过Gearman实现MySQL到Redis的数据同步

    对于变化频率非常快的数据来说,如果还选择传统的静态缓存方式(Memocached.File System等)展示数据,可能在缓存的存取上会有很大的开销,并不能很好的满足需要,而Redis这样基于内存的 ...

  5. 转:尝试用Gearman实现分布式处理(PHP)

    原文来自于http://blog.csdn.net/fdipzone/article/details/7166520 本文需要你已对Gearman有个大致了解. 顺便再推荐两篇参考文章http://h ...

  6. JAVA通过Gearman实现MySQL到Redis的数据同步(异步复制)

    MySQL到Redis数据复制方案 无论MySQL还是Redis,自身都带有数据同步的机制,像比较常用的 MySQL的Master/Slave模式 ,就是由Slave端分析Master的binlog来 ...

  7. 尝试用Gearman实现分布式处理(PHP)[转]

    本文需要你已对Gearman有个大致了解. 顺便再推荐两篇参考文章http://hi.baidu.com/thinkinginlamp/blog/item/ff49972b9e7378f3e6cd40 ...

  8. gearman 安装

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

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

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

随机推荐

  1. 并不对劲的p3676:小清新数据结构题

    题目大意 有一棵有\(n\)(\(n\leq 2*10^5\))个点的树,要进行\(q\)(\(q\leq 2*10^5\))次操作,每次操作是以下两种中的一种: 1.修改一个点的点权 2.指定一个点 ...

  2. springboot(十)SpringBoot消息中间件RabbitMQ

    github地址:https://github.com/showkawa/springBoot_2017/tree/master/spb-demo/spb-brian-query-service 1. ...

  3. C# 读写text 详细讲解

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     & ...

  4. python爬虫爬取腾讯招聘信息 (静态爬虫)

    环境: windows7,python3.4 代码:(亲测可正常执行) import requests from bs4 import BeautifulSoup from math import c ...

  5. Linux 虚拟机配置网络

  6. Java键盘输入的方法

    转载:http://blog.csdn.net/u012249177/article/details/49586383 java输入的方法: import java.io.BufferedReader ...

  7. [USACO 2012 Jan Silver] Delivery Route【拆点】

    传送门:http://www.usaco.org/index.php?page=viewproblem2&cpid=106 这道题还真是完全没思路,真的不知道怎么做,但是看了题解后恍然大悟. ...

  8. bitset优化背包问题

    https://blog.csdn.net/HowardEmily/article/details/77340566 留坑待填

  9. MyEclipse配置Tomcat

    1.在Window->Perferences->MyEclipse->Servers->Tomcat->Tomcat 7.x中启用Tomcat并配置Tomcat路径和JD ...

  10. jmeter(十)JMeter 命令行(非GUI)模式

    前文 讲述了JMeter分布式运行脚本,以更好的达到预设的性能测试(并发)场景.同时,在前文的第一章节中也提到了 JMeter 命令行(非GUI)模式,那么此文就继续前文,针对 JMeter 的命令行 ...