linux中配置jmeter环境变量,linux java 和jmeter 环境变量配置文件笔记(原)
我在EC2?亞馬遜的ubuntu系統下進行的配置,步驟如下(非常簡單)
1、在/usr/local下分別新建java和jmeter文件夾,把下載的包進行解壓
注:此處有坑,需注意ll -lht? 查看下載包的大小,包異常8k的話請重新下載。
下載指令
wget https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
下載地址需自行去官網復制,未同意官網協議,直接復制地址下載會有異常
注:文件名需要改名sudo mv jdk-8u191-linux-x64.tar.gz?AuthParam=1546155659_0d39590cd367d6bc72573064c2eb197c jdk-8u191-linux-x64.tar.gz
解壓指令? ? ? ? ? sudo tar -xvf jdk-8u191-linux-x64.tar.gz
2、進行配置文件
修改配置文件指令?sudo /etc/profile
配置文件信息如下:
#creat default,java/jmeter classpath、path *_home
export JAVA_HOME=/usr/local/java/jdk1.8.0_191
export JMETER_HOME=/usr/local/jmeter/apache-jmeter-5.0export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/tools.jar:$JMETER_HOME/lib/ext/ApacheJMeter_core.jar:$JMETER_HOME/lib/jorphan.jar:$JMETER_HOME/lib/logkit-2.0.jar:$CLASSPATH
export PATH=$PATH:$JAVA_HOME/bin:$JMETER_HOME/bin:$PATH:$HOME/bin
執行腳本指令source /etc/profile
source命令用法:source FileName
作用:在當前bash環境下讀取并執行FileName中的命令。
注:該命令通常用命令".”來替代。
3、輸入java -version查看jdk版本,
[ec2-user@jackzz~]$ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
4、輸入jmeter --version查看jmeter版本
[ec2-user@jackzz ~]$ jmeter
Dec 30, 2018 8:14:34 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
================================================================================
Don't use GUI mode for load testing !, only for Test creation and Test debugging.
For load testing, use NON GUI Mode:
jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
& increase Java Heap to meet your test requirements:
Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
Check : https://jmeter.apache.org/usermanual/best-practices.html
================================================================================
An error occurred:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
[ec2-user@jackzz ~]$ jmeter --version
_ ____ _ ____ _ _ _____ _ __ __ _____ _____ _____ ____
/ | _ / / ___| | | | ____| | | / | ____|_ _| ____| _
/ _ | |_) / _ | | | |_| | _| _ | | |/| | _| | | | _| | |_) |
/ ___ | __/ ___ |___| _ | |___ | |_| | | | | |___ | | | |___| _ <
/_/ \_\_| /_/ \_\____|_| |_|_____| \___/|_| |_|_____| |_| |_____|_| \_ 5.0 r1840935
Copyright (c) 1999-2018 The Apache Software Foundation
總結
以上是生活随笔為你收集整理的linux中配置jmeter环境变量,linux java 和jmeter 环境变量配置文件笔记(原)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux常用软件和安装方法,Linux
- 下一篇: linux禁止线程网络,linux –