memaslap的安装方法
前言:
memcache自带的memslap功能无法满足性能测试需要。google以后找到了更为强大的工具memaslap(没错就是多了一个“a”)。
具体功能见:
但是在安装过程中不断碰壁,于是将安装过程记录如下
Step1:下载安装包
memaslap是 libmemcached的一个组件,因此需要编译安装。首先需要下载libmemcached。
下载地址:https://launchpad.net/libmemcached/+download
Step2:解压编译
./configure –enable-memaslap
make (这个时候问题来了,美国空间,遇到以下报错)
报错信息
In file included from ./libmemcached/common.h:92,from libmemcached/allocators.cc:38:./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory CXX libmemcached/libmemcached_libmemcached_la-backtrace.loIn file included from ./libmemcached/common.h:92,from libmemcached/analyze.cc:1:./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directorymake[1]: *** [libmemcached/libmemcached_libmemcached_la-allocators.lo] Error 1make[1]: *** Waiting for unfinished jobs….In file included from ./libmemcached/common.h:92,from libmemcached/auto.cc:38:./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directorymake[1]: *** [libmemcached/libmemcached_libmemcached_la-analyze.lo] Error 1In file included from ./libmemcached/common.h:92,from libmemcached/backtrace.cc:38:./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory[1]: Leaving directory `/home/rack/ben/libmemcache/libmemcached-1.0.13’make: *** [all] Error 2
关键信息:error: tr1/cinttypes: No such file or directory
报错原因:libmemcached需要 gcc 4.2 以上版本才可编译,而centos 5.4 的gcc版本只有4.1 ,香港虚拟主机,详见:https://bugs.launchpad.net/libmemcached/+bug/1076181
解决方法:安装gcc44的扩展包,详见:
解决步骤引用如下:
wget rpm -ivh epel-release-5-4.noarch.rpmyum -y -q install boost141-develln -s /usr/include/boost141/boost/ /usr/include/boostexport LDFLAGS=”-L/usr/lib64/boost141″export LD_LIBRARY_PATH=/usr/lib64/boost141:$LD_LIBRARY_PATHyum -y -q install e2fsprogs-devel e2fsprogsyum -y -q install gcc44 gcc44-c++export CC=”gcc44″export CXX=”g++44″
所有操作完成后,重新执行:
./configure –enable-memaslap && make && make install
安装完成!!
posted on
,服务器空间要知道,当你一直在担心错过了什么的时候,