1、安裝JDK
創(chuàng)新互聯(lián)建站專(zhuān)業(yè)為企業(yè)提供港閘網(wǎng)站建設(shè)、港閘做網(wǎng)站、港閘網(wǎng)站設(shè)計(jì)、港閘網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、港閘企業(yè)網(wǎng)站模板建站服務(wù),10年港閘做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。
#wget http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
#tar zxf jdk-8u111-linux-x64.tar.gz -C /usr/local/
#vim /etc/profile //新建JAVA環(huán)境變量
export JAVA_HOME=/usr/local/jdk
export JRE_HOME=/usr/local/jdk/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=./:/usr/local/jdk/lib:/usr/local/jdk/jre/lib
保存退出!
#source /etc/profile //使新加JAVA環(huán)境變量立即生效
#java -version //測(cè)試JAVA是否安裝成功
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
2、下載apache-jmeter
#wget http://apache.fayea.com//jmeter/binaries/apache-jmeter-3.0.tgz
#tar zxf apache-jmeter-3.0.tgz -C /data/
#vim /etc/profile //把jmeter加入環(huán)境變量
export JMETER=/data/jmeter
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 //測(cè)試jmeter是否可以使用
Writing log file to: /data/jmeter.log
_ ____ _ ____ _ _ _____ _ __ __ _____ _____ _____ ____
/ \ | _ \ / \ / ___| | | | ____| | | \/ | ____|_ _| ____| _ \
/ _ \ | |_) / _ \| | | |_| | _| _ | | |\/| | _| | | | _| | |_) |
/ ___ \| __/ ___ \ |___| _ | |___ | |_| | | | | |___ | | | |___| _ <
/_/ \_\_| /_/ \_\____|_| |_|_____| \___/|_| |_|_____| |_| |_____|_| \_\ 3.0 r1743807
Copyright (c) 1999-2016 The Apache Software Foundation
到這里表示成功了!
可以開(kāi)始使用jmeter對(duì)tomcat進(jìn)行壓力測(cè)試了!