目录
[二、 安装包下载](#二、 安装包下载)
[三 、安装jdk](#三 、安装jdk)
[四 、控制机安装](#四 、控制机安装)
[4.1 解压压缩包](#4.1 解压压缩包)
[4.2 修改 bin/jmeter.properties](#4.2 修改 bin/jmeter.properties)
[4.3 修改 bin/system.properties](#4.3 修改 bin/system.properties)
[5.1 解压安装包](#5.1 解压安装包)
[5.2 修改 bin/jmeter.properties](#5.2 修改 bin/jmeter.properties)
[5.3 修改 bin/system.properties](#5.3 修改 bin/system.properties)
[5.4 启动执行机](#5.4 启动执行机)
[5.5 启动控制机](#5.5 启动控制机)
[六、 使用](#六、 使用)
[6.1 设置语言](#6.1 设置语言)
[6.2 添加线程组](#6.2 添加线程组)
[6.3 添加取样器](#6.3 添加取样器)
[6.4 添加汇总结果](#6.4 添加汇总结果)
[6.5 添加请求头](#6.5 添加请求头)
[6.6 执行压测](#6.6 执行压测)
一、环境准备
三台机器,一台windows控制机,两台linux执行
|-----------------|-----------|-----|
| 192.168.122.237 | Centos7.6 | 执行机 |
| 192.168.122.238 | Centos7.6 | 执行机 |
| 192.168.229.81 | win10 | 控制机 |
二、 安装包下载
jmeter安装包不分window、linux操作系统,一个包通用。
下载地址:https://jmeter.apache.org/download_jmeter.cgi

三 、安装jdk
执行机和控制机的jdk、jmeter版本最好相同。
四 、控制机安装
4.1 解压压缩包
4.2 修改 bin/jmeter.properties
bash
remote_hosts=192.168.122.237:1099,192.168.122.238:1099
#remote_hosts=localhost:1099,localhost:2010
# RMI port to be used by the server (must start rmiregistry with same port)
server_port=1099
server.rmi.ssl.disable=true
sampleresult.timestamp.start=true
4.3 修改 bin/system.properties
bash
# 末尾追加
java.rmi.server.hostname=192.168.229.81
五、执行机安装
5.1 解压安装包
bash
unzip apache-jmeter-5.6.3.zip -d apache-jmeter-5.6.3
5.2 修改 bin/jmeter.properties
bash
remote_hosts=127.0.0.1
# RMI port to be used by the server (must start rmiregistry with same port)
server_port=1099
server.rmi.ssl.disable=true
sampleresult.timestamp.start=true
5.3 修改 bin/system.properties
bash
# 末尾追加
java.rmi.server.hostname=192.168.229.81
5.4 启动执行机
bash
# 改为当前执行机的ip
./jmeter-server -Djava.rmi.server.hostname=192.168.122.237
5.5 启动控制机
进入bin目录。双击jmeter-server.bat。
六、 使用
6.1 设置语言

6.2 添加线程组

6.3 添加取样器

6.4 添加汇总结果

6.5 添加请求头

6.6 执行压测

七、 注意事项
注意打开防火墙或开放 1099端口