Centos安装jmeter

在centos系统下安装jmeter的前提是先安装java的jdk,所以使用java -version查看centos系统是否安装了java

Centos安装jmeter

1、jmeter官网下载对应的包,上传到linus服务(可以使用WinSCP工具从windows系统上传到linux系统下)

2、解压:tar -zxvf apache-jmeter-5.1.1.tgz

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.

Centos安装jmeter

 解决:

参考:https://www.cnblogs.com/ycyzharry/p/11432698.html

个人操作中补充:

启动后,先点击右下角,查看端口号,看到是0.0

Centos安装jmeter

然后在putty设置:

先在session输入自己IP然后选择X11

Centos安装jmeter

 否则会出现错误:

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.

相关推荐