Jmeter 测试 RabbirMQ 性能

一、安装JDK:
  1、查看JDK信息:
    [root@localhost ~]#  rpm -qa | grep java
    javapackages-tools-3.4.1-6.el7_0.noarch
    tzdata-java-2014i-1.el7.noarch
    java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
    java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64
    python-javapackages-3.4.1-6.el7_0.noarch


    卸载OpenJDK,执行以下操作:
    [root@localhost ~]# rpm -e --nodeps tzdata-java-2014i-1.el7.noarch
    [root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
    [root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64


  2、下载JDK:
    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


    向文件里面追加以下内容:
    export JAVA_HOME=/opt/jdk1.8.0_25
    export JRE_HOME=$JAVA_HOME/jre
    export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    export JAVA_HOME JRE_HOME PATH CLASSPATH


    使修改生效
    [root@localhost ~]# source /etc/profile   //使修改立即生效
    [root@localhost ~]#        echo $PATH   //查看PATH值


  3、安装ant编译工具。




二、安装jmeter 
  1、安装&配置
    可在Linux服务器上利用服务器强大的性能,执行JMeter进行性能测试。
    当然,可在Windows机器上先编好测试计划(注意版本匹配,否则可能产生莫名错误),
    然后下载到Linux上运行。  以JMeter2.9为例,下载地址:
    http://jmeter.apache.org/download_jmeter.cgi,选择binaries下2.9版本。
    解压完成后,添加环境变量:
    vi /etc/profile
    键入i,可编辑状态,按ESC,退出可编辑状态到命令行,键入“:wq”,按回车保存并退出vi
    添加下述两行:
    export JMETER=/usr/local/jmeter/apache-jmeter-2.9

    export  CLASSPATH=${JMETER}/lib/ext/ApacheJMeter_core.jar:${JMETER}/lib/jorphan.jar:$JMETER/lib/logkit-2.0.jar:${CLASSPATH} 

    export PATH=${JMETER}/bin/:${PATH}

    完成添加后下述命令使配置生效:
    source /etc/profile
    检查是否配置成功:
    命令行输入jmeter -v
    显示版本号则安装成功


  2、下载插件JMeter-Rabbit-AMQP:
    https://github.com/lykm02/JMeter-Rabbit-AMQP


    按照README.md 文档步骤进行初始化。
    JMeter-Rabbit-AMQP


======================


A JMeter plugin to publish & consume messages from RabbitMQ or any AMQP message broker.


JMeter Runtime Dependencies


Prior to building or installing this JMeter plugin, ensure that the RabbitMQ client library (amqp-client-3.x.x.jar) is installed in JMeter's lib/ directory.


Build Dependencies


Build dependencies are managed by Ivy. JARs should automagically be downloaded by Ivy as part of the build process.


In addition, you'll need to copy or symlink the following from JMeter's lib/ext directory:


ApacheJMeter_core.jar
Building


The project is built using Ant. To execute the build script, just execute: ant


Installing


To install the plugin, build the project and copy the generated JMeterAMQP.jar file from target/dist to JMeter's lib/ext/ directory.


==========================


三、安装RabbitMQ:
  su -c 'rpm -Uvh https://mirrors.ustc.edu.cn/epel/epel-release-latest-7.noarch.rpm'

  文章地址:https://www.cnblogs.com/uptothesky/p/6094357.html




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章