标签:mic 点击 参考 blog zha his localhost pat oracle
因为jmeter是在java环境下运行的,所以要先安装java环境
一、安装java环境
1、先官网下载(需要注册oracle)
如下,点击对应的版本进行下载
2、上传至linus系统
3、解压:tar -zxvf jdk-8u241-linux-x64.tar.gz
4、配置环境变量
(1)vim /etc/profile
export JAVA_HOME=/root/java/jdk1.8.0_241 (路径和版本不能错,要和自己的一致)
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
(2)按ESC,输入:wq
5、source /etc/profile 使环境变量配置生效
6、检查:输入java -v 和javac
二、安装jmeter
1、官网下载对应的包,上传到linus服务
2、解压
3、配置环境变量
export JMETER_HOME=/usr/local/apache-jmeter-5.1.1/ (同样的,注意自己的路径和版本)
export CLASSPATH=$JMETER_HOME/lib/ext/ApacheJMeter_core.jar:$JMETER_HOME/lib/jorphan.jar:$JMETER_HOME/lib/logkit-2.0.jar:$CLASSPATH
export PATH=$JMETER_HOME/bin:$PATH:$HOME/bin
4、source /etc/profile 使环境变量配置生效
5、检查:输入jmeter -v
6、使用jmeter GUI模式
直接敲jmeter,出现如下错误提示:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
解决:
参考:https://www.cnblogs.com/ycyzharry/p/11432698.html
个人操作中补充:
启动后,先点击右下角,查看端口号,看到是0.0
然后在putty设置:
先在session输入自己IP然后选择X11
否则会出现错误:
PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connect ion refused
An error occurred: Can‘t connect to X11 window server using
‘localhost:10.0‘ as
the value of
the DISPLAY variable.
标签:mic 点击 参考 blog zha his localhost pat oracle
原文地址:https://www.cnblogs.com/yxgogoing/p/12487965.html