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 のインストール
ここからバイナリをダウンロードする。
[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