How to Install Apache JMeter on Linux?
In this article, we will see how to install Apache JMeter in Linux. Here we will use Ubuntu which is a Linux distribution based on Debian and composed mostly of free and open-source software. JMeter is developed by Java so it is necessary to have java 8 or higher version on your computer.
Checking Java Version:
Use java –version or javac –version to check if java is already installed on your computer or not.
$ java --version
If you get the same message then skip step 2 i.e. installation of java and move to step 3.
If you get “java not found” in output, so first install Java.
Installing Java 11.0
Step 1: Use the following command to install openjdk – 11-jre.
$ sudo apt install openjdk-11-jre-headless
Then enter the sudo password and enter “Y” to confirm the download.
It will take some time according to your internet speed.
Step 2: Use the following command to install openjdk-11-jdk.
$ sudo apt install openjdk-11-jdk-headless
Step 3: If download completes then check again using java –version command.
First, we will download the latest JMeter version from the official JMeter website. Go to the given link and click on the “apache-jmeter-5.4.1.zip” link to download the binary zip file of JMeter.
After clicking on the zip file a dialog box will appear and check the save file box and click ok. It will start the download.
The file will be placed in the Downloads folder. Open the folder, right-click on the zip file and click on Extract here.
Now we have successfully downloaded the JMeter and extracted it.
Open the terminal and use the following command to go to the directory from where we can run JMeter
$ cd Downloads/apache-jmeter-5.4.1/bin
Cd stands for change directory, a Linux command to move between directories.
Run the following command to start the JMeter.
This will look like this.