Rocky Linux 9.4 安装 JMeter

作者: 温新

分类: 【Linux】

阅读: 1133

时间: 2024-07-12 16:57:14

Apache JMeter 是一个开源的负载测试工具,可以用于测试静态和动态资源,确定服务器的性能和稳定性。

由于 JMeter 使用 Java 开发的,运行 JMeter 需要 Java 环境,因此,请却确保电脑安装了 Java 环境。

$ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Uos-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Uos-1deb10u2, mixed mode, sharing)

安装 JMeter

1、下载 JMeter
$ cd /usr/local/src
$ sudo wget https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.3.tgz
2、解安装
$ sudo tar -xvf apache-jmeter-5.6.3.tgz -C /usr/local/software
$ cd /usr/local/software
$ sudo mv apache-jmeter-5.6.3/ jmeter
3、配置环境变量

vim etc/profile 文件中追加如下内容,保存并退出。

export PATH=$PATH:/usr/local/software/jmeter/bin

更新环境变量

$ sudo source /etc/profile
4、验证版本
$ jmeter -v
WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release
WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release
WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release
WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release
    _    ____   _    ____ _   _ _____       _ __  __ _____ _____ _____ ____
   / \  |  _ \ / \  / ___| | | | ____|     | |  \/  | ____|_   _| ____|  _ \
  / _ \ | |_) / _ \| |   | |_| |  _|    _  | | |\/| |  _|   | | |  _| | |_) |
 / ___ \|  __/ ___ \ |___|  _  | |___  | |_| | |  | | |___  | | | |___|  _ <
/_/   \_\_| /_/   \_\____|_| |_|_____|  \___/|_|  |_|_____| |_| |_____|_| \_\ 5.6.3

Copyright (c) 1999-2024 The Apache Software Foundation
5、配置中文化

临时汉化

jmeter 启动之后,选择 选择Options—>Choose Language—>选择语言(例如:Chinese(Simplified)简体中文)设置成功。重启Jmeter又会恢复英文

永久修改

  • 进入到Jmeterbin目录下,找到jmeter.properties文档
  • 打开查找language,找到language=en的行如下图,将en改为zh_CN,并且去掉前面的#号,保存退出;
启动 jmeter
# 普通用户启动
$ jemter
请登录后再评论