Gearman框架的研究(二)

                                                                             GearmanLinux上环境搭建以及注意事项

本文只陈述gearman框架的搭建过程,相关的知识点可以去http://gearman.org

  

<!--[if !supportLists]-->1.  Linux版本以及Gearman版本

分别在Centos 6.3Ubuntu12.04上部署Gearman环境,Gearman此处下载的为gearmand-1.1.6.tar.gz版本

<!--[if !supportLists]-->2.    <!--[endif]-->安装步骤:

(1).sudo apt-get install gearman-job-server        //Ubuntu12.04

yum install gearmand-server                   //Centos

通过apt-get的方式肯能比较费时间,并且安装的不是最新版本的

也可以下载下来tar包直接进行安装

tar xzf gearmand-X.Y.tar.gz
cd gearmand-X.Y
./configure
Make
make install

(2).安装过程可能遇到的问题

could not find toolset name:

需要安装gcc-c++yum install gcc-c++

cannot find Boost headers version >= 1.39.0 需要安装boost-devel-1.41.0

yum install boost-devel-1.41.0

yum install libevent-devel

(ubuntu解决方法为:

sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent)

 

 

make的时候报的-std=c99错误:

gedit Makefile   //2053行处加上 –std=c99

<!--[if !supportLists]-->3.    <!--[endif]-->(1).启动Gearman

geramand d

(2). 启动过程可能遇到的问题

启动过程中会报找不到日志文件的错误:

can not find /usr/local/var/log/gearman.log

解决方法:

建立相应的文件目录:sudo mkdir /usr/local/var/log

并将此文件的权限设为777sudo chmod 777 –R /usr/local/var/log/

 

猜你喜欢

转载自prettyzhou.iteye.com/blog/1853546