YUM安装的版本太低了,不能满足需求,只能手动安装一个比较高的版本
安装EPEL源
-
wget
-
rpm -Uvh epel-release-5-4.noarch.rpm
安装boost141-devel和e2fsprogs
-
yum install boost141-devel
-
ln -s /usr/include/boost141/boost/ /usr/include/boost
-
export LDFLAGS="-L/usr/lib64/boost141"
-
export LD_LIBRARY_PATH=/usr/lib64/boost141:$LD_LIBRARY_PATH
-
yum install e2fsprogs-devel e2fsprogs
安装gcc44和g++44
-
yum install gcc44 gcc-c++
-
export CC=/usr/bin/gcc44
-
export CXX= /usr/bin/g++44
安装gearman
./configure --prefix=/usr/local/gearman --with-mysql=yes
创建作为持久化的mysql数据表
-
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
-
cd /usr/local/gearman/sbin
-
./gearmand --mysql-host=127.0.0.13306 --mysql-user=root --mysql-password=root --mysql-db=gearman --mysql-table=gearman_queue -q mysql -l /var/log/gearmand.log -d
阅读(1339) | 评论(0) | 转发(0) |