2 ways to install Apache JMeter on Ubuntu 22.04 LTS Linux

Learn how to install Apache JMeter on Ubuntu 22.04 LTS Jammy for web or website load, function, or database testing.

Apache JMeter is one of the popular free and open-source software platforms by the Apache Foundation. It is meant to perform the load stress by developers on their Web apps or website to analyze and measure their performance before going public. Apart from performance tests; regression, stress, and database server tests based on different technologies can be performed to analyze system functional behavior.

JMeter is Java-based therefore cross-platform and the scripting language it uses is Groovy (an object-oriented programming language used for the Java platform).

Steps to install Jmeter on Ubuntu 22.04 LTS

The commands given here can be used for other popular Linux distros based on Ubuntu 22.04 to set up Jmeter such as Linux Mint, Elementary OS, POP OS, and more…

There are two easy ways to install the open-source Jmeter one is using the APT package manager and the other with the help of its archive file. Let’s see both.

#1st method: Using the APT package manager

1. Update Ubuntu 22.04 LTS

As in this method, we are about to use the APT package manager, hence, start with updating the system. Here is the command to follow:

sudo apt update && sudo apt upgrade

2. Use to install Jmeter on Ubuntu 22.04

After updating the system, we can install Apache Jemter using the default system repository of Ubuntu 22.04 and the APT package manager. However, one thing that needs to be noted is the version of Jmeter available is not the latest one. Those who want the latest one can follow the next method of installing Jmeter on Linux given in this tutorial.

sudo apt install jmeter

#2nd method- Manual installation

3. Install Java – OpenJDK

As Apache Jmeter is based on Java, hence our system must have Java installed to run it. If you already have the latest version of JRE or JDK then simply skip this step otherwise use the below command to get it. JMeter requires Java 8 or higher.

Here we are installing the available OpenJDK i.e 11 on Ubuntu 22.04:

sudo apt install default-jdk

4. Download Apache JMeter

The latest version while doing this tutorial was version 5.5, however, you can get the latest one from the official download page JMeter, if it is different in your case.

Copy the Link of the Zip file and paste it in front of wget command tool.

wget paste-link

For example:

wget https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.5.zip
Download Jmeter on Ubuntu 22.04

5. Setup JMeter on Ubuntu 22.04 LTS

Now, extract the downloaded file and for convenience, you can change the name of the extracted folder.

ls

Check the downloaded zip file and replace the version of the file in the below-given commands:

unzip apache-jmeter-5.5.zip

Change the folder name:

mv apache-jmeter-5.5 jmeter

Move it to somewhere safe such as /opt directory

sudo mv jmeter /opt

6. Add Jmeter to the system path

To easily access the Jmeter commands line tools without switching to its directory again and again, simply add its folder to your system path

echo 'export PATH="$PATH:/opt/jmeter/bin"' >> ~/.bashrc
source ~/.bashrc

Now, we can start it using a command i.e:

jmeter

7. Create Desktop and Application Shortcut

Well, those who are regular users of Apache Jmeter, can create a Desktop as well as Application launcher shortcut to readily access this testing application.

Create a Desktop shortcut file

nano ~/Desktop/Jmeter.desktop

Paste the following lines:

[Desktop Entry]
Version=1.0
Type=Application
Name=Apache-Jmeter
Comment=Testing
Exec=/opt/jmeter/bin/./jmeter.sh
Icon=/opt/jmeter/docs/images/jmeter_square.png
Terminal=false
StartupNotify=false

Save the file by pressing Ctrl+O, hitting the Enter key, and then Ctrl+X to exit the file.

Change file permission:

chmod 4775 ~/Desktop/Jmeter.desktop

Allow launching of file:

You will have a Shortcut file on your Ubuntu Dekstop, simply right-click on the file and select the “Allow launching” option.

Allow launching testing stress load

8. Run Apache Jmeter

After creating the Jmeter, we can launch it directly using its Desktop shortcut. Just double-click that and you will have this Stress testing application on your system launched to start working.

Install latest version Jmeter on Ubuntu 22.04

Also, add the shortcut in your Application launcher:

sudo cp ~/Desktop/Jmeter.desktop /usr/share/applications/
Launch Jmeter

9. How to update

Well, if you have installed the Jmeter using the APT repository and there is some update available then run:

sudo apt update && sudo apt upgrade

Whereas, the users who have opted for the second method to get Jmeter in Ubuntu need to just follow the Step 4 and 5 of this tutorial. Again in which they have to download the latest version of the Jmeter manually and then extract it in the /opt folder.

10. Uninstall Jmeter from Ubuntu 22.04

To completely remove the Jmeter from the Ubuntu 22.04 use the given command depending on the method you have used to install it.

For APT:

sudo apt autoremove --purge jmeter

For the Manual method:

sudo rm /opt/jmeter
sudo rm /usr/share/applications/Jmeter.desktop ~/Desktop/Jmeter.desktop

Other Articles:

Install Apache JMeter on Ubuntu 20.04 LTS Focal Fossa
How to install Oracle Java 8 64-bit Ubuntu 22.04 | 20.04 LTS
Install Siege Benchmarking Tool on Ubuntu 22.04 LTS Jammy
How To Install InfluxDB on Ubuntu 22.04 Linux
5 Best htop alternatives to monitor Linux systems

1 thought on “2 ways to install Apache JMeter on Ubuntu 22.04 LTS Linux”

  1. ~$ jmeter
    An error occurred:
    No X11 DISPLAY variable was set,
    or no headful library support was found,
    but this program performed an operation which requires it,

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.