JMeter installation and configuration-Mac
Key points of this chapter
- Preconditions
- command line installation
- Compression package installation
Mac
There are two ways to install the corresponding tools on the website: one is to install JMeter
directly with the terminal command line ; the other is to go to the official website to download the compressed package and install it like a computer .brew
Window
JMeter
JMeter
No installation is required, but the prerequisite JMeter
for java
the application is JDK
the support of the environment.
Regardless of the installation method, the preconditions of the corresponding environment are required. Let's take a look at the corresponding preconditions first:
Preconditions
Java installation configuration
- Before installation
JMeter
,Java
the installation and configuration of the environment must be successful. SinceJMeter
it isJava
an application developed in a language,JMeter
the current machine hasJava
an environment as a prerequisite for running.Java
The version of Java 8+ must be the one used in this articlejdk11
.
Method 1: command line brew installation
Prepare
The prerequisite for using the command line brew
to install is that the command line tool Mac
has been installed on the computer .brew
You can verify it by entering the following command on the command line:
brew --version
The corresponding running result is:
Homebrew 3.6.13
Homebrew/homebrew-core (git revision 2787e0a5d5d; last commit 2022-12-04)
Homebrew/homebrew-cask (git revision 7bd3fc7aa8; last commit 2023-01-11)
brew install JMeter
After the terminal displays the corresponding version number, you can run the installation command brew
on the command line terminal :brew
brew install jmeter
Installation path view
The path to the default installation for command-line installations is /usr/local/Cellar/jmeter/版本号
.
The version 5.5 is installed this time, so the installation path is: /usr/local/Cellar/jmeter/5.5
.
Next, check and verify the path.
How to check the installation path?
steps :
-
which
Display the directory with the commandJMeter
.which jmeter
-
Open the upper level file of the directory, right-click and choose to display the original item.
-
Jump to
JMeter
the actual running code path.
start up
JMeter
There is no need to configure environment variables for command line installation , and the interface jmeter
can be opened by typing in the command line GUI
.
jmeter
uninstall
If uninstallation is required, enter the following command directly on the command line:
brew uninstall jmeter
Note ⚠️: You can only uninstall brew
the ones installed by the command line JMeter
.
Method 2: Install JMeter on the official website
If you want to compress the package for decompression installation, you need to open the official website .
Compressed package download
- Download the compressed package of the corresponding version from the official website
Apache JMeter
.
decompress
- The downloaded compressed package can be decompressed to the specified path of the current computer. This article is directly decompressed to the current user directory, as follows:
Configure environment variables
At this point, although the installation is successful, it is necessary to JMeter
configure the environment variables, otherwise, JMeter
the interface started by the command line cannot be used directly.
#-------- jmeter ----------
JMETER_HOME=/**/apache-jmeter-5.5
export JMETER_HOME
export PATH=$PATH:$JMETER_HOME/bin
JMETER_HOME
: It isJMeter
the decompression path.
After configuring the environment variable, it will take effect only after the terminal needs to
source
be saved and then reopen the command line window.
start up
Whether JMeter is installed through the command line or decompressed through the compressed package, it needs to be verified through the interface startup.
jmeter
If the interface can be started successfully, it means that the corresponding Mac computer is JMeter
successfully installed.
uninstall
Simply delete the decompressed folder to uninstall without too much operation. When the path cannot be found in the environment variable, the corresponding will not take effect.
Summarize
- The compressed package installation needs to configure environment variables before it can be started using the command line.
- The command line installation
JMeter
can be started directly by entering commands in the terminal.