[AMQP] QPID安装与测试

安装依赖项

apache qpidc安装:

必须安装:

* boost      <http://www.boost.org>                              (1.35)(*)
* e2fsprogs <http://e2fsprogs.sourceforge.net/>      (1.39)
* pkgconfig <http://pkgconfig.freedesktop.org/wiki/> (0.21)

可选:

集群特性依赖:
* openais <http://openais.org/>            (0.80.3)

XML依赖:
* xqilla <http://xqilla.sourceforge.net/HomePage>     (2.0.0)                                 
* xerces-c <http://xerces.apache.org/xerces-c/>        (2.7.0)

SSL 支持依赖:
* nss <http://www.mozilla.org/projects/security/pki/nss/>
* nspr <http://www.mozilla.org/projects/nspr/>

基础依赖:
* gcc     <http://gcc.gnu.org/>               (3.4.6)

* GNU make   <http://www.gnu.org/software/make/>      (3.8.0)
* autoconf   <http://www.gnu.org/software/autoconf/> (2.61)
* automake   <http://www.gnu.org/software/automake/> (1.9.6)
* help2man   <http://www.gnu.org/software/help2man/> (1.36.4)
* libtool    <http://www.gnu.org/software/libtool/>   (1.5.22)
* doxygen    <ftp://ftp.stack.nl/pub/users/dimitri/> (1.5.1)
* graphviz   <http://www.graphviz.org/>               (2.12)
* ruby 1.8   <http://www.ruby-lang.org>               (1.8.4)


安装中遇到的问题:


    0./usr/local/xuguang/software/qpid-0.14/cpp  ./configure 前提是修改一下目录到你自己的安装目录(in MakeFile)

    1.依赖项 C 编译库 yum install gcc*

    2.checking for "/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perl.h"... yes
      configure: error: Missing ruby installation (try "yum install ruby").

    3.install yum install boost 版本要在1.47以上
                 boost-1.33.1-15.el5--generate error
 checking boost/shared_ptr.hpp usability... no
 checking boost/shared_ptr.hpp presence... no
 checking for boost/shared_ptr.hpp... no
 configure: error: Missing required header files.
 :hfqaqpidsvr02:root > rpm -qa|grep boost


    4 Install boost

     

      $cd /usr/include
      $ln -s /usr/local/xuguang/software/boost_1_48_0/boost boost

       Issue1 for the boost头文件问题 Fix-result

checking boost/shared_ptr.hpp usability... yes
checking boost/shared_ptr.hpp presence... yes
checking for boost/shared_ptr.hpp... yes

Issue2 for UUID/uuid.h--reference  http://www.cnblogs.com/jiamei/

checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
configure: error: Missing required header files.
tar xvzf  e2fsprogs-1.41.14.tar.gz  
进入e2fsprogs-1.41.14目录后执行 
/configure  --prefix=/usr/local/e2fsprogs 
make  make install  
    然后把uuid目录拷过去  cp -r lib/uuid/    /usr/include

    

qpid/log/Logger.cpp:26:43: error: boost/pool/detail/singleton.hpp: No such file or directory
qpid/log/Logger.cpp: In static member function 'static qpid::log::Logger& qpid::log::Logger::instance()':
qpid/log/Logger.cpp:48: error: 'boost::details::pool' has not been declared
qpid/log/Logger.cpp:48: error: expected primary-expression before '>' token
qpid/log/Logger.cpp:48: error: '::instance' has not been declared
make[3]: *** [qpid/log/Logger.lo] Error 1
make[3]: Leaving directory `/usr/local/xuguang/software/qpid-0.14/cpp/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/xuguang/software/qpid-0.14/cpp/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/xuguang/software/qpid-0.14/cpp/src'
make: *** [all-recursive] Error 1

Fix-method
:hfqaqpidsvr01:root > cp /usr/local/xuguang/software/qpid-0.14/cpp/boost/pool/detail/singleton.hpp /usr/include/boost/pool/detail/ -r

/usr/include/boost/lexical_cast.hpp:1184: warning: ISO C++ does not support the '%lg' printf format
make[3]: *** [qpid/types/Variant.lo] Error 1
make[3]: Leaving directory `/usr/local/xuguang/software/qpid-0.14/cpp/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/xuguang/software/qpid-0.14/cpp/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/xuguang/software/qpid-0.14/cpp/src'
make: *** [all-recursive] Error 1

Fix-method-rootcause boost库没有完全安装好
重新安装依赖项
http://hi.baidu.com/%CC%D8%B0%AE%C0%B6%C1%AB%BB%A8/blog/item/74303121fc436782033bf6de.html

yum install boost-devel e2fsprogs-devel pkgconfig gcc-c++ make autoconf automake ruby libtool help2man doxygen graphviz -y

或者 yum install boost-devel e2fsprogs-devel pkgconfig gcc-c++  autoconf automake ruby libtool help2man doxygen graphviz -y(可以fix yum安装的问题)

yum install openais-devel cman-devel cyrus-sasl-devel nss-devel nspr-devel xqilla-devel xerces-c-devel ruby-devel swig -y


启动:

:wdhfmsg002:root > qpidd
2012-05-24 06:16:26 critical Unexpected error: Can't bind to port 0.0.0.0:5672: Address already in use (qpid/sys/posix/Socket.cpp:205)

更换启动的方式,由于端口被占用 换成 其他的端口,同时用 -d 后台运行的方式

1.qpidd -p 5673 -d

[AMQP] QPID安装与测试_第1张图片


Cluster 配置与安装


 1. install corosync-1.4.2
 2. change the config  /etc/ais/openais.conf  /etc/corosync.conf  bindnetaddr
 3. 重新编译 qpidd ,首先开始 ./configure  --with-cpg --with-libcman  然后开始 make install

Run command

/usr/local/xuguang/software/qpid-0.14/cpp/src/.libs/lt-qpidd --data-dir /usr/local/qpid/data_2/ --log-enable info+ --log-to-file /usr/local/qpid/qpidd_2.log -d --auth 0 -p 5673 --enable-timestamp yes --cluster-name='HFQA_one



性能测试

Testenv:

Broker:Number 1 run on VM 2 cpu 8G memory

 

Sender../map_sender -T 100 -N 100 -U 10.224.57.128:5673  (100 thread eachthread send 100 times To the broker)

 

Receive./map_receiver 10.224.57.128:5673 > receive.result(each message I have addthe timestamp)

 

 

TestResult

1.Sender 10000 message cost Time cost is5598.691895 ms  so we can define the Send Request 1785 request/s 


2. Receivereceive 10000 messages cost Time.will be nearly 500request/s

3  Broker CPU/Memory

 

CPU:We can get the CPU high level when allthread send the message on the Broker ,when the message send done ,it will down

 

Memory.All message will be keep on Queue ,after the receive have receive done

 

[AMQP] QPID安装与测试_第2张图片


你可能感兴趣的:(thread,header,gcc,Ruby,makefile,Graphviz)