高进波博客:ubuntu 10.04下安装配置gearmand+mysql持久化队列

高进波博客:ubuntu 10.04下安装配置gearmand+mysql持久化队列

Author:gaojinbo
Time:2012-01-01
Email:admin@gaojinbo.com

ubuntu 10.04下安装配置gearman安装配置,gearman mysql持久化队列配置

官方网站
http://gearman.org/

 

一、安装配置
1.下载地址
wget http://launchpad.net/gearmand/trunk/0.25/+download/gearmand-0.25.tar.gz

 

2.安装依赖包
apt-get install uuid-dev libevent-dev libboost-all-dev libdrizzle-dev

 

3.编译安装gearmand

tar xvzf gearmand-0.25.tar.gz
cd gearmand-0.25
libdrizzle_CFLAGS="-I /usr/local/include/libdrizzle/" \
libdrizzle_LIBS="-L/usr/local/lib -ldrizzle"  ./configure
make
make install

 

 

4.建立数据库及表,用户密码

CREATE TABLE IF NOT EXISTS `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`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8;

 

5.#start gearmand job server

 

/usr/local/sbin/gearmand -d -u nobody -q libdrizzle \
--libdrizzle-host=127.0.0.1 --libdrizzle-user=root  \
--libdrizzle-password=gaojinbo.com --libdrizzle-db=gearman \
--libdrizzle-table=gearman_queue --libdrizzle-mysql \
--libdrizzle-port=3306 -vvv

 

配置完成!

原文:http://www.gaojinbo.com/ubuntu-10-04%E4%B8%8B%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AEgearmandmysql%E6%8C%81%E4%B9%85%E5%8C%96%E9%98%9F%E5%88%97.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注