To run JMeter under Linux, you must first install the JDK with the following installation steps:
(1), download a Linux available JDK package (for example: Jdk-6u45-linux-i586.bin),
(2), then will jdk-6u45-linux-i586.bin to/opt directory, cd/opt/; (Of course you can also put in a custom directory)
(3), and then give it permission chmod 777 Jdk-6u45-linux-i586.bin command;
(4), then execute./jdk-6u45-linux-i586.bin
(5), re-check the results of the execution: LS
(6), the last modification vi/etc/profile, mainly in the last side of the file to add the following paragraph:
Export java_home=/opt/jdk1.6.0_45
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Exit after saving.
(7), log off the current User: Logout
(8), re-login to Linux: Use Xshell or directly in the virtual machine login can be.
(9), check whether the JDK is installed successfully: input Java, input java-version
Then you configure JMeter environment variables under Linux, with the following steps:
(1), move apache-jmeter-2.12.tgz to/opt directory, unzip: TAR-ZXVF apache-jmeter-2.12.tgz
(2), view decompression results: LS
(3), configure environment variables: vi/etc/profile, enter:
Export path=/opt/apache-jmeter-2.12/bin/: $PATH
Then save, exit.
(4), log off the current User: Logout
(5), re-login to Linux: Use Xshell or directly in the virtual machine login can be.
(6), check whether JMeter can run: jmeter-v
To test with JMeter:
(1), move the baidu-test.jmx to the root directory.
(2), execution: jmeter-n-t baidu-test.jmx-l LOG.JTL, results such as:
(3) View JTL log:, results such as: return 200,ok!
Use JMeter to perform test tasks under Linux