wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
tar -xzvf openjdk-11+28_linux-x64_bin.tar.gz -C /usr/local/
wget https://dlcdn.apache.org/jmeter/binaries/apache-jmeter-5.6.3.tgz
# 这里如果执行命令404,那就是页面没有这个版本了,去看下当前版本是多少,替换一下就行。--2024-07-23 20:54:11-- https://dlcdn.apache.org/jmeter/binaries/apache-jmeter-5.6.2.tgz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-07-23 20:54:12 ERROR 404: Not Found.
tar -xvf apache-jmeter-5.6.3.tgz -C /usr/local/
# 执行/usr/local/apache-jmeter-5.6.3/bin/jmeter -v有如下输出就代表安装好了。root@localhost:/opt# /usr/local/apache-jmeter-5.6.3/bin/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
Jul 23, 2024 6:02:51 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
_ ____ _ ____ _ _ _____ _ __ __ _____ _____ _____ ____
/ \ | _ \ / \ / ___|||| ____|||\/| ____|_ _| ____| _ \
/ _ \ ||_) / _ \||||_|| _| _ |||\/|| _|||| _|||_)| / ___ \| __/ ___ \ |___| _ ||___ ||_||||||___ ||||___| _ <
/_/ \_\_| /_/ \_\____|_||_|_____|\___/|_||_|_____||_||_____|_|\_\ 5.6.3
Copyright (c) 1999-2024 The Apache Software Foundation
root@localhost:/opt# /usr/local/apache-jmeter-5.6.3/bin/jmeter-server
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
Server failed to start: java.rmi.RemoteException: Cannot start. localhost.localdomain is a loopback address.
An error occurred: Cannot start. localhost.localdomain is a loopback address.
如果报错这个,在/usr/local/apache-jmeter-5.6.3/bin目录下找到jmeter-server加入RMI_HOST_DEF=-Djava.rmi.server.hostname=127.0.0.1
在/usr/local/apache-jmeter-5.6.3/bin/jmeter.properties中加入server.rmi.localport=1099 and server.rmi.ssl.disable=true
root@localhost:/opt# /usr/local/apache-jmeter-5.6.3/bin/jmeter-server
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
Using local port: 1099Created remote object: UnicastServerRef2 [liveRef: [endpoint:[127.0.0.1:1099](local),objID:[-caa38c7:190dfca3799:-7fff, 587592835021192817]]]^C
root@localhost:/opt/jmeter# jmeter -n -t /opt/jmeter/test-plan/vps.jmx -l /opt/jmeter/result/vps3.jtl -R 127.0.0.1:1099 -JjmeterTestCsvHome=./ -e -o /opt/jmeter/result/report3
Creating summariser <summary>
Created the tree successfully using /opt/jmeter/test-plan/vps.jmx
Starting standalone test @ 2024 Aug 8 08:29:12 PDT (1723130952446)Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445Warning: Nashorn engine is planned to be removed from a future JDK release
summary=1000 in 00:00:08 = 118.5/s Avg: 699 Min: 82 Max: 2942 Err: 0(0.00%)Tidying up ... @ 2024 Aug 8 08:29:21 PDT (1723130961734)... end of run
root@localhost:/opt/jmeter# jmeter -n -t /opt/jmeter/test-plan/vps.jmx -l /opt/jmeter/result/vps5.jtl -R 127.0.0.1:1099 -JjmeterTestCsvHome=./ -e -o /opt/jmeter/result/report5
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
Creating summariser <summary>
Created the tree successfully using /opt/jmeter/test-plan/vps.jmx
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445Warning: Nashorn engine is planned to be removed from a future JDK release
summary + 3413 in 00:00:36 = 95.9/s Avg: 5805 Min: 90 Max: 23766 Err: 0(0.00%) Active: 1270 Started: 1271 Finished: 1summary + 5311 in 00:00:31 = 170.5/s Avg: 8430 Min: 137 Max: 32405 Err: 2(0.04%) Active: 1918 Started: 2000 Finished: 82summary=8724 in 00:01:07 = 129.7/s Avg: 7403 Min: 90 Max: 32405 Err: 2(0.02%)summary + 5601 in 00:00:28 = 197.8/s Avg: 6620 Min: 97 Max: 34699 Err: 6(0.11%) Active: 1461 Started: 2000 Finished: 539summary=14325 in 00:01:36 = 149.7/s Avg: 7097 Min: 90 Max: 34699 Err: 8(0.06%)summary + 5675 in 00:00:28 = 201.2/s Avg: 6175 Min: 86 Max: 30391 Err: 1(0.02%) Active: 0 Started: 2000 Finished: 2000summary=20000 in 00:02:04 = 161.4/s Avg: 6835 Min: 86 Max: 34699 Err: 9(0.04%)Tidying up ... @ 2024 Aug 8 09:03:58 PDT (1723133038298)