Written at the top, the installation and deployment of jmeter depends on the java environment, so you have to install JDK
java environment check
Command line input: java -version
If the following content appears, it means that the java environment has been installed, don’t worry about it, if not, you need to install JDK
1. Download and install JDK
### (1) Download JDK
- Enter the jdk official website and download the latest version of JDK.
https://www.oracle.com/java/technologies/downloads/#jdk17-windows
### (2) Install jdk
1. After the download is successful, double-click to run the file, and a running interface will pop up.
2. Click the "Run" button.
3. In the pop-up page, click the "Next" button.
4. The default installation path can be used, or you can choose another path for installation by clicking the "Change" button. Then click the "Next" button.
5. The installation is complete.
Remarks: Just follow the prompts, and do not take screenshots one by one.
### (3) JDK configuration environment variables
1. After the jdk installation is complete, you need to configure environment variables. Right-click "Display Settings", click "System-System Information" option to enter the "Advanced System Settings" page. 【Windows11 system】
2. In the "System Properties" page, click the "Environment Variables" button.
3. Create a new system variable. [Same for steps 4/5/6]
4. After filling in the following content, click the "OK" button.
Variable name:JAVA_HOME
variable value:jdk的安装路径
5. Find the CLASSPATH variable , if there is direct editing (multiple variables are separated by ;), if not, you need to create a new one.
Variable name:CLASSPATH
Variable value:.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
6. Find the Path variable for editing, and add "%JAVA_HOME%\bin" and "%JAVA_HOME%\jre\bin" to the variable value of Path. (Note: Multiple variables are separated by semicolons)
For computers above Windows 10, create a new variable value :%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
For Windows 7 computers, enter the ; at the end of the variable value to separate:%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
7. Save and confirm each edit. In this way, the jdk environment variables are configured.
### (4) Verify that the jdk installation is successful
Open the cmd window, enter java, and you can see the relevant information after pressing Enter,
or you can check the jdk version by entering java -version.
If the above information is displayed correctly, it can indicate the successful installation of jdk.
2. Download and install JMeter
### (1) Download JMeter
1. Enter the official website Apache JMeter - Download Apache JMeter
2. Select the version corresponding to the operating system to download
### (2) Install JMeter
and decompress the successfully downloaded compressed package into the specified directory, that is Successful installation
### (3) Jmeter configuration environment variables
1. The first 3 steps are the same as JDK configuration environment variables
2. Enter the following content and save.
Variable name input: JMETER_HOME
Variable value input: JMeter安装路径
3. Edit the CLASSPATH variable and add
;%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar; %JMETER_HOME%\lib\jorphan.jar;
4. Add the following after the system variable path :
%JMETER_HOME%\bin
### (4) Run JMeter
1. Verify whether the Jmeter environment variable is configured successfully . Enter the command line: jmeter, and the startup effect is the same: double-click the jmeter.bat file to start the GUI interface normally, and the environment variable configuration is successful.
2. In the bin directory of the JMeter installation path, find the jmeter.bat file and double-click to start it.
You can also create a shortcut to the jmeter.bat
file on the desktop, double-click to start 3. JMeter starts successfully.
Note: After startup, there will be two windows, the Jmeter command window and the Jmeter graphical operation interface, and the command window cannot be closed.
The effect after starting is as shown in the figure below:
4. Under the Linux system, start Jmeter and use the command