sudo dnf install container-tools
[ec2-user@ip-***-***-***-*** ~]$ sudo dnf install container-tools
CentOS Stream 9 - BaseOS 9.4 MB/s | 8.0 MB 00:00
CentOS Stream 9 - AppStream 25 MB/s | 19 MB 00:00
CentOS Stream 9 - Extras packages 21 kB/s | 15 kB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repo Size
================================================================================
Installing:
container-tools noarch 1-14.el9 appstream 4.6 k
Installing dependencies:
aardvark-dns x86_64 2:1.9.0-1.el9 appstream 1.0 M
adobe-source-code-pro-fonts noarch 2.030.1.050-12.el9.1 baseos 832 k
buildah x86_64 2:1.33.5-1.el9 appstream 9.5 M
cockpit-bridge x86_64 311.1-1.el9 baseos 553 k
cockpit-podman noarch 84.1-1.el9 appstream 679 k
conmon x86_64 2:2.1.10-1.el9 appstream 52 k
container-selinux noarch 3:2.229.0-1.el9 appstream 57 k
containernetworking-plugins x86_64 1:1.4.0-1.el9 appstream 9.3 M
containers-common x86_64 2:1-61.el9 appstream 142 k
criu x86_64 3.19-1.el9 appstream 560 k
criu-libs x86_64 3.19-1.el9 appstream 32 k
crun x86_64 1.14.3-1.el9 appstream 223 k
dmidecode x86_64 1:3.3-7.el9 baseos 89 k
fuse-common x86_64 3.10.2-8.el9 baseos 8.3 k
fuse-overlayfs x86_64 1.13-1.el9 appstream 67 k
[中略]
python3-pyxdg-0.27-3.el9.noarch
python3-subscription-manager-rhsm-1.29.40-1.el9.x86_64
python3-tomli-2.0.1-5.el9.noarch
shadow-utils-subid-2:4.9-8.el9.x86_64
skopeo-2:1.14.3-0.1.el9.x86_64
slirp4netns-1.2.3-1.el9.x86_64
subscription-manager-1.29.40-1.el9.x86_64
subscription-manager-rhsm-certificates-20220623-1.el9.noarch
toolbox-0.0.99.5-2.el9.x86_64
udica-0.2.8-1.el9.noarch
usermode-1.114-4.el9.x86_64
virt-what-1.25-5.el9.x86_64
webkit2gtk3-jsc-2.42.4-1.el9.x86_64
yajl-2.1.0-22.el9.x86_64
Complete!
[ec2-user@ip-***-***-***-*** ~]$
あらかじめ環境変数MYPASSにパスワードを設定しておきます。
export MYPASS=<パスワード>
以下のコマンドを実行します。Oracle Cloudのコンピュート・インスタンス上で実行したコマンドと、まったく同じです。
podman run -d \
-p 1521:1522 \
-p 1522:1522 \
-p 8443:8443 \
-p 27017:27017 \
-e WORKLOAD_TYPE='ATP' \
-e WALLET_PASSWORD=$MYPASS \
-e ADMIN_PASSWORD=$MYPASS \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--name adb-free \
container-registry.oracle.com/database/adb-free:latest
[ec2-user@ip-***-**-**-*** ~]$ podman run -d \
-p 1521:1522 \
-p 1522:1522 \
-p 8443:8443 \
-p 27017:27017 \
-e WORKLOAD_TYPE='ATP' \
-e WALLET_PASSWORD=$MYPASS \
-e ADMIN_PASSWORD=$MYPASS \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--name adb-free \
container-registry.oracle.com/database/adb-free:latest
Trying to pull container-registry.oracle.com/database/adb-free:latest...
Getting image source signatures
Copying blob 054518c1d5d2 done |
Copying blob 66cb99a7273e done |
Copying blob 0e3c46fdb0f9 done |
Copying config 0cadb9d2c5 done |
Writing manifest to image destination
b1be4270aefcdc74af1cd8f9e5bbda1866396ddc02fd296b6e0f9b35d2c3d19a
[ec2-user@ip-***-**-**-*** ~]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b1be4270aefc container-registry.oracle.com/database/adb-free:latest 9 seconds ago Up 9 seconds (starting) 0.0.0.0:1521->1522/tcp, 0.0.0.0:1522->1522/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:27017->27017/tcp adb-free
[ec2-user@ip-***-**-**-*** ~]$
healtyになったことを確認します。
[ec2-user@ip-***-**-**-*** ~]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b1be4270aefc container-registry.oracle.com/database/adb-free:latest 4 minutes ago Up 4 minutes (healthy) 0.0.0.0:1521->1522/tcp, 0.0.0.0:1522->1522/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:27017->27017/tcp adb-free
[ec2-user@ip-***-**-***-*** ~]$
[ec2-user@ip-***-**-***-*** ~]$ sudo dnf install zip
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:10:21 ago on Mon 11 Mar 2024 01:17:22 AM UTC.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
zip x86_64 3.0-35.el9 baseos 266 k
Installing dependencies:
unzip x86_64 6.0-56.el9 baseos 182 k
[中略]
Installed:
unzip-6.0-56.el9.x86_64 zip-3.0-35.el9.x86_64
Complete!
[ec2-user@ip-***-**-***-*** ~]$
sed -i 's/localhost/aws-adb-free/g' tls_wallet/tnsnames.ora
cd tls_wallet
zip -r ../wallet.zip *
[ec2-user@ip-***-**-***-*** ~]$ podman cp adb-free:/u01/app/oracle/wallets/tls_wallet tls_wallet
[ec2-user@ip-***-**-***-*** ~]$ sed -i 's/localhost/aws-adb-free/g' tls_wallet/tnsnames.ora
[ec2-user@ip-***-**-***-*** ~]$ cd tls_wallet
[ec2-user@ip-***-**-***-*** tls_wallet]$ zip -r ../wallet.zip *
adding: adb_container.cert (deflated 24%)
adding: cwallet.sso (stored 0%)
adding: cwallet.sso.lck (stored 0%)
adding: ewallet.p12 (stored 0%)
adding: ewallet.p12.lck (stored 0%)
adding: ewallet.pem (deflated 26%)
adding: keystore.jks (stored 0%)
adding: ojdbc.properties (deflated 49%)
adding: README (stored 0%)
adding: sqlnet.ora (deflated 16%)
adding: tnsnames.ora (deflated 88%)
adding: truststore.jks (deflated 7%)
[ec2-user@ip-***-**-***-*** tls_wallet]$
以上でAmazon Lightsailのインスタンス上の作業は完了です。