Use JMeter to perform test tasks under Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.