gearman的使用

一、编译

1.1、依赖库

gperf libevent libuuid boost

1.2、boost编译

./b2 --build-dir=./build --with-program_options

1.3、gearman编译

在.bashrc中添加一行

export BOOST_ROOT=.../boost_1_58_0

./configure --prefix=/usr/local/gearman --with-boost-program-options=boost_program_options

或者无需export BOOST_ROOT直接

./configure --prefix=/usr/local/gearman --with-boost=no --with-boost-program-options=boost_program_options

但是,下面两个make的时候依然需要

ln -s .../boost_1_58_0/boost /usr/include/boost

ln -s .../boost_1_58_0/lib/libboost_program_options.so /usr/lib/libboost_program_options.so

make

sudo make install

原文地址:https://www.cnblogs.com/summerwinter/p/4478489.html