在Linux上安装Gearman及配置使用Gearman的PHP扩展环境。
先介绍安装 Gearman 。
1. 先安装依赖库
# yum install -y boost-devel gperf libevent-devel libuuid-devel
2. 下载 Gearman
下载:
# wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
解压:
# tar -xzvf gearmand-1.1.12.tar.gz
3. 配置 Gearman
# cd gearmand-1.1.12
# pwd
/data/gearmand-1.1.12
# ./configure
...
checking for boostlib >= 1.39... configure: We could not detect the boost libraries (version 1.39 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
configure: error: could not find boost
如果出现上面错误,先检查当前安装的Boost版本是否 >= 1.39,如果版本低,就需要安装高版本的Boost。
如果已经安装了Boost,就先卸载再安装;如果版本 >= 1.39,也出现上面错误,也卸载再安装。
安装Boost:
# yum install boost
# yum install boost-devel
# yum install boost-doc
再执行配置:
# ./configure
4. 编译 Gearman
# pwd
/data/gearmand-1.1.12
# make
...
CXX util/gearmand_hostile_gearmand-daemon.o
CXX util/gearmand_hostile_gearmand-pidfile.o
CXX
先介绍安装 Gearman 。
1. 先安装依赖库
# yum install -y boost-devel gperf libevent-devel libuuid-devel
2. 下载 Gearman
下载:
# wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
解压:
# tar -xzvf gearmand-1.1.12.tar.gz
3. 配置 Gearman
# cd gearmand-1.1.12
# pwd
/data/gearmand-1.1.12
# ./configure
...
checking for boostlib >= 1.39... configure: We could not detect the boost libraries (version 1.39 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
configure: error: could not find boost
如果出现上面错误,先检查当前安装的Boost版本是否 >= 1.39,如果版本低,就需要安装高版本的Boost。
如果已经安装了Boost,就先卸载再安装;如果版本 >= 1.39,也出现上面错误,也卸载再安装。
安装Boost:
# yum install boost
# yum install boost-devel
# yum install boost-doc
再执行配置:
# ./configure
4. 编译 Gearman
# pwd
/data/gearmand-1.1.12
# make
...
CXX util/gearmand_hostile_gearmand-daemon.o
CXX util/gearmand_hostile_gearmand-pidfile.o
CXX