zoukankan      html  css  js  c++  java
  • memaslap的安装方法

    前言:

    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.lo
    In 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 directory
    make[1]: *** [libmemcached/libmemcached_libmemcached_la-allocators.lo] Error 1
    make[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 directory
    make[1]: *** [libmemcached/libmemcached_libmemcached_la-analyze.lo] Error 1
    In 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
    make[1]: *** [libmemcached/libmemcached_libmemcached_la-backtrace.lo] Error 1
    make[1]: *** [libmemcached/libmemcached_libmemcached_la-auto.lo] Error 1
    make[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

    安装完成!!

     

  • 相关阅读:
    firefox和ie下面的初始化checkbox
    全球宽带排名出炉 韩国第一中国未入榜(附表)
    逆向查询所有父栏目
    js的点点滴滴
    Treeview绑定数据源 层叠结构数据源的应用
    asp.net读取服务器端文件夹列表
    Treeview绑定数据源 层叠结构数据源的应用(续--完善篇)
    VC数据类型
    jQuery核心文档(翻译中)
    iscroll 下拉刷新,上拉加载
  • 原文地址:https://www.cnblogs.com/cenalulu/p/2998140.html
Copyright © 2011-2022 走看看