スポンサーリンク

AmazonLinux2022(Arm)プレビュー版でJava11→17+Tomcat9+MySQLの動作環境を構築する

一つ前の記事でAmazonLinux2022(以降AL2022)のx86アーキテクチャのAMIを使用した場合の環境構築手順を書きました。こちらはArmアーキテクチャを使用した場合の手順になります。
AmazonLinux2022(x86)プレビュー版でJava11+Tomcat9+MySQLの動作環境を構築する

ArmアーキテクチャなAMIを選択することで時間当たりの単価がt3系より少し安いt4g系のインスタンスタイプを選択することができます。

インスタンスを起動

以下のような設定でインスタンスを起動

名前AL2022_arm
AMIami-04d4b8058db9e5fb3
AMI(名称)al2022-ami-ecs-hvm-2022.0.20221102-kernel-5.15-arm64
インスタンスタイプt4g.medium
セキュリティグループ22(SSH)と80(HTTP)について自分のIPからの接続を許可するようなルールを設定
ストレージ30GB、gp3(初期値のまま)

↑マーケットプレースAMIで「Amazon Linux 2022」と検索しarm64の記載のあるAMIを選択

インスタンスの初期状態確認

Updates Information Summary: available
    1 Security notice(s)
        1 Medium Security notice(s)


   __|  __|  __|
   _|  (   \__ \   Amazon Linux 2022 (ECS Optimized)
 ____|\___|____/   Preview

For documentation, visit http://aws.amazon.com/documentation/ecs

↑SSH接続するとこんな感じの表示が出る

$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2022"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2022"
PLATFORM_ID="platform:al2022"
PRETTY_NAME="Amazon Linux 2022"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2022"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2022"
SUPPORT_END="2027-11-01"

$ cat /etc/system-release
Amazon Linux release 2022 (Amazon Linux)

$ uname -a
Linux ip-172-31-25-201.ap-northeast-1.compute.internal 5.15.73-45.135.amzn2022.aarch64 #1 SMP Fri Oct 14 17:39:54 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

$ id
uid=1000(ec2-user) gid=1000(ec2-user) groups=1000(ec2-user),4(adm),10(wheel),190(systemd-journal),993(docker) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

$ date
Sun Mar 12 05:54:44 AM UTC 2023

$ echo $LANG
en_US.UTF-8

$ echo $PATH
/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

$ getenforce
Permissive

$ ll /etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 968 Oct 27 20:08 amazonlinux.repo

↑SELinuxはPermissiveとなっていることを確認

インスタンスの初期設定(SELinux無効化)

# vi /etc/selinux/config
# grubby --update-kernel ALL --args selinux=0
# reboot
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
# See also:
# https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-selinux/#getting-started-with-selinux-selinux-states-and-modes
#
# NOTE: In earlier Fedora kernel builds, SELINUX=disabled would also
# fully disable SELinux during boot. If you need a system with SELinux
# fully disabled instead of SELinux running with no policy loaded, you
# need to pass selinux=0 to the kernel command line. You can use grubby
# to persistently set the bootloader to boot with selinux=0:
#
#    grubby --update-kernel ALL --args selinux=0
#
# To revert back to SELinux enabled:
#
#    grubby --update-kernel ALL --remove-args selinux
#
-SELINUX=permissive
+SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
# getenforce 
Disabled

↑再起動後SELinuxが無効化されてることを確認

インスタンスの初期設定(UTC→JST)

# date
Sun Mar 12 05:59:58 AM UTC 2023

# ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

# date
Sun Mar 12 03:00:17 PM JST 2023

インスタンスの初期設定(パッケージ更新)

# dnf update
Last metadata expiration check: 0:09:41 ago on Sun 12 Mar 2023 02:50:48 PM JST.
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================
Dependencies resolved.
==================================================================================================================================================================================
 Package                                 Architecture                         Version                                              Repository                                Size
==================================================================================================================================================================================
Upgrading:
 containerd                              aarch64                              1.6.8-1.amzn2022.0.1                                 amazonlinux                               21 M

Transaction Summary
==================================================================================================================================================================================
Upgrade  1 Package

Total download size: 21 M
Is this ok [y/N]: y
Downloading Packages:
containerd-1.6.8-1.amzn2022.0.1.aarch64.rpm                                                                                                        50 MB/s |  21 MB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                              40 MB/s |  21 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Upgrading        : containerd-1.6.8-1.amzn2022.0.1.aarch64                                                                                                                  1/2 
  Running scriptlet: containerd-1.6.8-1.amzn2022.0.1.aarch64                                                                                                                  1/2 
  Running scriptlet: containerd-1.6.6-1.amzn2022.0.3.aarch64                                                                                                                  2/2 
  Cleanup          : containerd-1.6.6-1.amzn2022.0.3.aarch64                                                                                                                  2/2 
  Running scriptlet: containerd-1.6.6-1.amzn2022.0.3.aarch64                                                                                                                  2/2 
  Verifying        : containerd-1.6.8-1.amzn2022.0.1.aarch64                                                                                                                  1/2 
  Verifying        : containerd-1.6.6-1.amzn2022.0.3.aarch64                                                                                                                  2/2 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Upgraded:
  containerd-1.6.8-1.amzn2022.0.1.aarch64                                                                                                                                         

Complete!

x86のころと異なりcontainerdというパッケージが更新されました。

Java11をインストール

# dnf search Corretto
Last metadata expiration check: 0:10:53 ago on Sun 12 Mar 2023 02:50:48 PM JST.
======================================================================== Name & Summary Matched: Corretto ========================================================================
java-1.8.0-amazon-corretto.aarch64 : Amazon Corretto runtime environment
java-1.8.0-amazon-corretto-devel.aarch64 : Amazon Corretto development environment
java-11-amazon-corretto.aarch64 : Amazon Corretto development environment
java-11-amazon-corretto-devel.aarch64 : Amazon Corretto 11 development tools
java-11-amazon-corretto-headless.aarch64 : Amazon Corretto headless development environment
java-11-amazon-corretto-javadoc.aarch64 : Amazon Corretto 11 API documentation
java-11-amazon-corretto-jmods.aarch64 : Amazon Corretto 11 jmods
java-17-amazon-corretto.aarch64 : Amazon Corretto development environment
java-17-amazon-corretto-devel.aarch64 : Amazon Corretto 17 development tools
java-17-amazon-corretto-headless.aarch64 : Amazon Corretto headless development environment
java-17-amazon-corretto-javadoc.aarch64 : Amazon Corretto 17 API documentation
java-17-amazon-corretto-jmods.aarch64 : Amazon Corretto 17 jmods
maven-amazon-corretto11.noarch : Amazon Corretto 11 binding for Maven
maven-amazon-corretto17.noarch : Amazon Corretto 17 binding for Maven
maven-amazon-corretto8.noarch : Amazon Corretto 8 binding for Maven
maven-local-amazon-corretto11.noarch : Amazon Corretto 11 toolchain for XMvn
maven-local-amazon-corretto17.noarch : Amazon Corretto 17 toolchain for XMvn
maven-local-amazon-corretto8.noarch : Amazon Corretto 8 toolchain for XMvn

# dnf search openjdk
Last metadata expiration check: 0:10:59 ago on Sun 12 Mar 2023 02:50:48 PM JST.
No matches found.

↑x86の頃と異なり、openjdkのパッケージが存在せず代わりにAmazon Correttoがインストール可能であることを確認

# dnf install java-11-amazon-corretto-devel
Last metadata expiration check: 0:12:38 ago on Sun 12 Mar 2023 02:50:48 PM JST.
Dependencies resolved.
==================================================================================================================================================================================
 Package                                                 Architecture                   Version                                          Repository                          Size
==================================================================================================================================================================================
Installing:
 java-11-amazon-corretto-devel                           aarch64                        1:11.0.17+8-1.amzn2022                           amazonlinux                        221 k
Installing dependencies:
 alsa-lib                                                aarch64                        1.2.7.2-1.amzn2022.0.1                           amazonlinux                        492 k
 chkconfig                                               aarch64                        1.15-2.amzn2022.0.1                              amazonlinux                        162 k
 dejavu-sans-fonts                                       noarch                         2.37-16.amzn2022.0.1                             amazonlinux                        1.3 M
 dejavu-sans-mono-fonts                                  noarch                         2.37-16.amzn2022.0.1                             amazonlinux                        467 k
 dejavu-serif-fonts                                      noarch                         2.37-16.amzn2022.0.1                             amazonlinux                        1.0 M
 fontconfig                                              aarch64                        2.13.94-2.amzn2022.0.1                           amazonlinux                        277 k
 fonts-filesystem                                        noarch                         1:2.0.5-5.amzn2022.0.1                           amazonlinux                        8.7 k
 freetype                                                aarch64                        2.11.0-6.amzn2022.0.1                            amazonlinux                        403 k
 google-noto-fonts-common                                noarch                         20201206-2.amzn2022                              amazonlinux                         16 k
 google-noto-sans-vf-fonts                               noarch                         20201206-2.amzn2022                              amazonlinux                        493 k
 graphite2                                               aarch64                        1.3.14-7.amzn2022.0.1                            amazonlinux                         93 k
 harfbuzz                                                aarch64                        2.9.1-1.amzn2022.0.2                             amazonlinux                        681 k
 java-11-amazon-corretto-headless                        aarch64                        1:11.0.17+8-1.amzn2022                           amazonlinux                         90 M
 javapackages-filesystem                                 noarch                         6.0.0-7.amzn2022.0.4                             amazonlinux                         13 k
 langpacks-core-font-en                                  noarch                         3.0-21.amzn2022.0.1                              amazonlinux                         11 k
 libbrotli                                               aarch64                        1.0.9-4.amzn2022.0.1                             amazonlinux                        314 k
 libjpeg-turbo                                           aarch64                        2.0.90-3.amzn2022.0.1                            amazonlinux                        189 k
 libpng                                                  aarch64                        2:1.6.37-10.amzn2022.0.1                         amazonlinux                        121 k
 xml-common                                              noarch                         0.6.3-56.amzn2022.0.1                            amazonlinux                         32 k

Transaction Summary
==================================================================================================================================================================================
Install  20 Packages

Total download size: 96 M
Installed size: 247 M
Is this ok [y/N]: y
Downloading Packages:
(1/20): javapackages-filesystem-6.0.0-7.amzn2022.0.4.noarch.rpm                                                                                    80 kB/s |  13 kB     00:00    
(2/20): dejavu-sans-mono-fonts-2.37-16.amzn2022.0.1.noarch.rpm                                                                                    2.7 MB/s | 467 kB     00:00    
(3/20): google-noto-fonts-common-20201206-2.amzn2022.noarch.rpm                                                                                   325 kB/s |  16 kB     00:00    
(4/20): dejavu-serif-fonts-2.37-16.amzn2022.0.1.noarch.rpm                                                                                        4.8 MB/s | 1.0 MB     00:00    
(5/20): xml-common-0.6.3-56.amzn2022.0.1.noarch.rpm                                                                                               629 kB/s |  32 kB     00:00    
(6/20): langpacks-core-font-en-3.0-21.amzn2022.0.1.noarch.rpm                                                                                     336 kB/s |  11 kB     00:00    
(7/20): fonts-filesystem-2.0.5-5.amzn2022.0.1.noarch.rpm                                                                                          184 kB/s | 8.7 kB     00:00    
(8/20): google-noto-sans-vf-fonts-20201206-2.amzn2022.noarch.rpm                                                                                  9.1 MB/s | 493 kB     00:00    
(9/20): dejavu-sans-fonts-2.37-16.amzn2022.0.1.noarch.rpm                                                                                          15 MB/s | 1.3 MB     00:00    
(10/20): graphite2-1.3.14-7.amzn2022.0.1.aarch64.rpm                                                                                              1.3 MB/s |  93 kB     00:00    
(11/20): freetype-2.11.0-6.amzn2022.0.1.aarch64.rpm                                                                                               5.2 MB/s | 403 kB     00:00    
(12/20): alsa-lib-1.2.7.2-1.amzn2022.0.1.aarch64.rpm                                                                                              5.3 MB/s | 492 kB     00:00    
(13/20): java-11-amazon-corretto-devel-11.0.17+8-1.amzn2022.aarch64.rpm                                                                           3.8 MB/s | 221 kB     00:00    
(14/20): libbrotli-1.0.9-4.amzn2022.0.1.aarch64.rpm                                                                                               3.7 MB/s | 314 kB     00:00    
(15/20): chkconfig-1.15-2.amzn2022.0.1.aarch64.rpm                                                                                                2.2 MB/s | 162 kB     00:00    
(16/20): libpng-1.6.37-10.amzn2022.0.1.aarch64.rpm                                                                                                2.1 MB/s | 121 kB     00:00    
(17/20): fontconfig-2.13.94-2.amzn2022.0.1.aarch64.rpm                                                                                            3.4 MB/s | 277 kB     00:00    
(18/20): harfbuzz-2.9.1-1.amzn2022.0.2.aarch64.rpm                                                                                                8.6 MB/s | 681 kB     00:00    
(19/20): libjpeg-turbo-2.0.90-3.amzn2022.0.1.aarch64.rpm                                                                                          3.2 MB/s | 189 kB     00:00    
(20/20): java-11-amazon-corretto-headless-11.0.17+8-1.amzn2022.aarch64.rpm                                                                         71 MB/s |  90 MB     00:01    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                              59 MB/s |  96 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Installing       : fonts-filesystem-1:2.0.5-5.amzn2022.0.1.noarch                                                                                                          1/20 
  Installing       : dejavu-sans-mono-fonts-2.37-16.amzn2022.0.1.noarch                                                                                                      2/20 
  Installing       : dejavu-sans-fonts-2.37-16.amzn2022.0.1.noarch                                                                                                           3/20 
  Installing       : dejavu-serif-fonts-2.37-16.amzn2022.0.1.noarch                                                                                                          4/20 
  Installing       : libjpeg-turbo-2.0.90-3.amzn2022.0.1.aarch64                                                                                                             5/20 
  Installing       : libpng-2:1.6.37-10.amzn2022.0.1.aarch64                                                                                                                 6/20 
  Installing       : chkconfig-1.15-2.amzn2022.0.1.aarch64                                                                                                                   7/20 
  Installing       : libbrotli-1.0.9-4.amzn2022.0.1.aarch64                                                                                                                  8/20 
  Installing       : alsa-lib-1.2.7.2-1.amzn2022.0.1.aarch64                                                                                                                 9/20 
  Installing       : graphite2-1.3.14-7.amzn2022.0.1.aarch64                                                                                                                10/20 
  Installing       : freetype-2.11.0-6.amzn2022.0.1.aarch64                                                                                                                 11/20 
  Installing       : harfbuzz-2.9.1-1.amzn2022.0.2.aarch64                                                                                                                  12/20 
  Running scriptlet: xml-common-0.6.3-56.amzn2022.0.1.noarch                                                                                                                13/20 
  Installing       : xml-common-0.6.3-56.amzn2022.0.1.noarch                                                                                                                13/20 
  Installing       : google-noto-fonts-common-20201206-2.amzn2022.noarch                                                                                                    14/20 
  Installing       : google-noto-sans-vf-fonts-20201206-2.amzn2022.noarch                                                                                                   15/20 
  Installing       : langpacks-core-font-en-3.0-21.amzn2022.0.1.noarch                                                                                                      16/20 
  Installing       : fontconfig-2.13.94-2.amzn2022.0.1.aarch64                                                                                                              17/20 
  Running scriptlet: fontconfig-2.13.94-2.amzn2022.0.1.aarch64                                                                                                              17/20 
  Installing       : javapackages-filesystem-6.0.0-7.amzn2022.0.4.noarch                                                                                                    18/20 
  Installing       : java-11-amazon-corretto-headless-1:11.0.17+8-1.amzn2022.aarch64                                                                                        19/20 
  Running scriptlet: java-11-amazon-corretto-headless-1:11.0.17+8-1.amzn2022.aarch64                                                                                        19/20 
  Installing       : java-11-amazon-corretto-devel-1:11.0.17+8-1.amzn2022.aarch64                                                                                           20/20 
  Running scriptlet: java-11-amazon-corretto-devel-1:11.0.17+8-1.amzn2022.aarch64                                                                                           20/20 
  Running scriptlet: fontconfig-2.13.94-2.amzn2022.0.1.aarch64                                                                                                              20/20 
  Running scriptlet: java-11-amazon-corretto-devel-1:11.0.17+8-1.amzn2022.aarch64                                                                                           20/20 
  Verifying        : javapackages-filesystem-6.0.0-7.amzn2022.0.4.noarch                                                                                                     1/20 
  Verifying        : dejavu-serif-fonts-2.37-16.amzn2022.0.1.noarch                                                                                                          2/20 
  Verifying        : dejavu-sans-mono-fonts-2.37-16.amzn2022.0.1.noarch                                                                                                      3/20 
  Verifying        : google-noto-fonts-common-20201206-2.amzn2022.noarch                                                                                                     4/20 
  Verifying        : xml-common-0.6.3-56.amzn2022.0.1.noarch                                                                                                                 5/20 
  Verifying        : langpacks-core-font-en-3.0-21.amzn2022.0.1.noarch                                                                                                       6/20 
  Verifying        : fonts-filesystem-1:2.0.5-5.amzn2022.0.1.noarch                                                                                                          7/20 
  Verifying        : google-noto-sans-vf-fonts-20201206-2.amzn2022.noarch                                                                                                    8/20 
  Verifying        : dejavu-sans-fonts-2.37-16.amzn2022.0.1.noarch                                                                                                           9/20 
  Verifying        : graphite2-1.3.14-7.amzn2022.0.1.aarch64                                                                                                                10/20 
  Verifying        : java-11-amazon-corretto-headless-1:11.0.17+8-1.amzn2022.aarch64                                                                                        11/20 
  Verifying        : alsa-lib-1.2.7.2-1.amzn2022.0.1.aarch64                                                                                                                12/20 
  Verifying        : freetype-2.11.0-6.amzn2022.0.1.aarch64                                                                                                                 13/20 
  Verifying        : java-11-amazon-corretto-devel-1:11.0.17+8-1.amzn2022.aarch64                                                                                           14/20 
  Verifying        : libbrotli-1.0.9-4.amzn2022.0.1.aarch64                                                                                                                 15/20 
  Verifying        : chkconfig-1.15-2.amzn2022.0.1.aarch64                                                                                                                  16/20 
  Verifying        : libpng-2:1.6.37-10.amzn2022.0.1.aarch64                                                                                                                17/20 
  Verifying        : fontconfig-2.13.94-2.amzn2022.0.1.aarch64                                                                                                              18/20 
  Verifying        : harfbuzz-2.9.1-1.amzn2022.0.2.aarch64                                                                                                                  19/20 
  Verifying        : libjpeg-turbo-2.0.90-3.amzn2022.0.1.aarch64                                                                                                            20/20 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Installed:
  alsa-lib-1.2.7.2-1.amzn2022.0.1.aarch64                                                chkconfig-1.15-2.amzn2022.0.1.aarch64                                                    
  dejavu-sans-fonts-2.37-16.amzn2022.0.1.noarch                                          dejavu-sans-mono-fonts-2.37-16.amzn2022.0.1.noarch                                       
  dejavu-serif-fonts-2.37-16.amzn2022.0.1.noarch                                         fontconfig-2.13.94-2.amzn2022.0.1.aarch64                                                
  fonts-filesystem-1:2.0.5-5.amzn2022.0.1.noarch                                         freetype-2.11.0-6.amzn2022.0.1.aarch64                                                   
  google-noto-fonts-common-20201206-2.amzn2022.noarch                                    google-noto-sans-vf-fonts-20201206-2.amzn2022.noarch                                     
  graphite2-1.3.14-7.amzn2022.0.1.aarch64                                                harfbuzz-2.9.1-1.amzn2022.0.2.aarch64                                                    
  java-11-amazon-corretto-devel-1:11.0.17+8-1.amzn2022.aarch64                           java-11-amazon-corretto-headless-1:11.0.17+8-1.amzn2022.aarch64                          
  javapackages-filesystem-6.0.0-7.amzn2022.0.4.noarch                                    langpacks-core-font-en-3.0-21.amzn2022.0.1.noarch                                        
  libbrotli-1.0.9-4.amzn2022.0.1.aarch64                                                 libjpeg-turbo-2.0.90-3.amzn2022.0.1.aarch64                                              
  libpng-2:1.6.37-10.amzn2022.0.1.aarch64                                                xml-common-0.6.3-56.amzn2022.0.1.noarch                                                  

Complete!

↑Amazon Corretto 11をインストール

# java -version
openjdk version "11.0.17" 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-11.0.17.8.1 (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.17.8.1 (build 11.0.17+8-LTS, mixed mode)

httpdをインストール

Tomcatへのajpによるリクエスト転送を行うためにhttpdをインストール

# dnf install httpd
Last metadata expiration check: 0:14:14 ago on Sun 12 Mar 2023 02:50:48 PM JST.
Dependencies resolved.
==================================================================================================================================================================================
 Package                                        Architecture                       Version                                           Repository                              Size
==================================================================================================================================================================================
Installing:
 httpd                                          aarch64                            2.4.54-3.amzn2022.0.3                             amazonlinux                             47 k
Installing dependencies:
 apr                                            aarch64                            1.7.0-9.amzn2022.0.1                              amazonlinux                            117 k
 apr-util                                       aarch64                            1.6.1-16.amzn2022.0.1                             amazonlinux                             99 k
 generic-logos-httpd                            noarch                             18.0.0-12.amzn2022.0.2                            amazonlinux                             19 k
 httpd-core                                     aarch64                            2.4.54-3.amzn2022.0.3                             amazonlinux                            1.3 M
 httpd-filesystem                               noarch                             2.4.54-3.amzn2022.0.3                             amazonlinux                             13 k
 httpd-tools                                    aarch64                            2.4.54-3.amzn2022.0.3                             amazonlinux                             81 k
 mailcap                                        noarch                             2.1.49-3.amzn2022.0.2                             amazonlinux                             33 k
Installing weak dependencies:
 apr-util-bdb                                   aarch64                            1.6.1-16.amzn2022.0.1                             amazonlinux                             14 k
 apr-util-openssl                               aarch64                            1.6.1-16.amzn2022.0.1                             amazonlinux                             16 k
 mod_http2                                      aarch64                            1.15.24-1.amzn2022.0.2                            amazonlinux                            148 k
 mod_lua                                        aarch64                            2.4.54-3.amzn2022.0.3                             amazonlinux                             59 k

Transaction Summary
==================================================================================================================================================================================
Install  12 Packages

Total download size: 2.0 M
Installed size: 11 M
Is this ok [y/N]: y
Downloading Packages:
(1/12): mailcap-2.1.49-3.amzn2022.0.2.noarch.rpm                                                                                                  275 kB/s |  33 kB     00:00    
(2/12): httpd-filesystem-2.4.54-3.amzn2022.0.3.noarch.rpm                                                                                          96 kB/s |  13 kB     00:00    
(3/12): generic-logos-httpd-18.0.0-12.amzn2022.0.2.noarch.rpm                                                                                     112 kB/s |  19 kB     00:00    
(4/12): httpd-tools-2.4.54-3.amzn2022.0.3.aarch64.rpm                                                                                             905 kB/s |  81 kB     00:00    
(5/12): mod_lua-2.4.54-3.amzn2022.0.3.aarch64.rpm                                                                                                 1.2 MB/s |  59 kB     00:00    
(6/12): httpd-core-2.4.54-3.amzn2022.0.3.aarch64.rpm                                                                                               15 MB/s | 1.3 MB     00:00    
(7/12): httpd-2.4.54-3.amzn2022.0.3.aarch64.rpm                                                                                                   1.1 MB/s |  47 kB     00:00    
(8/12): apr-util-bdb-1.6.1-16.amzn2022.0.1.aarch64.rpm                                                                                            270 kB/s |  14 kB     00:00    
(9/12): apr-1.7.0-9.amzn2022.0.1.aarch64.rpm                                                                                                      1.5 MB/s | 117 kB     00:00    
(10/12): apr-util-1.6.1-16.amzn2022.0.1.aarch64.rpm                                                                                               1.8 MB/s |  99 kB     00:00    
(11/12): apr-util-openssl-1.6.1-16.amzn2022.0.1.aarch64.rpm                                                                                       391 kB/s |  16 kB     00:00    
(12/12): mod_http2-1.15.24-1.amzn2022.0.2.aarch64.rpm                                                                                             2.6 MB/s | 148 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                             4.9 MB/s | 2.0 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Installing       : apr-1.7.0-9.amzn2022.0.1.aarch64                                                                                                                        1/12 
  Installing       : apr-util-bdb-1.6.1-16.amzn2022.0.1.aarch64                                                                                                              2/12 
  Installing       : apr-util-openssl-1.6.1-16.amzn2022.0.1.aarch64                                                                                                          3/12 
  Installing       : apr-util-1.6.1-16.amzn2022.0.1.aarch64                                                                                                                  4/12 
  Installing       : mailcap-2.1.49-3.amzn2022.0.2.noarch                                                                                                                    5/12 
  Installing       : httpd-tools-2.4.54-3.amzn2022.0.3.aarch64                                                                                                               6/12 
  Running scriptlet: httpd-filesystem-2.4.54-3.amzn2022.0.3.noarch                                                                                                           7/12 
  Installing       : httpd-filesystem-2.4.54-3.amzn2022.0.3.noarch                                                                                                           7/12 
  Installing       : httpd-core-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                8/12 
  Installing       : mod_http2-1.15.24-1.amzn2022.0.2.aarch64                                                                                                                9/12 
  Installing       : generic-logos-httpd-18.0.0-12.amzn2022.0.2.noarch                                                                                                      10/12 
  Installing       : mod_lua-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                  11/12 
  Installing       : httpd-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                    12/12 
  Running scriptlet: httpd-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                    12/12 
  Verifying        : generic-logos-httpd-18.0.0-12.amzn2022.0.2.noarch                                                                                                       1/12 
  Verifying        : mailcap-2.1.49-3.amzn2022.0.2.noarch                                                                                                                    2/12 
  Verifying        : httpd-filesystem-2.4.54-3.amzn2022.0.3.noarch                                                                                                           3/12 
  Verifying        : httpd-tools-2.4.54-3.amzn2022.0.3.aarch64                                                                                                               4/12 
  Verifying        : httpd-core-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                5/12 
  Verifying        : mod_lua-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                   6/12 
  Verifying        : apr-1.7.0-9.amzn2022.0.1.aarch64                                                                                                                        7/12 
  Verifying        : httpd-2.4.54-3.amzn2022.0.3.aarch64                                                                                                                     8/12 
  Verifying        : apr-util-bdb-1.6.1-16.amzn2022.0.1.aarch64                                                                                                              9/12 
  Verifying        : apr-util-1.6.1-16.amzn2022.0.1.aarch64                                                                                                                 10/12 
  Verifying        : apr-util-openssl-1.6.1-16.amzn2022.0.1.aarch64                                                                                                         11/12 
  Verifying        : mod_http2-1.15.24-1.amzn2022.0.2.aarch64                                                                                                               12/12 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Installed:
  apr-1.7.0-9.amzn2022.0.1.aarch64                           apr-util-1.6.1-16.amzn2022.0.1.aarch64                        apr-util-bdb-1.6.1-16.amzn2022.0.1.aarch64            
  apr-util-openssl-1.6.1-16.amzn2022.0.1.aarch64             generic-logos-httpd-18.0.0-12.amzn2022.0.2.noarch             httpd-2.4.54-3.amzn2022.0.3.aarch64                   
  httpd-core-2.4.54-3.amzn2022.0.3.aarch64                   httpd-filesystem-2.4.54-3.amzn2022.0.3.noarch                 httpd-tools-2.4.54-3.amzn2022.0.3.aarch64             
  mailcap-2.1.49-3.amzn2022.0.2.noarch                       mod_http2-1.15.24-1.amzn2022.0.2.aarch64                      mod_lua-2.4.54-3.amzn2022.0.3.aarch64                 

Complete!

↑2.4系がインストールできる

# httpd -v
Server version: Apache/2.4.54 (Amazon Linux)
Server built: Oct 4 2022 00:00:00

# systemctl is-enabled httpd
disabled

# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.

# systemctl start httpd

↑バージョン確認、自動起動設定、いったん起動

↑ブラウザでパブリックIPにアクセスして「It works!」の表示を確認

Tomcat9をインストール

# dnf list | grep tomcat
tomcat-taglibs-parent.noarch                                      3-18.amzn2022                               amazonlinux  
tomcat9.noarch                                                    1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-admin-webapps.noarch                                      1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-docs-webapp.noarch                                        1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-el-3.0-api.noarch                                         1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-jsp-2.3-api.noarch                                        1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-lib.noarch                                                1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-servlet-4.0-api.noarch                                    1:9.0.64-1.amzn2022.0.1                     amazonlinux  
tomcat9-webapps.noarch                                            1:9.0.64-1.amzn2022.0.1                     amazonlinux

↑x86の頃と同様でTomcat9がインストール可能ですが、パッケージ名がtomcatではなくtomcat9となっていることを確認

# dnf install tomcat9 tomcat9-webapps
Last metadata expiration check: 0:17:32 ago on Sun 12 Mar 2023 02:50:48 PM JST.
Dependencies resolved.
==================================================================================================================================================================================
 Package                                                 Architecture                   Version                                          Repository                          Size
==================================================================================================================================================================================
Installing:
 tomcat9                                                 noarch                         1:9.0.64-1.amzn2022.0.1                          amazonlinux                         92 k
 tomcat9-webapps                                         noarch                         1:9.0.64-1.amzn2022.0.1                          amazonlinux                         82 k
Installing dependencies:
 ecj                                                     noarch                         1:4.23-1.amzn2022.0.2                            amazonlinux                        2.4 M
 java-17-amazon-corretto-headless                        aarch64                        1:17.0.5+8-1.amzn2022.1                          amazonlinux                         90 M
 javapackages-tools                                      noarch                         6.0.0-7.amzn2022.0.4                             amazonlinux                         26 k
 tomcat9-el-3.0-api                                      noarch                         1:9.0.64-1.amzn2022.0.1                          amazonlinux                        107 k
 tomcat9-jsp-2.3-api                                     noarch                         1:9.0.64-1.amzn2022.0.1                          amazonlinux                         66 k
 tomcat9-lib                                             noarch                         1:9.0.64-1.amzn2022.0.1                          amazonlinux                        5.9 M
 tomcat9-servlet-4.0-api                                 noarch                         1:9.0.64-1.amzn2022.0.1                          amazonlinux                        285 k

Transaction Summary
==================================================================================================================================================================================
Install  9 Packages

Total download size: 99 M
Installed size: 246 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): tomcat9-jsp-2.3-api-9.0.64-1.amzn2022.0.1.noarch.rpm                                                                                       474 kB/s |  66 kB     00:00    
(2/9): tomcat9-webapps-9.0.64-1.amzn2022.0.1.noarch.rpm                                                                                           497 kB/s |  82 kB     00:00    
(3/9): tomcat9-el-3.0-api-9.0.64-1.amzn2022.0.1.noarch.rpm                                                                                        631 kB/s | 107 kB     00:00    
(4/9): tomcat9-servlet-4.0-api-9.0.64-1.amzn2022.0.1.noarch.rpm                                                                                   5.1 MB/s | 285 kB     00:00    
(5/9): tomcat9-9.0.64-1.amzn2022.0.1.noarch.rpm                                                                                                   869 kB/s |  92 kB     00:00    
(6/9): javapackages-tools-6.0.0-7.amzn2022.0.4.noarch.rpm                                                                                         693 kB/s |  26 kB     00:00    
(7/9): ecj-4.23-1.amzn2022.0.2.noarch.rpm                                                                                                          17 MB/s | 2.4 MB     00:00    
(8/9): tomcat9-lib-9.0.64-1.amzn2022.0.1.noarch.rpm                                                                                                23 MB/s | 5.9 MB     00:00    
(9/9): java-17-amazon-corretto-headless-17.0.5+8-1.amzn2022.1.aarch64.rpm                                                                          76 MB/s |  90 MB     00:01    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                              62 MB/s |  99 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Installing       : java-17-amazon-corretto-headless-1:17.0.5+8-1.amzn2022.1.aarch64                                                                                         1/9 
  Running scriptlet: java-17-amazon-corretto-headless-1:17.0.5+8-1.amzn2022.1.aarch64                                                                                         1/9 
  Installing       : tomcat9-el-3.0-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                        2/9 
  Running scriptlet: tomcat9-el-3.0-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                        2/9 
  Installing       : tomcat9-servlet-4.0-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                   3/9 
  Running scriptlet: tomcat9-servlet-4.0-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                   3/9 
  Installing       : tomcat9-jsp-2.3-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                       4/9 
  Running scriptlet: tomcat9-jsp-2.3-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                       4/9 
  Installing       : ecj-1:4.23-1.amzn2022.0.2.noarch                                                                                                                         5/9 
  Installing       : tomcat9-lib-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                               6/9 
  Installing       : javapackages-tools-6.0.0-7.amzn2022.0.4.noarch                                                                                                           7/9 
  Running scriptlet: tomcat9-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                                   8/9 
  Installing       : tomcat9-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                                   8/9 
  Running scriptlet: tomcat9-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                                   8/9 
  Installing       : tomcat9-webapps-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                           9/9 
  Running scriptlet: tomcat9-webapps-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                           9/9 
  Verifying        : tomcat9-webapps-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                           1/9 
  Verifying        : tomcat9-el-3.0-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                        2/9 
  Verifying        : tomcat9-jsp-2.3-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                       3/9 
  Verifying        : tomcat9-lib-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                               4/9 
  Verifying        : tomcat9-servlet-4.0-api-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                   5/9 
  Verifying        : tomcat9-1:9.0.64-1.amzn2022.0.1.noarch                                                                                                                   6/9 
  Verifying        : ecj-1:4.23-1.amzn2022.0.2.noarch                                                                                                                         7/9 
  Verifying        : javapackages-tools-6.0.0-7.amzn2022.0.4.noarch                                                                                                           8/9 
  Verifying        : java-17-amazon-corretto-headless-1:17.0.5+8-1.amzn2022.1.aarch64                                                                                         9/9 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Installed:
  ecj-1:4.23-1.amzn2022.0.2.noarch                 java-17-amazon-corretto-headless-1:17.0.5+8-1.amzn2022.1.aarch64       javapackages-tools-6.0.0-7.amzn2022.0.4.noarch          
  tomcat9-1:9.0.64-1.amzn2022.0.1.noarch           tomcat9-el-3.0-api-1:9.0.64-1.amzn2022.0.1.noarch                      tomcat9-jsp-2.3-api-1:9.0.64-1.amzn2022.0.1.noarch      
  tomcat9-lib-1:9.0.64-1.amzn2022.0.1.noarch       tomcat9-servlet-4.0-api-1:9.0.64-1.amzn2022.0.1.noarch                 tomcat9-webapps-1:9.0.64-1.amzn2022.0.1.noarch          

Complete!

↑tomcat9とtomcat9-webappsをインストール(tomcat9-webappsは動作確認用にインストールしています。本番では不要)

※ArmのAL2022ではパッケージマネージャから標準のtomcat9をインストールしようとするとjava-17-amazon-corretto-headlessが依存関係によりインストールされてしまいました。これによってjavaのバージョンが11から17に書き換わってしまいました(とりあえず続行)。。

# java -version
openjdk version "17.0.5" 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-17.0.5.8.1 (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.5.8.1 (build 17.0.5+8-LTS, mixed mode, sharing)

# which java
/usr/bin/java

# ll /usr/bin/java
lrwxrwxrwx 1 root root 22 Mar 12 15:03 /usr/bin/java -> /etc/alternatives/java

# ll /etc/alternatives/java
lrwxrwxrwx 1 root root 53 Mar 12 15:08 /etc/alternatives/java -> /usr/lib/jvm/java-17-amazon-corretto.aarch64/bin/java

↑javaのバージョンが書き換わってしまったことについて確認。

# tomcat9 version
/usr/sbin/tomcat9: line 4: /usr/libexec/tomcat/preamble: No such file or directory
/usr/sbin/tomcat9: line 5: /lib/catalina.jar: No such file or directory

↑tomcat versionより各種バージョン情報を確認しようとしたらエラーが出てしまいました(いったん無視)

# vi /etc/tomcat9/server.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!-- APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
-    <!--
    <Connector protocol="AJP/1.3"
-               address="::1"
               port="8009"
+               secretRequired="false"
+               useBodyEncodingForURI="true"
               redirectPort="8443" />
-    -->

    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>
    </Engine>
  </Service>
</Server>

↑コメントアウトされているajpのコネクタについて修正

# pwd
/var/lib/tomcat9

# ll
total 0
drwxrwxr-x 3 root tomcat 18 Mar 12 15:08 webapps

# ll webapps/
total 0
drwxr-xr-x 3 tomcat tomcat 223 Mar 12 15:08 ROOT

↑AL2022(x86)においてパッケージマネージャからインストールしたtomcatのROOTディレクトリは/var/lib/tomcat9配下に存在する

# vi /etc/httpd/conf.d/httpd-ajp.conf
# systemctl reload httpd
ProxyRequests Off
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/

↑httpdのconf.dディレクトリに新規でajp連携のための設定ファイルを作成。
すべてのリクエストをlocalhostの8009番(tomcatが待ち受けてるポート)に向ける設定を行う。
設定作成後、httpdの設定についてリロード

# systemctl is-enabled tomcat9
disabled

# systemctl enable tomcat9
Created symlink /etc/systemd/system/multi-user.target.wants/tomcat9.service → /usr/lib/systemd/system/tomcat9.service.

# systemctl start tomcat9

# ps -ax | grep [t]omcat9
 11607 ? Ssl 0:03 /usr/lib/jvm/jre/bin/java -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -classpath /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar: -Dcatalina.base=/usr/share/tomcat9 -Dcatalina.home=/usr/share/tomcat9 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat9/temp -Djava.util.logging.config.file=/usr/share/tomcat9/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start

↑tomcatについて自動起動設定を行い、起動

↑tomcat起動後、ブラウザでパブリックIPにアクセスしてTomcatのホーム画面が表示されることを確認。

MySQL8.0をインストール

  • MySQLはamazonlinux.repo標準ではサポートされていないためMySQL Communityのリポジトリを追加する
  • 追加するリポジトリはopensslのバージョンとの兼ね合いで変わるので注意が必要
    • 2023年3月現在、ArmのAL2022にはopensslのバージョン3系(3.0.5)が入っているためRHEL9用のリポジトリを追加する必要がありそう
# dnf search mysql
Last metadata expiration check: 0:03:13 ago on Sun 12 Mar 2023 03:19:22 PM JST.
========================================================================= Name & Summary Matched: mysql ==========================================================================
apr-util-mysql.aarch64 : APR utility library MySQL DBD driver
bind-dlz-mysql.aarch64 : BIND server mysql and mysqldyn DLZ modules
mysql-selinux.noarch : SELinux policy modules for MySQL and MariaDB packages
perl-DBD-MySQL.aarch64 : A MySQL interface for Perl
perl-DateTime-Format-MySQL.noarch : Parse and format MySQL dates and times
php8.1-mysqlnd.aarch64 : A module for PHP 8.1 applications that use MySQL databases
postfix-mysql.aarch64 : Postfix MySQL map support
============================================================================= Summary Matched: mysql =============================================================================
mariadb105-devel.aarch64 : Files for development of MariaDB/MySQL applications
mariadb105-server-utils.aarch64 : Non-essential server utilities for MariaDB/MySQL applications
perl-DBD-MariaDB.aarch64 : MariaDB and MySQL driver for the Perl5 Database Interface (DBI)

↑リポジトリ追加前、標準でインストール可能なMySQL関連のパッケージ。
mariadb10.5のパッケージが存在する(サーバーではない)。

# dnf localinstall https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm
Last metadata expiration check: 0:03:38 ago on Sun 12 Mar 2023 03:19:22 PM JST.
mysql80-community-release-el9-1.noarch.rpm                                                                                                         30 kB/s |  10 kB     00:00    
Dependencies resolved.
==================================================================================================================================================================================
 Package                                                Architecture                        Version                               Repository                                 Size
==================================================================================================================================================================================
Installing:
 mysql80-community-release                              noarch                              el9-1                                 @commandline                               10 k

Transaction Summary
==================================================================================================================================================================================
Install  1 Package

Total size: 10 k
Installed size: 5.7 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Installing       : mysql80-community-release-el9-1.noarch                                                                                                                   1/1 
  Verifying        : mysql80-community-release-el9-1.noarch                                                                                                                   1/1 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Installed:
  mysql80-community-release-el9-1.noarch                                                                                                                                          

Complete!

↑RHEL9用のリポジトリを追加

# ll /etc/yum.repos.d/
total 16
-rw-r--r--. 1 root root 968 Oct 28 05:08 amazonlinux.repo
-rw-r--r--  1 root root 951 Jul  6  2022 mysql-community-debuginfo.repo
-rw-r--r--  1 root root 827 Jul  6  2022 mysql-community.repo
-rw-r--r--  1 root root 871 Jul  6  2022 mysql-community-source.repo

# cat /etc/yum.repos.d/mysql-community.repo
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/9/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/9/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/9/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

[mysql-cluster-8.0-community]
name=MySQL Cluster 8.0 Community
baseurl=http://repo.mysql.com/yum/mysql-cluster-8.0-community/el/9/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

↑mysql-communityについてデフォルトで有効化されてることを確認

# dnf search mysql
MySQL 8.0 Community Server                                                                                                                         15 MB/s | 626 kB     00:00    
MySQL Connectors Community                                                                                                                        493 kB/s |  14 kB     00:00    
MySQL Tools Community                                                                                                                             4.5 MB/s | 186 kB     00:00    
========================================================================= Name & Summary Matched: mysql ==========================================================================
apr-util-mysql.aarch64 : APR utility library MySQL DBD driver
bind-dlz-mysql.aarch64 : BIND server mysql and mysqldyn DLZ modules
mysql-community-client.aarch64 : MySQL database client applications and tools
mysql-community-client-plugins.aarch64 : Shared plugins for MySQL client applications
mysql-community-common.aarch64 : MySQL database common files for server and client libs
mysql-community-debugsource.aarch64 : Debug sources for package mysql-community
mysql-community-devel.aarch64 : Development header files and libraries for MySQL database client applications
mysql-community-icu-data-files.aarch64 : MySQL packaging of ICU data files
mysql-community-libs.aarch64 : Shared libraries for MySQL database client applications
mysql-community-server-debug.aarch64 : The debug version of MySQL server
mysql-community-test.aarch64 : Test suite for the MySQL database server
mysql-connector-c++.aarch64 : MySQL database connector for C++
mysql-connector-c++-debugsource.aarch64 : Debug sources for package mysql-connector-c++
mysql-connector-c++-devel.aarch64 : Development header files and libraries for MySQL C++ client applications
mysql-connector-c++-jdbc.aarch64 : MySQL Driver for C++ which mimics the JDBC 4.0 API
mysql-connector-j.noarch : Standardized MySQL database driver for Java
mysql-connector-odbc.aarch64 : An ODBC 8.0 driver for MySQL - driver package
mysql-connector-odbc-debugsource.aarch64 : Debug sources for package mysql-connector-odbc
mysql-connector-odbc-setup.aarch64 : An ODBC 8.0 driver for MySQL - setup library
mysql-connector-python3.aarch64 : Standardized MySQL database driver for Python 3
mysql-router-community.aarch64 : MySQL Router
mysql-selinux.noarch : SELinux policy modules for MySQL and MariaDB packages
mysql-shell.aarch64 : Command line shell and scripting environment for MySQL
mysql-shell-debugsource.aarch64 : Debug sources for package mysql-shell
mysql80-community-release.noarch : MySQL repository configuration for yum
perl-DBD-MySQL.aarch64 : A MySQL interface for Perl
perl-DateTime-Format-MySQL.noarch : Parse and format MySQL dates and times
php8.1-mysqlnd.aarch64 : A module for PHP 8.1 applications that use MySQL databases
postfix-mysql.aarch64 : Postfix MySQL map support
============================================================================== Name Matched: mysql ===============================================================================
mysql-community-server.aarch64 : A very fast and reliable SQL database server
============================================================================= Summary Matched: mysql =============================================================================
mariadb105-devel.aarch64 : Files for development of MariaDB/MySQL applications
mariadb105-server-utils.aarch64 : Non-essential server utilities for MariaDB/MySQL applications
perl-DBD-MariaDB.aarch64 : MariaDB and MySQL driver for the Perl5 Database Interface (DBI)

↑リポジトリ追加前と比べてmysql-community-serverなどのパッケージが追加されたことを確認

# dnf install mysql-community-server
Last metadata expiration check: 0:00:30 ago on Sun 12 Mar 2023 03:24:28 PM JST.
Dependencies resolved.
==================================================================================================================================================================================
 Package                                             Architecture                 Version                                            Repository                              Size
==================================================================================================================================================================================
Installing:
 mysql-community-server                              aarch64                      8.0.32-1.el9                                       mysql80-community                       48 M
Installing dependencies:
 libaio                                              aarch64                      0.3.111-11.amzn2022.0.1                            amazonlinux                             25 k
 mysql-community-client                              aarch64                      8.0.32-1.el9                                       mysql80-community                      3.7 M
 mysql-community-client-plugins                      aarch64                      8.0.32-1.el9                                       mysql80-community                      1.3 M
 mysql-community-common                              aarch64                      8.0.32-1.el9                                       mysql80-community                      544 k
 mysql-community-icu-data-files                      aarch64                      8.0.32-1.el9                                       mysql80-community                      2.2 M
 mysql-community-libs                                aarch64                      8.0.32-1.el9                                       mysql80-community                      1.5 M
 perl-AutoLoader                                     noarch                       5.74-477.amzn2022.0.2                              amazonlinux                             23 k
 perl-B                                              aarch64                      1.80-477.amzn2022.0.2                              amazonlinux                            182 k
 perl-Carp                                           noarch                       1.50-458.amzn2022.0.1                              amazonlinux                             29 k
 perl-Class-Struct                                   noarch                       0.66-477.amzn2022.0.2                              amazonlinux                             24 k
 perl-Data-Dumper                                    aarch64                      2.174-460.amzn2022.0.1                             amazonlinux                             55 k
 perl-Digest                                         noarch                       1.20-1.amzn2022.0.1                                amazonlinux                             26 k
 perl-Digest-MD5                                     aarch64                      2.58-2.amzn2022.0.1                                amazonlinux                             37 k
 perl-DynaLoader                                     aarch64                      1.47-477.amzn2022.0.2                              amazonlinux                             28 k
 perl-Encode                                         aarch64                      4:3.15-462.amzn2022.0.1                            amazonlinux                            1.7 M
 perl-Errno                                          aarch64                      1.30-477.amzn2022.0.2                              amazonlinux                             17 k
 perl-Exporter                                       noarch                       5.74-459.amzn2022.0.1                              amazonlinux                             32 k
 perl-Fcntl                                          aarch64                      1.13-477.amzn2022.0.2                              amazonlinux                             23 k
 perl-File-Basename                                  noarch                       2.85-477.amzn2022.0.2                              amazonlinux                             19 k
 perl-File-Path                                      noarch                       2.18-2.amzn2022.0.1                                amazonlinux                             36 k
 perl-File-Temp                                      noarch                       1:0.231.100-2.amzn2022.0.1                         amazonlinux                             60 k
 perl-File-stat                                      noarch                       1.09-477.amzn2022.0.2                              amazonlinux                             19 k
 perl-FileHandle                                     noarch                       2.03-477.amzn2022.0.2                              amazonlinux                             18 k
 perl-Getopt-Long                                    noarch                       1:2.52-2.amzn2022.0.1                              amazonlinux                             60 k
 perl-Getopt-Std                                     noarch                       1.12-477.amzn2022.0.2                              amazonlinux                             18 k
 perl-HTTP-Tiny                                      noarch                       0.078-1.amzn2022.0.1                               amazonlinux                             56 k
 perl-IO                                             aarch64                      1.43-477.amzn2022.0.2                              amazonlinux                             89 k
 perl-IPC-Open3                                      noarch                       1.21-477.amzn2022.0.2                              amazonlinux                             25 k
 perl-MIME-Base64                                    aarch64                      3.16-2.amzn2022.0.1                                amazonlinux                             31 k
 perl-Net-SSLeay                                     aarch64                      1.92-2.amzn2022.0.1                                amazonlinux                            368 k
 perl-POSIX                                          aarch64                      1.94-477.amzn2022.0.2                              amazonlinux                             99 k
 perl-PathTools                                      aarch64                      3.78-459.amzn2022.0.1                              amazonlinux                             85 k
 perl-Pod-Escapes                                    noarch                       1:1.07-458.amzn2022.0.1                            amazonlinux                             20 k
 perl-Pod-Perldoc                                    noarch                       3.28.01-459.amzn2022.0.1                           amazonlinux                             84 k
 perl-Pod-Simple                                     noarch                       1:3.42-2.amzn2022.0.1                              amazonlinux                            215 k
 perl-Pod-Usage                                      noarch                       4:2.01-2.amzn2022.0.1                              amazonlinux                             41 k
 perl-Scalar-List-Utils                              aarch64                      4:1.56-459.amzn2022.0.1                            amazonlinux                             70 k
 perl-SelectSaver                                    noarch                       1.02-477.amzn2022.0.2                              amazonlinux                             14 k
 perl-Socket                                         aarch64                      4:2.032-1.amzn2022.0.1                             amazonlinux                             55 k
 perl-Storable                                       aarch64                      1:3.21-458.amzn2022.0.1                            amazonlinux                             94 k
 perl-Symbol                                         noarch                       1.08-477.amzn2022.0.2                              amazonlinux                             16 k
 perl-Term-ANSIColor                                 noarch                       5.01-459.amzn2022.0.1                              amazonlinux                             48 k
 perl-Term-Cap                                       noarch                       1.17-458.amzn2022.0.1                              amazonlinux                             22 k
 perl-Text-ParseWords                                noarch                       3.30-458.amzn2022.0.1                              amazonlinux                             17 k
 perl-Text-Tabs+Wrap                                 noarch                       2021.0726-1.amzn2022                               amazonlinux                             23 k
 perl-Time-Local                                     noarch                       2:1.300-5.amzn2022.0.1                             amazonlinux                             34 k
 perl-URI                                            noarch                       5.09-1.amzn2022.0.1                                amazonlinux                            109 k
 perl-base                                           noarch                       2.27-477.amzn2022.0.2                              amazonlinux                             18 k
 perl-constant                                       noarch                       1.33-459.amzn2022.0.1                              amazonlinux                             23 k
 perl-if                                             noarch                       0.60.800-477.amzn2022.0.2                          amazonlinux                             16 k
 perl-interpreter                                    aarch64                      4:5.32.1-477.amzn2022.0.2                          amazonlinux                             73 k
 perl-libnet                                         noarch                       3.13-2.amzn2022.0.1                                amazonlinux                            126 k
 perl-libs                                           aarch64                      4:5.32.1-477.amzn2022.0.2                          amazonlinux                            2.0 M
 perl-mro                                            aarch64                      1.23-477.amzn2022.0.2                              amazonlinux                             30 k
 perl-overload                                       noarch                       1.31-477.amzn2022.0.2                              amazonlinux                             48 k
 perl-overloading                                    noarch                       0.02-477.amzn2022.0.2                              amazonlinux                             15 k
 perl-parent                                         noarch                       1:0.238-458.amzn2022.0.1                           amazonlinux                             15 k
 perl-podlators                                      noarch                       1:4.14-458.amzn2022.0.1                            amazonlinux                            112 k
 perl-subs                                           noarch                       1.03-477.amzn2022.0.2                              amazonlinux                             14 k
 perl-vars                                           noarch                       1.05-477.amzn2022.0.2                              amazonlinux                             15 k
Installing weak dependencies:
 perl-IO-Socket-IP                                   noarch                       0.41-3.amzn2022.0.1                                amazonlinux                             42 k
 perl-IO-Socket-SSL                                  noarch                       2.070-2.amzn2022                                   amazonlinux                            215 k
 perl-Mozilla-CA                                     noarch                       20200520-4.amzn2022.0.1                            amazonlinux                             13 k
 perl-NDBM_File                                      aarch64                      1.15-477.amzn2022.0.2                              amazonlinux                             24 k

Transaction Summary
==================================================================================================================================================================================
Install  65 Packages

Total download size: 64 M
Installed size: 356 M
Is this ok [y/N]: y
Downloading Packages:
(1/65): perl-IO-Socket-IP-0.41-3.amzn2022.0.1.noarch.rpm                                                                                          294 kB/s |  42 kB     00:00    
(2/65): perl-Getopt-Long-2.52-2.amzn2022.0.1.noarch.rpm                                                                                           406 kB/s |  60 kB     00:00    
(3/65): perl-vars-1.05-477.amzn2022.0.2.noarch.rpm                                                                                                 89 kB/s |  15 kB     00:00    
(4/65): perl-if-0.60.800-477.amzn2022.0.2.noarch.rpm                                                                                              286 kB/s |  16 kB     00:00    
(5/65): perl-Mozilla-CA-20200520-4.amzn2022.0.1.noarch.rpm                                                                                        238 kB/s |  13 kB     00:00    
(6/65): perl-base-2.27-477.amzn2022.0.2.noarch.rpm                                                                                                904 kB/s |  18 kB     00:00    
(7/65): perl-IO-Socket-SSL-2.070-2.amzn2022.noarch.rpm                                                                                            3.6 MB/s | 215 kB     00:00    
(8/65): perl-Pod-Usage-2.01-2.amzn2022.0.1.noarch.rpm                                                                                             1.0 MB/s |  41 kB     00:00    
(9/65): perl-constant-1.33-459.amzn2022.0.1.noarch.rpm                                                                                            726 kB/s |  23 kB     00:00    
(10/65): perl-parent-0.238-458.amzn2022.0.1.noarch.rpm                                                                                            386 kB/s |  15 kB     00:00    
(11/65): perl-Class-Struct-0.66-477.amzn2022.0.2.noarch.rpm                                                                                       694 kB/s |  24 kB     00:00    
(12/65): perl-Exporter-5.74-459.amzn2022.0.1.noarch.rpm                                                                                           781 kB/s |  32 kB     00:00    
(13/65): perl-Pod-Simple-3.42-2.amzn2022.0.1.noarch.rpm                                                                                           3.0 MB/s | 215 kB     00:00    
(14/65): perl-subs-1.03-477.amzn2022.0.2.noarch.rpm                                                                                               454 kB/s |  14 kB     00:00    
(15/65): perl-File-Temp-0.231.100-2.amzn2022.0.1.noarch.rpm                                                                                       2.0 MB/s |  60 kB     00:00    
(16/65): perl-File-Basename-2.85-477.amzn2022.0.2.noarch.rpm                                                                                      286 kB/s |  19 kB     00:00    
(17/65): perl-HTTP-Tiny-0.078-1.amzn2022.0.1.noarch.rpm                                                                                           1.1 MB/s |  56 kB     00:00    
(18/65): perl-Term-ANSIColor-5.01-459.amzn2022.0.1.noarch.rpm                                                                                     524 kB/s |  48 kB     00:00    
(19/65): perl-IPC-Open3-1.21-477.amzn2022.0.2.noarch.rpm                                                                                          683 kB/s |  25 kB     00:00    
(20/65): perl-Getopt-Std-1.12-477.amzn2022.0.2.noarch.rpm                                                                                         517 kB/s |  18 kB     00:00    
(21/65): perl-SelectSaver-1.02-477.amzn2022.0.2.noarch.rpm                                                                                        465 kB/s |  14 kB     00:00    
(22/65): perl-Carp-1.50-458.amzn2022.0.1.noarch.rpm                                                                                               718 kB/s |  29 kB     00:00    
(23/65): perl-Term-Cap-1.17-458.amzn2022.0.1.noarch.rpm                                                                                           428 kB/s |  22 kB     00:00    
(24/65): perl-Symbol-1.08-477.amzn2022.0.2.noarch.rpm                                                                                             458 kB/s |  16 kB     00:00    
(25/65): perl-Pod-Perldoc-3.28.01-459.amzn2022.0.1.noarch.rpm                                                                                     1.3 MB/s |  84 kB     00:00    
(26/65): perl-overloading-0.02-477.amzn2022.0.2.noarch.rpm                                                                                        350 kB/s |  15 kB     00:00    
(27/65): perl-File-stat-1.09-477.amzn2022.0.2.noarch.rpm                                                                                          520 kB/s |  19 kB     00:00    
(28/65): perl-Digest-1.20-1.amzn2022.0.1.noarch.rpm                                                                                               1.0 MB/s |  26 kB     00:00    
(29/65): perl-libnet-3.13-2.amzn2022.0.1.noarch.rpm                                                                                               1.4 MB/s | 126 kB     00:00    
(30/65): perl-AutoLoader-5.74-477.amzn2022.0.2.noarch.rpm                                                                                         496 kB/s |  23 kB     00:00    
(31/65): perl-Text-ParseWords-3.30-458.amzn2022.0.1.noarch.rpm                                                                                    329 kB/s |  17 kB     00:00    
(32/65): perl-overload-1.31-477.amzn2022.0.2.noarch.rpm                                                                                           1.4 MB/s |  48 kB     00:00    
(33/65): perl-podlators-4.14-458.amzn2022.0.1.noarch.rpm                                                                                          1.5 MB/s | 112 kB     00:00    
(34/65): perl-Time-Local-1.300-5.amzn2022.0.1.noarch.rpm                                                                                          1.1 MB/s |  34 kB     00:00    
(35/65): perl-FileHandle-2.03-477.amzn2022.0.2.noarch.rpm                                                                                         317 kB/s |  18 kB     00:00    
(36/65): perl-Text-Tabs+Wrap-2021.0726-1.amzn2022.noarch.rpm                                                                                      297 kB/s |  23 kB     00:00    
(37/65): perl-File-Path-2.18-2.amzn2022.0.1.noarch.rpm                                                                                            816 kB/s |  36 kB     00:00    
(38/65): perl-Pod-Escapes-1.07-458.amzn2022.0.1.noarch.rpm                                                                                        499 kB/s |  20 kB     00:00    
(39/65): perl-URI-5.09-1.amzn2022.0.1.noarch.rpm                                                                                                  1.5 MB/s | 109 kB     00:00    
(40/65): perl-mro-1.23-477.amzn2022.0.2.aarch64.rpm                                                                                               806 kB/s |  30 kB     00:00    
(41/65): perl-PathTools-3.78-459.amzn2022.0.1.aarch64.rpm                                                                                         1.0 MB/s |  85 kB     00:00    
(42/65): perl-Socket-2.032-1.amzn2022.0.1.aarch64.rpm                                                                                             1.2 MB/s |  55 kB     00:00    
(43/65): perl-Storable-3.21-458.amzn2022.0.1.aarch64.rpm                                                                                          1.0 MB/s |  94 kB     00:00    
(44/65): perl-MIME-Base64-3.16-2.amzn2022.0.1.aarch64.rpm                                                                                         996 kB/s |  31 kB     00:00    
(45/65): perl-DynaLoader-1.47-477.amzn2022.0.2.aarch64.rpm                                                                                        711 kB/s |  28 kB     00:00    
(46/65): perl-libs-5.32.1-477.amzn2022.0.2.aarch64.rpm                                                                                             19 MB/s | 2.0 MB     00:00    
(47/65): perl-Encode-3.15-462.amzn2022.0.1.aarch64.rpm                                                                                             15 MB/s | 1.7 MB     00:00    
(48/65): perl-Scalar-List-Utils-1.56-459.amzn2022.0.1.aarch64.rpm                                                                                 957 kB/s |  70 kB     00:00    
(49/65): perl-Net-SSLeay-1.92-2.amzn2022.0.1.aarch64.rpm                                                                                          5.3 MB/s | 368 kB     00:00    
(50/65): libaio-0.3.111-11.amzn2022.0.1.aarch64.rpm                                                                                               481 kB/s |  25 kB     00:00    
(51/65): perl-Fcntl-1.13-477.amzn2022.0.2.aarch64.rpm                                                                                             451 kB/s |  23 kB     00:00    
(52/65): perl-Digest-MD5-2.58-2.amzn2022.0.1.aarch64.rpm                                                                                          861 kB/s |  37 kB     00:00    
(53/65): perl-POSIX-1.94-477.amzn2022.0.2.aarch64.rpm                                                                                             1.6 MB/s |  99 kB     00:00    
(54/65): perl-B-1.80-477.amzn2022.0.2.aarch64.rpm                                                                                                 2.7 MB/s | 182 kB     00:00    
(55/65): perl-interpreter-5.32.1-477.amzn2022.0.2.aarch64.rpm                                                                                     1.1 MB/s |  73 kB     00:00    
(56/65): perl-Data-Dumper-2.174-460.amzn2022.0.1.aarch64.rpm                                                                                      1.3 MB/s |  55 kB     00:00    
(57/65): perl-NDBM_File-1.15-477.amzn2022.0.2.aarch64.rpm                                                                                         688 kB/s |  24 kB     00:00    
(58/65): perl-Errno-1.30-477.amzn2022.0.2.aarch64.rpm                                                                                             405 kB/s |  17 kB     00:00    
(59/65): mysql-community-client-plugins-8.0.32-1.el9.aarch64.rpm                                                                                   49 MB/s | 1.3 MB     00:00    
(60/65): mysql-community-common-8.0.32-1.el9.aarch64.rpm                                                                                           42 MB/s | 544 kB     00:00    
(61/65): mysql-community-client-8.0.32-1.el9.aarch64.rpm                                                                                           48 MB/s | 3.7 MB     00:00    
(62/65): mysql-community-icu-data-files-8.0.32-1.el9.aarch64.rpm                                                                                   40 MB/s | 2.2 MB     00:00    
(63/65): mysql-community-libs-8.0.32-1.el9.aarch64.rpm                                                                                             31 MB/s | 1.5 MB     00:00    
(64/65): perl-IO-1.43-477.amzn2022.0.2.aarch64.rpm                                                                                                637 kB/s |  89 kB     00:00    
(65/65): mysql-community-server-8.0.32-1.el9.aarch64.rpm                                                                                          122 MB/s |  48 MB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                              38 MB/s |  64 MB     00:01     
MySQL 8.0 Community Server                                                                                                                        3.0 MB/s | 3.1 kB     00:00    
Importing GPG key 0x3A79BD29:
 Userid     : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
 Fingerprint: 859B E8D7 C586 F538 430B 19C2 467B 942D 3A79 BD29
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Installing       : perl-Digest-1.20-1.amzn2022.0.1.noarch                                                                                                                  1/65 
  Installing       : perl-Digest-MD5-2.58-2.amzn2022.0.1.aarch64                                                                                                             2/65 
  Installing       : perl-B-1.80-477.amzn2022.0.2.aarch64                                                                                                                    3/65 
  Installing       : perl-FileHandle-2.03-477.amzn2022.0.2.noarch                                                                                                            4/65 
  Installing       : perl-AutoLoader-5.74-477.amzn2022.0.2.noarch                                                                                                            5/65 
  Installing       : perl-Data-Dumper-2.174-460.amzn2022.0.1.aarch64                                                                                                         6/65 
  Installing       : perl-libnet-3.13-2.amzn2022.0.1.noarch                                                                                                                  7/65 
  Installing       : perl-base-2.27-477.amzn2022.0.2.noarch                                                                                                                  8/65 
  Installing       : perl-Net-SSLeay-1.92-2.amzn2022.0.1.aarch64                                                                                                             9/65 
  Installing       : perl-URI-5.09-1.amzn2022.0.1.noarch                                                                                                                    10/65 
  Installing       : perl-if-0.60.800-477.amzn2022.0.2.noarch                                                                                                               11/65 
  Installing       : perl-Text-Tabs+Wrap-2021.0726-1.amzn2022.noarch                                                                                                        12/65 
  Installing       : perl-Time-Local-2:1.300-5.amzn2022.0.1.noarch                                                                                                          13/65 
  Installing       : perl-Pod-Escapes-1:1.07-458.amzn2022.0.1.noarch                                                                                                        14/65 
  Installing       : perl-Mozilla-CA-20200520-4.amzn2022.0.1.noarch                                                                                                         15/65 
  Installing       : perl-File-Path-2.18-2.amzn2022.0.1.noarch                                                                                                              16/65 
  Installing       : perl-IO-Socket-SSL-2.070-2.amzn2022.noarch                                                                                                             17/65 
  Installing       : perl-IO-Socket-IP-0.41-3.amzn2022.0.1.noarch                                                                                                           18/65 
  Installing       : perl-subs-1.03-477.amzn2022.0.2.noarch                                                                                                                 19/65 
  Installing       : perl-Class-Struct-0.66-477.amzn2022.0.2.noarch                                                                                                         20/65 
  Installing       : perl-Term-ANSIColor-5.01-459.amzn2022.0.1.noarch                                                                                                       21/65 
  Installing       : perl-Term-Cap-1.17-458.amzn2022.0.1.noarch                                                                                                             22/65 
  Installing       : perl-POSIX-1.94-477.amzn2022.0.2.aarch64                                                                                                               23/65 
  Installing       : perl-Pod-Simple-1:3.42-2.amzn2022.0.1.noarch                                                                                                           24/65 
  Installing       : perl-File-Temp-1:0.231.100-2.amzn2022.0.1.noarch                                                                                                       25/65 
  Installing       : perl-IPC-Open3-1.21-477.amzn2022.0.2.noarch                                                                                                            26/65 
  Installing       : perl-HTTP-Tiny-0.078-1.amzn2022.0.1.noarch                                                                                                             27/65 
  Installing       : perl-SelectSaver-1.02-477.amzn2022.0.2.noarch                                                                                                          28/65 
  Installing       : perl-Symbol-1.08-477.amzn2022.0.2.noarch                                                                                                               29/65 
  Installing       : perl-Socket-4:2.032-1.amzn2022.0.1.aarch64                                                                                                             30/65 
  Installing       : perl-File-stat-1.09-477.amzn2022.0.2.noarch                                                                                                            31/65 
  Installing       : perl-podlators-1:4.14-458.amzn2022.0.1.noarch                                                                                                          32/65 
  Installing       : perl-Pod-Perldoc-3.28.01-459.amzn2022.0.1.noarch                                                                                                       33/65 
  Installing       : perl-overloading-0.02-477.amzn2022.0.2.noarch                                                                                                          34/65 
  Installing       : perl-Text-ParseWords-3.30-458.amzn2022.0.1.noarch                                                                                                      35/65 
  Installing       : perl-mro-1.23-477.amzn2022.0.2.aarch64                                                                                                                 36/65 
  Installing       : perl-Fcntl-1.13-477.amzn2022.0.2.aarch64                                                                                                               37/65 
  Installing       : perl-IO-1.43-477.amzn2022.0.2.aarch64                                                                                                                  38/65 
  Installing       : perl-Pod-Usage-4:2.01-2.amzn2022.0.1.noarch                                                                                                            39/65 
  Installing       : perl-parent-1:0.238-458.amzn2022.0.1.noarch                                                                                                            40/65 
  Installing       : perl-vars-1.05-477.amzn2022.0.2.noarch                                                                                                                 41/65 
  Installing       : perl-constant-1.33-459.amzn2022.0.1.noarch                                                                                                             42/65 
  Installing       : perl-Getopt-Std-1.12-477.amzn2022.0.2.noarch                                                                                                           43/65 
  Installing       : perl-File-Basename-2.85-477.amzn2022.0.2.noarch                                                                                                        44/65 
  Installing       : perl-MIME-Base64-3.16-2.amzn2022.0.1.aarch64                                                                                                           45/65 
  Installing       : perl-overload-1.31-477.amzn2022.0.2.noarch                                                                                                             46/65 
  Installing       : perl-Scalar-List-Utils-4:1.56-459.amzn2022.0.1.aarch64                                                                                                 47/65 
  Installing       : perl-Errno-1.30-477.amzn2022.0.2.aarch64                                                                                                               48/65 
  Installing       : perl-Storable-1:3.21-458.amzn2022.0.1.aarch64                                                                                                          49/65 
  Installing       : perl-Getopt-Long-1:2.52-2.amzn2022.0.1.noarch                                                                                                          50/65 
  Installing       : perl-Exporter-5.74-459.amzn2022.0.1.noarch                                                                                                             51/65 
  Installing       : perl-Carp-1.50-458.amzn2022.0.1.noarch                                                                                                                 52/65 
  Installing       : perl-DynaLoader-1.47-477.amzn2022.0.2.aarch64                                                                                                          53/65 
  Installing       : perl-NDBM_File-1.15-477.amzn2022.0.2.aarch64                                                                                                           54/65 
  Installing       : perl-PathTools-3.78-459.amzn2022.0.1.aarch64                                                                                                           55/65 
  Installing       : perl-Encode-4:3.15-462.amzn2022.0.1.aarch64                                                                                                            56/65 
  Installing       : perl-libs-4:5.32.1-477.amzn2022.0.2.aarch64                                                                                                            57/65 
  Installing       : perl-interpreter-4:5.32.1-477.amzn2022.0.2.aarch64                                                                                                     58/65 
  Installing       : mysql-community-common-8.0.32-1.el9.aarch64                                                                                                            59/65 
  Installing       : mysql-community-client-plugins-8.0.32-1.el9.aarch64                                                                                                    60/65 
  Installing       : mysql-community-libs-8.0.32-1.el9.aarch64                                                                                                              61/65 
  Running scriptlet: mysql-community-libs-8.0.32-1.el9.aarch64                                                                                                              61/65 
  Installing       : mysql-community-client-8.0.32-1.el9.aarch64                                                                                                            62/65 
  Installing       : mysql-community-icu-data-files-8.0.32-1.el9.aarch64                                                                                                    63/65 
  Installing       : libaio-0.3.111-11.amzn2022.0.1.aarch64                                                                                                                 64/65 
  Running scriptlet: mysql-community-server-8.0.32-1.el9.aarch64                                                                                                            65/65 
  Installing       : mysql-community-server-8.0.32-1.el9.aarch64                                                                                                            65/65 
  Running scriptlet: mysql-community-server-8.0.32-1.el9.aarch64                                                                                                            65/65 
  Verifying        : perl-IO-Socket-IP-0.41-3.amzn2022.0.1.noarch                                                                                                            1/65 
  Verifying        : perl-vars-1.05-477.amzn2022.0.2.noarch                                                                                                                  2/65 
  Verifying        : perl-Getopt-Long-1:2.52-2.amzn2022.0.1.noarch                                                                                                           3/65 
  Verifying        : perl-if-0.60.800-477.amzn2022.0.2.noarch                                                                                                                4/65 
  Verifying        : perl-Mozilla-CA-20200520-4.amzn2022.0.1.noarch                                                                                                          5/65 
  Verifying        : perl-IO-Socket-SSL-2.070-2.amzn2022.noarch                                                                                                              6/65 
  Verifying        : perl-base-2.27-477.amzn2022.0.2.noarch                                                                                                                  7/65 
  Verifying        : perl-Pod-Usage-4:2.01-2.amzn2022.0.1.noarch                                                                                                             8/65 
  Verifying        : perl-constant-1.33-459.amzn2022.0.1.noarch                                                                                                              9/65 
  Verifying        : perl-parent-1:0.238-458.amzn2022.0.1.noarch                                                                                                            10/65 
  Verifying        : perl-Pod-Simple-1:3.42-2.amzn2022.0.1.noarch                                                                                                           11/65 
  Verifying        : perl-Class-Struct-0.66-477.amzn2022.0.2.noarch                                                                                                         12/65 
  Verifying        : perl-Exporter-5.74-459.amzn2022.0.1.noarch                                                                                                             13/65 
  Verifying        : perl-subs-1.03-477.amzn2022.0.2.noarch                                                                                                                 14/65 
  Verifying        : perl-File-Temp-1:0.231.100-2.amzn2022.0.1.noarch                                                                                                       15/65 
  Verifying        : perl-File-Basename-2.85-477.amzn2022.0.2.noarch                                                                                                        16/65 
  Verifying        : perl-Term-ANSIColor-5.01-459.amzn2022.0.1.noarch                                                                                                       17/65 
  Verifying        : perl-HTTP-Tiny-0.078-1.amzn2022.0.1.noarch                                                                                                             18/65 
  Verifying        : perl-IPC-Open3-1.21-477.amzn2022.0.2.noarch                                                                                                            19/65 
  Verifying        : perl-Getopt-Std-1.12-477.amzn2022.0.2.noarch                                                                                                           20/65 
  Verifying        : perl-SelectSaver-1.02-477.amzn2022.0.2.noarch                                                                                                          21/65 
  Verifying        : perl-Carp-1.50-458.amzn2022.0.1.noarch                                                                                                                 22/65 
  Verifying        : perl-Term-Cap-1.17-458.amzn2022.0.1.noarch                                                                                                             23/65 
  Verifying        : perl-Pod-Perldoc-3.28.01-459.amzn2022.0.1.noarch                                                                                                       24/65 
  Verifying        : perl-Symbol-1.08-477.amzn2022.0.2.noarch                                                                                                               25/65 
  Verifying        : perl-libnet-3.13-2.amzn2022.0.1.noarch                                                                                                                 26/65 
  Verifying        : perl-overloading-0.02-477.amzn2022.0.2.noarch                                                                                                          27/65 
  Verifying        : perl-File-stat-1.09-477.amzn2022.0.2.noarch                                                                                                            28/65 
  Verifying        : perl-Digest-1.20-1.amzn2022.0.1.noarch                                                                                                                 29/65 
  Verifying        : perl-AutoLoader-5.74-477.amzn2022.0.2.noarch                                                                                                           30/65 
  Verifying        : perl-Text-ParseWords-3.30-458.amzn2022.0.1.noarch                                                                                                      31/65 
  Verifying        : perl-podlators-1:4.14-458.amzn2022.0.1.noarch                                                                                                          32/65 
  Verifying        : perl-overload-1.31-477.amzn2022.0.2.noarch                                                                                                             33/65 
  Verifying        : perl-Text-Tabs+Wrap-2021.0726-1.amzn2022.noarch                                                                                                        34/65 
  Verifying        : perl-FileHandle-2.03-477.amzn2022.0.2.noarch                                                                                                           35/65 
  Verifying        : perl-Time-Local-2:1.300-5.amzn2022.0.1.noarch                                                                                                          36/65 
  Verifying        : perl-File-Path-2.18-2.amzn2022.0.1.noarch                                                                                                              37/65 
  Verifying        : perl-URI-5.09-1.amzn2022.0.1.noarch                                                                                                                    38/65 
  Verifying        : perl-Pod-Escapes-1:1.07-458.amzn2022.0.1.noarch                                                                                                        39/65 
  Verifying        : perl-PathTools-3.78-459.amzn2022.0.1.aarch64                                                                                                           40/65 
  Verifying        : perl-mro-1.23-477.amzn2022.0.2.aarch64                                                                                                                 41/65 
  Verifying        : perl-Storable-1:3.21-458.amzn2022.0.1.aarch64                                                                                                          42/65 
  Verifying        : perl-Socket-4:2.032-1.amzn2022.0.1.aarch64                                                                                                             43/65 
  Verifying        : perl-libs-4:5.32.1-477.amzn2022.0.2.aarch64                                                                                                            44/65 
  Verifying        : perl-MIME-Base64-3.16-2.amzn2022.0.1.aarch64                                                                                                           45/65 
  Verifying        : perl-Encode-4:3.15-462.amzn2022.0.1.aarch64                                                                                                            46/65 
  Verifying        : perl-DynaLoader-1.47-477.amzn2022.0.2.aarch64                                                                                                          47/65 
  Verifying        : perl-Scalar-List-Utils-4:1.56-459.amzn2022.0.1.aarch64                                                                                                 48/65 
  Verifying        : perl-Net-SSLeay-1.92-2.amzn2022.0.1.aarch64                                                                                                            49/65 
  Verifying        : libaio-0.3.111-11.amzn2022.0.1.aarch64                                                                                                                 50/65 
  Verifying        : perl-Fcntl-1.13-477.amzn2022.0.2.aarch64                                                                                                               51/65 
  Verifying        : perl-Digest-MD5-2.58-2.amzn2022.0.1.aarch64                                                                                                            52/65 
  Verifying        : perl-POSIX-1.94-477.amzn2022.0.2.aarch64                                                                                                               53/65 
  Verifying        : perl-B-1.80-477.amzn2022.0.2.aarch64                                                                                                                   54/65 
  Verifying        : perl-interpreter-4:5.32.1-477.amzn2022.0.2.aarch64                                                                                                     55/65 
  Verifying        : perl-Data-Dumper-2.174-460.amzn2022.0.1.aarch64                                                                                                        56/65 
  Verifying        : perl-NDBM_File-1.15-477.amzn2022.0.2.aarch64                                                                                                           57/65 
  Verifying        : perl-Errno-1.30-477.amzn2022.0.2.aarch64                                                                                                               58/65 
  Verifying        : perl-IO-1.43-477.amzn2022.0.2.aarch64                                                                                                                  59/65 
  Verifying        : mysql-community-client-8.0.32-1.el9.aarch64                                                                                                            60/65 
  Verifying        : mysql-community-client-plugins-8.0.32-1.el9.aarch64                                                                                                    61/65 
  Verifying        : mysql-community-common-8.0.32-1.el9.aarch64                                                                                                            62/65 
  Verifying        : mysql-community-icu-data-files-8.0.32-1.el9.aarch64                                                                                                    63/65 
  Verifying        : mysql-community-libs-8.0.32-1.el9.aarch64                                                                                                              64/65 
  Verifying        : mysql-community-server-8.0.32-1.el9.aarch64                                                                                                            65/65 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Installed:
  libaio-0.3.111-11.amzn2022.0.1.aarch64                  mysql-community-client-8.0.32-1.el9.aarch64               mysql-community-client-plugins-8.0.32-1.el9.aarch64         
  mysql-community-common-8.0.32-1.el9.aarch64             mysql-community-icu-data-files-8.0.32-1.el9.aarch64       mysql-community-libs-8.0.32-1.el9.aarch64                   
  mysql-community-server-8.0.32-1.el9.aarch64             perl-AutoLoader-5.74-477.amzn2022.0.2.noarch              perl-B-1.80-477.amzn2022.0.2.aarch64                        
  perl-Carp-1.50-458.amzn2022.0.1.noarch                  perl-Class-Struct-0.66-477.amzn2022.0.2.noarch            perl-Data-Dumper-2.174-460.amzn2022.0.1.aarch64             
  perl-Digest-1.20-1.amzn2022.0.1.noarch                  perl-Digest-MD5-2.58-2.amzn2022.0.1.aarch64               perl-DynaLoader-1.47-477.amzn2022.0.2.aarch64               
  perl-Encode-4:3.15-462.amzn2022.0.1.aarch64             perl-Errno-1.30-477.amzn2022.0.2.aarch64                  perl-Exporter-5.74-459.amzn2022.0.1.noarch                  
  perl-Fcntl-1.13-477.amzn2022.0.2.aarch64                perl-File-Basename-2.85-477.amzn2022.0.2.noarch           perl-File-Path-2.18-2.amzn2022.0.1.noarch                   
  perl-File-Temp-1:0.231.100-2.amzn2022.0.1.noarch        perl-File-stat-1.09-477.amzn2022.0.2.noarch               perl-FileHandle-2.03-477.amzn2022.0.2.noarch                
  perl-Getopt-Long-1:2.52-2.amzn2022.0.1.noarch           perl-Getopt-Std-1.12-477.amzn2022.0.2.noarch              perl-HTTP-Tiny-0.078-1.amzn2022.0.1.noarch                  
  perl-IO-1.43-477.amzn2022.0.2.aarch64                   perl-IO-Socket-IP-0.41-3.amzn2022.0.1.noarch              perl-IO-Socket-SSL-2.070-2.amzn2022.noarch                  
  perl-IPC-Open3-1.21-477.amzn2022.0.2.noarch             perl-MIME-Base64-3.16-2.amzn2022.0.1.aarch64              perl-Mozilla-CA-20200520-4.amzn2022.0.1.noarch              
  perl-NDBM_File-1.15-477.amzn2022.0.2.aarch64            perl-Net-SSLeay-1.92-2.amzn2022.0.1.aarch64               perl-POSIX-1.94-477.amzn2022.0.2.aarch64                    
  perl-PathTools-3.78-459.amzn2022.0.1.aarch64            perl-Pod-Escapes-1:1.07-458.amzn2022.0.1.noarch           perl-Pod-Perldoc-3.28.01-459.amzn2022.0.1.noarch            
  perl-Pod-Simple-1:3.42-2.amzn2022.0.1.noarch            perl-Pod-Usage-4:2.01-2.amzn2022.0.1.noarch               perl-Scalar-List-Utils-4:1.56-459.amzn2022.0.1.aarch64      
  perl-SelectSaver-1.02-477.amzn2022.0.2.noarch           perl-Socket-4:2.032-1.amzn2022.0.1.aarch64                perl-Storable-1:3.21-458.amzn2022.0.1.aarch64               
  perl-Symbol-1.08-477.amzn2022.0.2.noarch                perl-Term-ANSIColor-5.01-459.amzn2022.0.1.noarch          perl-Term-Cap-1.17-458.amzn2022.0.1.noarch                  
  perl-Text-ParseWords-3.30-458.amzn2022.0.1.noarch       perl-Text-Tabs+Wrap-2021.0726-1.amzn2022.noarch           perl-Time-Local-2:1.300-5.amzn2022.0.1.noarch               
  perl-URI-5.09-1.amzn2022.0.1.noarch                     perl-base-2.27-477.amzn2022.0.2.noarch                    perl-constant-1.33-459.amzn2022.0.1.noarch                  
  perl-if-0.60.800-477.amzn2022.0.2.noarch                perl-interpreter-4:5.32.1-477.amzn2022.0.2.aarch64        perl-libnet-3.13-2.amzn2022.0.1.noarch                      
  perl-libs-4:5.32.1-477.amzn2022.0.2.aarch64             perl-mro-1.23-477.amzn2022.0.2.aarch64                    perl-overload-1.31-477.amzn2022.0.2.noarch                  
  perl-overloading-0.02-477.amzn2022.0.2.noarch           perl-parent-1:0.238-458.amzn2022.0.1.noarch               perl-podlators-1:4.14-458.amzn2022.0.1.noarch               
  perl-subs-1.03-477.amzn2022.0.2.noarch                  perl-vars-1.05-477.amzn2022.0.2.noarch                   

Complete!

↑MySQLサーバーをインストール(なんかAL2022についてアップデートできる的な表示が含まれてた)

# mysql --version
mysql Ver 8.0.32 for Linux on aarch64 (MySQL Community Server - GPL)

# systemctl is-enabled mysqld
enabled

# systemctl start mysqld

↑バージョン確認
自動起動の設定はインストール直後の状態でされていたためそのまま起動

# cat /var/log/mysqld.log  | grep root
2023-03-12T06:26:25.832991Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: @@@@@@@@@@@@

↑初回起動時のrootユーザーのパスワードを確認

# mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: ←ここで初回起動時のrootユーザーのパスワードを入力

The existing password for the user account root has expired. Please set a new password.

New password: ←半角英数字+記号+8桁以上のパスワードを入力

Re-enter new password: ←半角英数字+記号+8桁以上のパスワードを入力
The 'validate_password' component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Using existing password for root.

Estimated strength of the password: 100 
Change the password for root ? ((Press y|Y for Yes, any other key for No) : N

 ... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done!

↑mysql_secure_installationで初期設定

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.32 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

mysql> show variables like '%char%';
+--------------------------------------+--------------------------------+
| Variable_name                        | Value                          |
+--------------------------------------+--------------------------------+
| character_set_client                 | utf8mb4                        |
| character_set_connection             | utf8mb4                        |
| character_set_database               | utf8mb4                        |
| character_set_filesystem             | binary                         |
| character_set_results                | utf8mb4                        |
| character_set_server                 | utf8mb4                        |
| character_set_system                 | utf8mb3                        |
| character_sets_dir                   | /usr/share/mysql-8.0/charsets/ |
| validate_password.special_char_count | 1                              |
+--------------------------------------+--------------------------------+
9 rows in set (0.01 sec)

mysql> show variables like 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password.check_user_name    | ON     |
| validate_password.dictionary_file    |        |
| validate_password.length             | 8      |
| validate_password.mixed_case_count   | 1      |
| validate_password.number_count       | 1      |
| validate_password.policy             | MEDIUM |
| validate_password.special_char_count | 1      |
+--------------------------------------+--------+
7 rows in set (0.00 sec)

mysql> select Host, User, plugin from mysql.user;
+-----------+------------------+-----------------------+
| Host      | User             | plugin                |
+-----------+------------------+-----------------------+
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session    | caching_sha2_password |
| localhost | mysql.sys        | caching_sha2_password |
| localhost | root             | caching_sha2_password |
+-----------+------------------+-----------------------+
4 rows in set (0.00 sec)

↑MySQLサーバーに接続していろいろ確認

まとめ

今回インストールしたものバージョンについて以下の通りとなりました。

Javaopenjdk version “17.0.5” 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-17.0.5.8.1 (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.5.8.1 (build 17.0.5+8-LTS, mixed mode, sharing)
httpdApache/2.4.54 (Amazon Linux)
tomcatApache Tomcat/9.0.64
MySQLmysql Ver 8.0.32 for Linux on aarch64 (MySQL Community Server – GPL)
opensslOpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)

※opensslはインストールしたわけではないけど重要なので記載

  • JavaはAmazon Corretto11,17がインストールできる
  • httpdは2.4がインストールできる
  • tomcatは9がインストールできる
    • 依存関係の解決によってjava17がインストールされてしまう
  • MySQLはRHEL9用のリポジトリを追加することでインストールできる
  • OpenSSLのバージョンは3.0.5

その他、x86の頃と比べて細かいバージョンの差異があることが確認できました(httpd,openssl,tomcat等)。

OpenSSLの依存解決が取れないMySQLリポジトリを追加した場合

一通りの検証が済んだので、RHEL9のリポジトリを削除してRHEL8用のリポジトリを追加してMySQLサーバーをインストールしてみる。

# dnf remove mysql
~~~省略~~~

# rm -rf /var/lib/mysql/

# rpm -qa | grep -i mysql
mysql80-community-release-el9-1.noarch

# rpm -e mysql80-community-release-el9-1.noarch

↑まずはインストール済みのMySQLサーバーを削除
/var/lib/mysql配下のデータは残るので手動で削除

# dnf localinstall https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm
Last metadata expiration check: 0:25:15 ago on Sun 12 Mar 2023 03:19:22 PM JST.
mysql80-community-release-el8-4.noarch.rpm                                                                                                         46 kB/s |  14 kB     00:00    
Dependencies resolved.
==================================================================================================================================================================================
 Package                                                Architecture                        Version                               Repository                                 Size
==================================================================================================================================================================================
Installing:
 mysql80-community-release                              noarch                              el8-4                                 @commandline                               14 k

Transaction Summary
==================================================================================================================================================================================
Install  1 Package

Total size: 14 k
Installed size: 8.6 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1 
  Installing       : mysql80-community-release-el8-4.noarch                                                                                                                   1/1 
  Verifying        : mysql80-community-release-el8-4.noarch                                                                                                                   1/1 
==================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2022.0.20230118:
    Run the following command to upgrade to 2022.0.20230118:

      dnf upgrade --releasever=2022.0.20230118

    Release notes:
     https://docs.aws.amazon.com/linux/al2022/release-notes/relnotes.html

==================================================================================================================================================================================

Installed:
  mysql80-community-release-el8-4.noarch                                                                                                                                          

Complete!

↑RHEL8用のリポジトリを追加

# dnf install mysql-community-server
MySQL 8.0 Community Server                                                                                                                         36 MB/s | 2.7 MB     00:00    
MySQL Connectors Community                                                                                                                        3.4 MB/s |  88 kB     00:00    
MySQL Tools Community                                                                                                                              14 MB/s | 457 kB     00:00    
Error: 
 Problem: conflicting requests
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.17-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.17-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.17-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.17-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.17-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.18-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.18-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.18-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.18-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.18-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.19-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.19-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.19-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.19-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.19-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.19-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.20-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.20-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.20-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.20-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.20-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.20-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.21-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.21-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.21-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.21-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.21-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.21-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.22-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.22-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.22-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.22-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.22-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.22-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.23-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.23-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.23-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.23-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.23-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.23-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.24-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.24-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.24-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.24-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.24-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.24-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.25-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.25-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.25-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.25-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.25-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.25-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.26-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.26-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.26-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.26-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.26-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.26-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.27-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.27-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.27-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.27-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.27-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.27-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.28-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.28-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.28-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.28-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.28-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.28-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.30-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.30-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.30-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.30-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.30-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.30-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.31-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.31-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.31-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.31-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.31-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.31-1.el8.aarch64
  - nothing provides libcrypto.so.1.1()(64bit) needed by mysql-community-server-8.0.32-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.32-1.el8.aarch64
  - nothing provides libssl.so.1.1()(64bit) needed by mysql-community-server-8.0.32-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by mysql-community-server-8.0.32-1.el8.aarch64
  - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.32-1.el8.aarch64
  - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by mysql-community-server-8.0.32-1.el8.aarch64
(try to add '--skip-broken' to skip uninstallable packages)

↑x86のAL2022で検証していたときはamazonlinuxリポジトリよりopenssl1.1が依存解決されてインストールできていましたが、ArmのAL2022ではエラーとなる模様。
RHEL8からはすんなりMySQLサーバーがインストールできないことがわかりました。

# ll /usr/lib64/libssl*
lrwxrwxrwx. 1 root root     15 Oct 28 00:47 /usr/lib64/libssl.so.3 -> libssl.so.3.0.5
-rwxr-xr-x. 1 root root 685848 Oct 28 00:47 /usr/lib64/libssl.so.3.0.5

# ll /usr/lib64/libcrypto*
lrwxrwxrwx. 1 root root      18 Oct 28 00:47 /usr/lib64/libcrypto.so.3 -> libcrypto.so.3.0.5
-rwxr-xr-x. 1 root root 4239936 Oct 28 00:47 /usr/lib64/libcrypto.so.3.0.5

↑openssl1.1系のlibが含まれていないことを確認

参考リンク

タイトルとURLをコピーしました