memaslap的安装方法
来源:互联网 发布:windows过期如何激活 编辑:程序博客网 时间:2024/04/24 08:46
前言:
memcache自带的memslap功能无法满足性能测试需要。google以后找到了更为强大的工具memaslap(没错就是多了一个“a”)。
具体功能见:http://docs.libmemcached.org/bin/memaslap.html
但是在安装过程中不断碰壁,于是将安装过程记录如下
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 directorymake[1]: *** [libmemcached/libmemcached_libmemcached_la-backtrace.lo] Error 1make[1]: *** [libmemcached/libmemcached_libmemcached_la-auto.lo] Error 1make[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的扩展包,详见:http://gearman.info/build/centos5-8.html
解决步骤引用如下:
wget http://mirrors.ustc.edu.cn/fedora/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
yum -y -q 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 -y -q install e2fsprogs-devel e2fsprogs
yum -y -q install gcc44 gcc44-c++
export CC="gcc44"
export CXX="g++44"
所有操作完成后,重新执行:
./configure --enable-memaslap && make && make install
安装完成!!
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- memaslap的安装方法
- memaslap安装
- memcached的压力测试工具memaslap安装
- centos7源码安装memaslap(libmemcached)——memcached benchmark testing tool
- NetBeans的安装方法
- mplayer 的安装方法
- MSDE的安装方法
- 安装VMwaretools的方法
- 安装openoffice的方法
- MSDE2000的安装方法
- Wine的安装方法
- RealPlayer的安装方法
- MSDE2000的安装方法
- jseclipse的安装方法
- AjaxControlToolkit的安装方法
- 安装EDLK的方法
- 安装sqlserver2000的方法
- Eclipse的安装方法
- 什么是ACPI,什么是APIC
- Java23种设计模式
- Opencv中cvSobel函数使用
- 网站导航——网站地图和TreeView的使用
- epoll讲解--转自”知乎"
- memaslap的安装方法
- 线程池
- 给按钮加上小盾牌
- fedora10安装libpcap
- 安装gcc 4.8以支持C++ 0x11
- 【OpenCV】访问图像中每个像素的值
- linux内核学习 进程表示
- ----------------------------------------------------------------------------------------------------
- 一个简单的sniffer抓包程序