Help us understand the problem. What is going on with this article?

Amazon Linux 2 に Apache JMeter をインストールする

More than 1 year has passed since last update.

Java のインストール

[ec2-user@ip-172-31-43-188 ~]$ java -version
-bash: java: command not found
[ec2-user@ip-172-31-43-188 ~]$ sudo yum install -y java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
[ec2-user@ip-172-31-43-188 ~]$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

[ec2-user@ip-172-31-43-188 ~]$ javac -version
javac 1.8.0_191

JMeter のインストール

https://jmeter.apache.org/download_jmeter.cgi

ここからバイナリをダウンロードする。

[ec2-user@ip-172-31-43-188 ]$ mkdir jmeter && cd jmeter
[ec2-user@ip-172-31-43-188 jmeter]$ wget http://ftp.kddilabs.jp/infosystems/apache//jmeter/binaries/apache-jmeter-5.0.tgz
--2018-12-01 03:30:16--  http://ftp.kddilabs.jp/infosystems/apache//jmeter/binaries/apache-jmeter-5.0.tgz
Resolving ftp.kddilabs.jp (ftp.kddilabs.jp)... 192.26.91.193, 2001:200:601:10:206:5bff:fef0:466c
Connecting to ftp.kddilabs.jp (ftp.kddilabs.jp)|192.26.91.193|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53847192 (51M) [application/x-gzip]
Saving to: ‘apache-jmeter-5.0.tgz’

 2% [=>                                                                                 ] 1,360,323   13.3KB/s  eta 58m 27s

デフォルトのホスト ftp.kddilabs.jp から wget しようとしたら非常に遅かったのでミラーサイトに変更。

 [ec2-user@ip-172-31-43-188 jmeter]$ wget http://ftp.jaist.ac.jp/pub/apache//jmeter/binaries/apache-jmeter-5.0.tgz
--2018-12-01 03:31:51--  http://ftp.jaist.ac.jp/pub/apache//jmeter/binaries/apache-jmeter-5.0.tgz
Resolving ftp.jaist.ac.jp (ftp.jaist.ac.jp)... 150.65.7.130, 2001:df0:2ed:feed::feed
Connecting to ftp.jaist.ac.jp (ftp.jaist.ac.jp)|150.65.7.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53847192 (51M) [application/x-gzip]
Saving to: ‘apache-jmeter-5.0.tgz'

100%[==================================================================================>] 53,847,192  13.9MB/s   in 3.8s

2018-12-01 03:31:55 (13.6 MB/s) - ‘apache-jmeter-5.0.tgz’ saved [53847192/53847192]

ダウンロードできたので、展開する。

[ec2-user@ip-172-31-43-188 jmeter]$ tar -xf apache-jmeter-5.0.tgz

サンプルの jmx を実行してみると、正常に動作している様子。

[ec2-user@ip-172-31-43-188 jmeter]$ cd apache-jmeter-5.0/bin
[ec2-user@ip-172-31-43-188 bin]$ ./jmeter.sh -n -t examples/CSVSample.jmx
Dec 01, 2018 3:35:47 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Creating summariser <summary>
Created the tree successfully using examples/CSVSample.jmx
Starting the test @ Sat Dec 01 03:35:47 UTC 2018 (1543635347849)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary =     12 in 00:00:03 =    4.4/s Avg:   199 Min:   100 Max:   327 Err:     0 (0.00%)
Tidying up ...    @ Sat Dec 01 03:35:50 UTC 2018 (1543635350635)
... end of run

参考

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away