jmeter under Windows is a GUI mode, you can view the operation, but the GUI interfere with the performance of large, all general pressure test runs on Linux.
Here are the steps to install the configuration Jmeter5.1, and execute jmx file under Linux,
First, install
1. Download apache-jmeter-5.1.1.tgz file.
Link: https: //pan.baidu.com/s/1bIYBBbJR0TvefMbmxJSR4Q extraction code: s4d8
Example 2. linux file into the directory: / usr / local below
3. Extract apache-jmeter-5.1.1.tgz to the current folder
command:
[root@test /]# cd usr/local/
[root@test local]# tar -zxvf apache-jmeter-5.1.1.tgz
4. After extraction, the configuration environment variables jmeter
① Edit profile file
vim /etc/profile
② Add the environment variable
export JMETER_HOME=/usr/local/apache-jmeter-5.1.1
export CLASSPATH=$JMETER_HOME/lib/ext/ApacheJMeter_core.jar:$JMETER_HOME/lib/jorphan.jar:$JMETER_HOME/lib/logkit-2.0.jar:$CLASSPATH
export PATH=$JMETER_HOME/bin:$PATH:$HOME/bin
③ After the addition, the implementation profile file
[root@test /]# source /etc/profile
5. After the configuration is successful, jmeter verify successful installation.
command:
[root@test /]# jmeter -v
The following screen appears, it means that the installation was successful:
Second, the implementation jmx
1. Create a new test folder at home, copy the file windows jmx come in. Then a new result file folder for storing test results.
The implementation of use cases:
[root@test bin]# cd /usr/local/apache-jmeter-5.1.1/
[root@test apache-jmeter-5.1.1]# ./bin/jmeter -n -t /home/test/baidu.jmx -l /home/test/baidu.jtl -e -o /home/test/result/
Results of the:
2. The result folder into the window system, you can view the results html
See results are shown below: