DataPower for Linuxをインストールしてみた

# はじめに

IBM DataPowerは、外部とのGatewayを担う物理アプライアンスとしてIBMが提供している製品ですが、様々な導入オプションを提供しています。各導入オプションとその機能的な差異については、[Knowledge Center: Differences among DataPower Gateways products](https://www.ibm.com/docs/en/datapower-gateway/10.0.1?topic=overview-differences-among-datapower-gateways-products)に記載があります。

今回は、Linux環境に導入するオプションについて紹介いたします。
前提となるLinux環境は、[Software Product Compatibility Reports](https://www.ibm.com/software/reports/compatibility/clarity/softwareReqsForProduct.html)からご確認ください。

執筆時点（2022年5月）での前提は以下になります。

|Operating System | Minimum | Hardware  |
|---|---|---|
|Red Hat Enterprise Linux (RHEL) Server 7 |7.4  |x86-64 |

|Disk| Memory | Processor  |
|---|---|---|
|7 GB <br> (5 GB allocated to /opt and 2 GB to /var) |4 GB RAM (without API workload)<br> 8 GB RAM (with API workload)  |4 vCPU |


今回は、RHEL 7.9の環境で導入検証しています。


# 導入手順

以下の流れでご紹介します。
1. 事前準備
2. 導入作業
3. 動作確認

## 1. 事前準備

### 1.1 Linux環境の準備

導入前提を満たすOS環境を準備します。今回は、[IBM TechZone](https://techzone.ibm.com/collection/base-images)からIBM Cloudに検証環境を払い出しています。この環境払い出しは、IBM社員または、Partner Worldに登録されたビジネス・パートナーが利用可能となります。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/403443/728e8cfe-1eb5-9e89-760d-760d8b753639.png)


### 1.2 OS設定

Linux hostの設定に関して[こちら](https://www.ibm.com/docs/en/datapower-gateway/10.0.x?topic=virtual-datapower-gateway-linux)に記載がありますので、問題がないか確認します。
今回は特に変更していません。


### 1.3 導入モジュールの配置

パスポート・アドバンテージサイトから導入に必要なRPMパッケージを取得します。
今回は、DataPower 10.0.4の非本番用のモジュール（idg_lx10040.cd.nonprod.tar）を使用しています。
この圧縮ファイル内に、導入に必要な2つのrpmファイルがありますので、そちらをLinux環境に転送します。

 - idg_lx10040.cd.nonprod.image.x86_64.rpm
 - idg_lx10040.cd.common.x86_64.rpm

## 2. 導入作業

[こちらの手順](https://www.ibm.com/docs/en/datapower-gateway/10.0.x?topic=linux-installing-from-rpm-packages)を参考に導入を実施します。

### Before you begin

DataPowerの導入や接続に必要なTelnetとschrootをインストールします。
schrootについては、上記のKnowledge Centerに記載がありますが、[こちらのサイト](https://docs.fedoraproject.org/en-US/epel/)のRHEL 7での手順を実施しています。


Telnetパッケージ導入ログ

```
[root@itzvsi-8h4o7l63 datapower]# yum install telnet
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-eus-optional-rpms                                                                      | 1.8 kB  00:00:00
rhel-7-server-extras-rpms                                                                            | 2.0 kB  00:00:00
rhel-7-server-optional-rpms                                                                          | 1.8 kB  00:00:00
rhel-7-server-rpms                                                                                   | 2.0 kB  00:00:00
rhel-7-server-supplementary-rpms                                                                     | 2.0 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-66.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================
 Package                 Arch                    Version                          Repository                           Size
============================================================================================================================
Installing:
 telnet                  x86_64                  1:0.17-66.el7                    rhel-7-server-rpms                   64 k

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

Total download size: 64 k
Installed size: 113 k
Is this ok [y/d/N]: y
Downloading packages:
telnet-0.17-66.el7.x86_64.rpm                                                                        |  64 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:telnet-0.17-66.el7.x86_64                                                                              1/1
  Verifying  : 1:telnet-0.17-66.el7.x86_64                                                                              1/1

Installed:
  telnet.x86_64 1:0.17-66.el7

Complete!
```

schrootパッケージ導入ログ

```
[root@itzvsi-8h4o7l63 ~]# subscription-manager repos --enable rhel-*-optional-rpms \
>                            --enable rhel-*-extras-rpms \
>                            --enable rhel-ha-for-rhel-*-server-rpms
Error: 'rhel-ha-for-rhel-*-server-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.
Repository 'rhel-7-server-optional-rpms' is enabled for this system.
Repository 'rhel-7-server-eus-optional-rpms' is enabled for this system.
Repository 'rhel-7-server-extras-rpms' is enabled for this system.

[root@itzvsi-8h4o7l63 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
epel-release-latest-7.noarch.rpm                                                                     |  15 kB  00:00:00
Examining /var/tmp/yum-root-iojIkm/epel-release-latest-7.noarch.rpm: epel-release-7-14.noarch
Marking /var/tmp/yum-root-iojIkm/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-14 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================
 Package                     Arch                  Version               Repository                                    Size
============================================================================================================================
Installing:
 epel-release                noarch                7-14                  /epel-release-latest-7.noarch                 25 k

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

Total size: 25 k
Installed size: 25 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-14.noarch                                                                                 1/1
  Verifying  : epel-release-7-14.noarch                                                                                 1/1
rhel-7-server-eus-optional-rpms/7Server/x86_64                                                       | 1.8 kB  00:00:00
rhel-7-server-eus-optional-rpms/7Server/x86_64/group                                                 |  22 kB  00:00:00
rhel-7-server-eus-optional-rpms/7Server/x86_64/updateinfo                                            | 1.8 MB  00:00:00
rhel-7-server-eus-optional-rpms/7Server/x86_64/primary                                               | 4.0 MB  00:00:00
rhel-7-server-extras-rpms/x86_64                                                                     | 2.0 kB  00:00:00
rhel-7-server-extras-rpms/x86_64/group                                                               |  124 B  00:00:00
rhel-7-server-extras-rpms/x86_64/updateinfo                                                          | 255 kB  00:00:00
rhel-7-server-extras-rpms/x86_64/primary                                                             | 436 kB  00:00:00
rhel-7-server-extras-rpms/x86_64/productid                                                           | 2.1 kB  00:00:00
rhel-7-server-optional-rpms/7Server/x86_64                                                           | 1.8 kB  00:00:00
rhel-7-server-optional-rpms/7Server/x86_64/group                                                     |  22 kB  00:00:00
rhel-7-server-optional-rpms/7Server/x86_64/updateinfo                                                | 3.0 MB  00:00:00
rhel-7-server-optional-rpms/7Server/x86_64/primary                                                   | 6.8 MB  00:00:00
rhel-7-server-rpms/7Server/x86_64                                                                    | 2.0 kB  00:00:00
rhel-7-server-rpms/7Server/x86_64/group                                                              | 631 kB  00:00:00
rhel-7-server-rpms/7Server/x86_64/updateinfo                                                         | 4.1 MB  00:00:00
rhel-7-server-rpms/7Server/x86_64/primary                                                            |  56 MB  00:00:00
rhel-7-server-rpms/7Server/x86_64/productid                                                          | 2.1 kB  00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64                                                      | 2.0 kB  00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/group                                                |  45 kB  00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/updateinfo                                           |  88 kB  00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/primary                                              | 141 kB  00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/productid                                            | 2.1 kB  00:00:00

Installed:
  epel-release.noarch 0:7-14

Complete!
```
### Procedure

DataPowerの導入を実施します。

```
[root@itzvsi-8h4o7l63 ~]# yum install idg_lx10040.cd.nonprod.image.x86_64.rpm idg_lx10040.cd.common.x86_64.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining idg_lx10040.cd.nonprod.image.x86_64.rpm: ibm-datapower-agoradco-nonpd-image-10.0.4.0.337832-1.x86_64
Marking idg_lx10040.cd.nonprod.image.x86_64.rpm to be installed
Examining idg_lx10040.cd.common.x86_64.rpm: ibm-datapower-common-10.0.4.0.337832-1.x86_64
Marking idg_lx10040.cd.common.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package ibm-datapower-agoradco-nonpd-image.x86_64 0:10.0.4.0.337832-1 will be installed
---> Package ibm-datapower-common.x86_64 0:10.0.4.0.337832-1 will be installed
--> Processing Dependency: ipvsadm for package: ibm-datapower-common-10.0.4.0.337832-1.x86_64
epel/x86_64/metalink                                                                                 |  16 kB  00:00:00
epel                                                                                                 | 4.7 kB  00:00:00
rhel-7-server-eus-optional-rpms                                                                      | 1.8 kB  00:00:00
rhel-7-server-extras-rpms                                                                            | 2.0 kB  00:00:00
rhel-7-server-optional-rpms                                                                          | 1.8 kB  00:00:00
rhel-7-server-rpms                                                                                   | 2.0 kB  00:00:00
rhel-7-server-supplementary-rpms                                                                     | 2.0 kB  00:00:00
(1/3): epel/x86_64/updateinfo                                                                        | 1.0 MB  00:00:00
(2/3): epel/x86_64/group_gz                                                                          |  96 kB  00:00:00
(3/3): epel/x86_64/primary_db                                                                        | 7.0 MB  00:00:00
rhel-7-server-eus-optional-rpms                                                                                 13717/13717
rhel-7-server-extras-rpms                                                                                         1422/1422
rhel-7-server-optional-rpms                                                                                     23393/23393
rhel-7-server-rpms                                                                                              32922/32922
rhel-7-server-supplementary-rpms                                                                                    443/443
--> Processing Dependency: schroot for package: ibm-datapower-common-10.0.4.0.337832-1.x86_64
--> Running transaction check
---> Package ipvsadm.x86_64 0:1.27-8.el7 will be installed
---> Package schroot.x86_64 0:1.6.10-7.el7 will be installed
--> Processing Dependency: libboost_filesystem-mt.so.1.53.0()(64bit) for package: schroot-1.6.10-7.el7.x86_64
--> Processing Dependency: libboost_iostreams-mt.so.1.53.0()(64bit) for package: schroot-1.6.10-7.el7.x86_64
--> Processing Dependency: libboost_program_options-mt.so.1.53.0()(64bit) for package: schroot-1.6.10-7.el7.x86_64
--> Processing Dependency: libboost_regex-mt.so.1.53.0()(64bit) for package: schroot-1.6.10-7.el7.x86_64
--> Processing Dependency: libboost_system-mt.so.1.53.0()(64bit) for package: schroot-1.6.10-7.el7.x86_64
--> Running transaction check
---> Package boost-filesystem.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-iostreams.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-program-options.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-regex.x86_64 0:1.53.0-28.el7 will be installed
--> Processing Dependency: libicuuc.so.50()(64bit) for package: boost-regex-1.53.0-28.el7.x86_64
--> Processing Dependency: libicui18n.so.50()(64bit) for package: boost-regex-1.53.0-28.el7.x86_64
--> Processing Dependency: libicudata.so.50()(64bit) for package: boost-regex-1.53.0-28.el7.x86_64
---> Package boost-system.x86_64 0:1.53.0-28.el7 will be installed
--> Running transaction check
---> Package libicu.x86_64 0:50.2-4.el7_7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================
 Package                                 Arch        Version                Repository                                 Size
============================================================================================================================
Installing:
 ibm-datapower-agoradco-nonpd-image      x86_64      10.0.4.0.337832-1      /idg_lx10040.cd.nonprod.image.x86_64      3.0 G
 ibm-datapower-common                    x86_64      10.0.4.0.337832-1      /idg_lx10040.cd.common.x86_64             694 k
Installing for dependencies:
 boost-filesystem                        x86_64      1.53.0-28.el7          rhel-7-server-rpms                         68 k
 boost-iostreams                         x86_64      1.53.0-28.el7          rhel-7-server-rpms                         61 k
 boost-program-options                   x86_64      1.53.0-28.el7          rhel-7-server-rpms                        156 k
 boost-regex                             x86_64      1.53.0-28.el7          rhel-7-server-rpms                        296 k
 boost-system                            x86_64      1.53.0-28.el7          rhel-7-server-rpms                         40 k
 ipvsadm                                 x86_64      1.27-8.el7             rhel-7-server-rpms                         45 k
 libicu                                  x86_64      50.2-4.el7_7           rhel-7-server-rpms                        6.9 M
 schroot                                 x86_64      1.6.10-7.el7           epel                                      789 k

Transaction Summary
============================================================================================================================
Install  2 Packages (+8 Dependent packages)

Total size: 3.0 G
Total download size: 8.3 M
Installed size: 3.0 G
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/rhel-7-server-rpms/packages/boost-filesystem-1.53.0-28.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Public key for boost-filesystem-1.53.0-28.el7.x86_64.rpm is not installed
(1/8): boost-filesystem-1.53.0-28.el7.x86_64.rpm                                                     |  68 kB  00:00:00
(2/8): boost-iostreams-1.53.0-28.el7.x86_64.rpm                                                      |  61 kB  00:00:00
(3/8): boost-program-options-1.53.0-28.el7.x86_64.rpm                                                | 156 kB  00:00:00
(4/8): boost-regex-1.53.0-28.el7.x86_64.rpm                                                          | 296 kB  00:00:00
(5/8): boost-system-1.53.0-28.el7.x86_64.rpm                                                         |  40 kB  00:00:00
(6/8): ipvsadm-1.27-8.el7.x86_64.rpm                                                                 |  45 kB  00:00:00
(7/8): libicu-50.2-4.el7_7.x86_64.rpm                                                                | 6.9 MB  00:00:00
warning: /var/cache/yum/x86_64/7Server/epel/packages/schroot-1.6.10-7.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for schroot-1.6.10-7.el7.x86_64.rpm is not installed
(8/8): schroot-1.6.10-7.el7.x86_64.rpm                                                               | 789 kB  00:00:00
----------------------------------------------------------------------------------------------------------------------------
Total                                                                                        13 MB/s | 8.3 MB  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
 Userid     : "Red Hat, Inc. (release key 2) <security@redhat.com>"
 Fingerprint: 567e 347a d004 4ade 55ba 8a5f 199e 2f91 fd43 1d51
 Package    : redhat-release-server-7.9-6.el7_9.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Importing GPG key 0x2FA658E0:
 Userid     : "Red Hat, Inc. (auxiliary key) <security@redhat.com>"
 Fingerprint: 43a6 e49c 4a38 f4be 9abf 2a53 4568 9c88 2fa6 58e0
 Package    : redhat-release-server-7.9-6.el7_9.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-14.noarch (@/epel-release-latest-7.noarch)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : boost-system-1.53.0-28.el7.x86_64                                                                       1/10
  Installing : boost-filesystem-1.53.0-28.el7.x86_64                                                                   2/10
  Installing : boost-program-options-1.53.0-28.el7.x86_64                                                              3/10
  Installing : ipvsadm-1.27-8.el7.x86_64                                                                               4/10
  Installing : libicu-50.2-4.el7_7.x86_64                                                                              5/10
  Installing : boost-regex-1.53.0-28.el7.x86_64                                                                        6/10
  Installing : ibm-datapower-agoradco-nonpd-image-10.0.4.0.337832-1.x86_64                                             7/10
  Installing : boost-iostreams-1.53.0-28.el7.x86_64                                                                    8/10
  Installing : schroot-1.6.10-7.el7.x86_64                                                                             9/10
  Installing : ibm-datapower-common-10.0.4.0.337832-1.x86_64                                                          10/10
Created symlink from /etc/systemd/system/multi-user.target.wants/datapower.service to /usr/lib/systemd/system/datapower.service.
  Verifying  : boost-system-1.53.0-28.el7.x86_64                                                                       1/10
  Verifying  : boost-iostreams-1.53.0-28.el7.x86_64                                                                    2/10
  Verifying  : schroot-1.6.10-7.el7.x86_64                                                                             3/10
  Verifying  : ibm-datapower-common-10.0.4.0.337832-1.x86_64                                                           4/10
  Verifying  : ibm-datapower-agoradco-nonpd-image-10.0.4.0.337832-1.x86_64                                             5/10
  Verifying  : libicu-50.2-4.el7_7.x86_64                                                                              6/10
  Verifying  : boost-regex-1.53.0-28.el7.x86_64                                                                        7/10
  Verifying  : ipvsadm-1.27-8.el7.x86_64                                                                               8/10
  Verifying  : boost-program-options-1.53.0-28.el7.x86_64                                                              9/10
  Verifying  : boost-filesystem-1.53.0-28.el7.x86_64                                                                  10/10

Installed:
  ibm-datapower-agoradco-nonpd-image.x86_64 0:10.0.4.0.337832-1       ibm-datapower-common.x86_64 0:10.0.4.0.337832-1

Dependency Installed:
  boost-filesystem.x86_64 0:1.53.0-28.el7                         boost-iostreams.x86_64 0:1.53.0-28.el7
  boost-program-options.x86_64 0:1.53.0-28.el7                    boost-regex.x86_64 0:1.53.0-28.el7
  boost-system.x86_64 0:1.53.0-28.el7                             ipvsadm.x86_64 0:1.27-8.el7
  libicu.x86_64 0:50.2-4.el7_7                                    schroot.x86_64 0:1.6.10-7.el7

Complete!
```

これで導入が完了しました。
導入後は「/opt/ibm/datapower」内に各ファイルが作成されています。
必要に応じて「datapower.conf」から稼働設定を変更します。

```
[root@itzvsi-8h4o7l63 datapower]# ll
total 3114516
-rw-r--r--. 1 root root       4200 Dec  4 08:00 datapower.conf
-rwxr-xr-x. 1 root root      73464 Dec  4 08:00 datapower-control
-rwxr-xr-x. 1 root root        899 Dec  4 08:00 datapower-docker-build.sh
-rw-r--r--. 1 root root        508 Dec  4 08:00 datapower-external.cfg
lrwxrwxrwx. 1 root root         36 May  9 09:45 datapower.img -> /var/opt/ibm/datapower/datapower.img
-rw-r--r--. 1 root root 3185378138 Dec  4 09:19 datapower_rel_agoradco_nonpd.img.gz
-rwxr-xr-x. 1 root root       2846 Dec  4 08:00 datapower-support-mustgather.sh
-rwxr-xr-x. 1 root root       1158 Dec  4 08:00 datapower-trigger-failsafe.sh
-rwxr-xr-x. 1 root root        108 May  9 09:45 dpPostRemoveCommon.sh
-rwxr-xr-x. 1 root root         82 May  9 09:45 dpPostRemoveImage.sh
-rwxr-xr-x. 1 root root        619 Dec  4 08:00 dpPreStartCommon.sh
-rwxr-xr-x. 1 root root        759 Dec  4 09:18 dpPreStartImage.sh
-rwxr-xr-x. 1 root root        632 Dec  4 08:00 dpPreStart.sh
-rwxr-xr-x. 1 root root     166760 Dec  4 08:00 libcryptsetup.so.4
-r-xr-xr-x. 1 root root     356120 Dec  4 08:00 libdevmapper.so.1.02
-rwxr-xr-x. 1 root root      11344 Dec  4 08:00 libfipscheck.so.1
-rwxr-xr-x. 1 root root      91176 Dec  4 08:00 libudev.so.1
```


## 3. 動作確認

### DataPowerの起動

systemctlコマンドでDataPowerを開始します。
稼働には5分ほどかかります。

```
[root@itzvsi-8h4o7l63 datapower]# systemctl start datapower

[root@itzvsi-8h4o7l63 ~]# systemctl status datapower -l
● datapower.service - DataPower Service
   Loaded: loaded (/usr/lib/systemd/system/datapower.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-05-09 09:45:59 CDT; 9min ago
  Process: 3330 ExecStartPre=/bin/bash /opt/ibm/datapower/dpPreStart.sh /opt/ibm/datapower/datapower.img (code=exited, status=0/SUCCESS)
 Main PID: 3526 (datapower-contr)
   CGroup: /system.slice/datapower.service
           mq3526 /opt/ibm/datapower/datapower-control exec-datapower /opt/ibm/datapower/datapower.img

May 09 09:45:22 itzvsi-8h4o7l63.dte.demo.ibmcloud.com systemd[1]: Starting DataPower Service...
May 09 09:45:46 itzvsi-8h4o7l63.dte.demo.ibmcloud.com bash[3330]: Mon May 09 2022 09:45:46 INF dpControl [pre-start][3330] Resizing DPOS partition from 7024640 to 7366657 sectors
May 09 09:45:59 itzvsi-8h4o7l63.dte.demo.ibmcloud.com bash[3330]: Mon May 09 2022 09:45:59 INF dpControl [pre-start][3330] Processing /tmp/ibm-dp-container-1-3330-1652107557/primary/etc/datapower.conf
May 09 09:45:59 itzvsi-8h4o7l63.dte.demo.ibmcloud.com bash[3330]: Mon May 09 2022 09:45:59 INF dpControl [pre-start][3330]    Standby Control Not Enabled
May 09 09:45:59 itzvsi-8h4o7l63.dte.demo.ibmcloud.com bash[3330]: Mon May 09 2022 09:45:59 INF dpControl [pre-start][3330]    License not automatically accepted
May 09 09:45:59 itzvsi-8h4o7l63.dte.demo.ibmcloud.com bash[3330]: Mon May 09 2022 09:45:59 INF dpControl [pre-start][3330]    RaidBlockDeviceName is not specified
May 09 09:45:59 itzvsi-8h4o7l63.dte.demo.ibmcloud.com systemd[1]: Started DataPower Service.
May 09 09:46:00 itzvsi-8h4o7l63.dte.demo.ibmcloud.com datapower-control[3526]: Mon May 09 2022 09:46:00 INF dpControl [session][3526] Starting DataPower service ...
May 09 09:46:00 itzvsi-8h4o7l63.dte.demo.ibmcloud.com datapower-control[3526]: Mon May 09 2022 09:46:00 INF dpControl [session][3526]    License not automatically accepted
```

起動が完了するとローカルホストの2200ポートが開始していることが確認できます。

```
[root@itzvsi-8h4o7l63 ~]# netstat -tlnw
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:2200          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:16379         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:26379         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:63501         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:63502         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:63503         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:63504         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:63505         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:63506         0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp6       0      0 ::1:25                  :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
```


### DataPowerへのTelnet接続

2200ポートを使用してTelnet接続できます。


```
[root@itzvsi-8h4o7l63 datapower]# telnet 127.0.0.1 2200
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
itzvsi-8h4o7l63.dte.demo.ibmcloud.com
Unauthorized access prohibited.
login: admin
Password: *****

Welcome to IBM DataPower Gateway console configuration.
Copyright IBM Corporation 1999, 2021

Version: IDG.10.0.4.0 build 337832 on Dec 3, 2021 12:54:08 PM
Delivery type: CD
Serial number: 0000001
```

Web UIにアクセスするために、web-mgmtへインターネットからアクセス可能なIPアドレス・ポートを設定します。

```
idg# config
Global mode
idg(config)# show web-mgmt

web-mgmt [up]
--------
 admin-state enabled
 ip-address *.*.*.*
 port 443
 save-config-overwrite on
 idle-timeout 600 Seconds
 acl web-mgmt  [up]
 ssl-config-type server
 enable-sts on

```

### DataPowerへのWeb UI接続

インターネットからWeb UIに接続することができます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/403443/6bf374a7-5c9b-b089-f9f8-578d2248a0fe.png)

## 導入Tips
### RHELバージョンについて

現在、DataPower for LinuxはRHEL 8はサポートしていません。
導入しようとすると以下のようなエラーが出てしまいますのでご注意ください。

```
# yum install idg_lx10040.cd.nonprod.image.x86_64.rpm ibm-datapower-common-10.0.4.0.337832-1.x86_64.rpm
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStre  47 kB/s | 2.8 kB     00:00
Red Hat CodeReady Linux Builder for RHEL 8 x86_  48 kB/s | 2.8 kB     00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS   51 kB/s | 2.4 kB     00:00
Package ibm-datapower-agoradco-nonpd-image-10.0.4.0.337832-1.x86_64 is already installed.
Error:
 Problem: conflicting requests
  - nothing provides libgcrypt.so.11()(64bit) needed by ibm-datapower-common-10.0.4.0.337832-1.x86_64
  - nothing provides libgcrypt.so.11(GCRYPT_1.2)(64bit) needed by ibm-datapower-common-10.0.4.0.337832-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
```



以上です。