1 min readJul 26, 2021
How to install Jmeter in Centos 7 and run it in Nohub mode so even the session got interrupted the
- Install open JDK 1.8.0.
- Download and unzip Jmeter. https://downloads.apache.org//jmeter/binaries/apache-jmeter-5.4.1.tgz
- Set paths in bashrc files . Example- vi ~/.bashrc as per below.
# Uncomment the following line if you don't like systemctl's auto-paging feature:# export SYSTEMD_PAGER=# User specific aliases and functionsexport JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64/jre"export PATH=$PATH:$JAVA_HOMEexport JMETER_HOME="/home/sadesilva/JmterScripts/apache-jmeter-5.4.1"export PATH=$JMETER_HOME/bin:$PATH
To check that directory is exists or not
ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12–1.el7_6.x86_64/jre/bin/java
Command to run JMeter in CLI mode
nohup jmeter -n -t JmetertestPlanName.jmx -l TestSummaryreport.csv -j logfilename.log -e -o TestResultReportFolder </dev/null &>/dev/null &
l parameter for .csv report
-j means logfile name
-o is for the html report location
TestResultReportFolder contains the HTML report(open the index.html file in a browser.)
TestSummaryreport.csv has a summary in CSV format.
nohup and </dev/null are nohup syntaxes.