JMeter installation and configuration-Mac

JMeter installation and configuration-Mac

Key points of this chapter

  1. Preconditions
  2. command line installation
  3. Compression package installation

MacThere are two ways to install the corresponding tools on the website: one is to install JMeterdirectly 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 .brewWindowJMeter

JMeterNo installation is required, but the prerequisite JMeterfor javathe application is JDKthe 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

  1. Before installation JMeter, Javathe installation and configuration of the environment must be successful. Since JMeterit is Javaan application developed in a language, JMeterthe current machine has Javaan environment as a prerequisite for running. JavaThe version of Java 8+ must be the one used in this article jdk11.

Method 1: command line brew installation

Prepare

The prerequisite for using the command line brewto install is that the command line tool Machas 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)

insert image description here

brew install JMeter

After the terminal displays the corresponding version number, you can run the installation command brewon the command line terminal :brew

brew install jmeter

insert image description here

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 :

  1. whichDisplay the directory with the command JMeter.

    which jmeter
    

  2. Open the upper level file of the directory, right-click and choose to display the original item.

  3. Jump to JMeterthe actual running code path.

start up

JMeterThere is no need to configure environment variables for command line installation , and the interface jmetercan 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 brewthe 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

  1. Download the compressed package of the corresponding version from the official websiteApache JMeter .

decompress

  1. 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 JMeterconfigure the environment variables, otherwise, JMeterthe 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 is JMeterthe decompression path.

After configuring the environment variable, it will take effect only after the terminal needs to sourcebe 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 JMetersuccessfully 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 JMetercan be started directly by entering commands in the terminal.

Guess you like

Origin blog.csdn.net/qq_24133365/article/details/128849146