Apache Jmeter is a free and opensource load testing tools, Apache Jmeter is Apache Project, Apache Jmeter written in JAVA and Developed by Apache Software Foundation.
Install Java and dependencies
First you need update ubuntu repository and install java by following commands with root privileges.
apt-get update
apt-get install default-jdk -y
apt-get install unzip xvfb libxi6 libgconf-2-4 -y
Once installation is completed so then check the JAVA version by following commands.
java -version
You should get output like this.
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-8u232-b09-0ubuntu1~16.04.1-b09)OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
Download Apache Jmeter 5.2.1
To download the Apache Jmeter, You need to create a directory in /opt by following the commands, Click here to download Latest Jmeter.
mkdir /opt/jmeter
cd /opt/jmeter
wgethttp://apachemirror.wuchna.com//jmeter/binaries/apache-jmeter-5.2.1.zip
Extract the Jmeter
unzip apache-jmeter-5.2.1.zip
Start the Apache Jmeter
To start the Apache Jmeter use the following commands.
sudo sh /opt/jmeter/apache-jmeter-5.2.1/bin/jmeter.sh
You should get the Jmeter first look like this.
Bash Script to Install the Apache Jmeter with Google chrome driver
vim jmeter.sh
Paste the following lines.
#!/bin/bash
apt-get install default-jre -y
apt-get install default-jdk -y
apt-get install curl -y
mkdir /opt/jmeter
cd /opt/jmeter
http://apachemirror.wuchna.com//jmeter/binaries/apache-jmeter-5.2.1.zip
unzip apache-jmeter-5.2.1.zip
apt-get update -y
apt-get install -y unzip xvfb libxi6 libgconf-2-4 -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
chmod +x google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver /usr/bin/chromedriver
sudo chown root:root /usr/bin/chromedriver
chmod +x /usr/bin/chromedriver
cd /opt/jmeter/apache-jmeter-5.1.1
wget https://jmeter-plugins.org/files/packages/jpgc-webdriver-3.0.zip
unzip jpgc-webdriver-3.0.zip
sudo sh /opt/jmeter/apache-jmeter-5.2.1/bin/jmeter.sh
Save and exit from vim editor.
To execute the jmeter.sh use the following commands.
sudo sh /opt/jmeter/apache-jmeter-5.2.1/bin/jmeter.sh