LoginSignup
5
3

More than 3 years have passed since last update.

【失敗談】AWSでABAP環境を構築する〜詳細手順編

Last updated at Posted at 2019-07-22

※注記

この記事ではAWSにABAP環境を構築する事には失敗しています。
したがって、これ通りにやってもABAP環境を構築することはできませんが、同じことをやろうと思っている人の参考になればと思い、アップしました。

追記 2019/8/13
有識者の助言につき、#12のエラーを突破することに成功しました。
@mato-599さん、ありがとうございました!
が、また別のエラーが発生しました。。

詳細は、#2019/8/13追記を参照してください。

追記 2019/8/21
ABAP環境の構築に成功しました。
詳細は下記リンクを参照してください。
AWSでABAP(SAP Netweaver)環境を構築する方法

記事の構成

「【失敗談】AWSでABAP環境を構築する」は下記の3部構成とします。
〜やりたかった事編
〜詳細手順編 ※当記事
〜NGだった環境構成編

著者のローカル環境

OS:macOS High Sierra
メモリ:4GB
ストレージの空き容量:30GBくらい

詳細手順

要するに、
AS ABAP 752 SP01, developer edition, to downloadから、辿れる下記のリンクで解説された手順を、AWSのEC2で立てたインストタンスで実施しました。

SAP AS ABAP 7.51 SP2 – Developer Edition to Download: Concise Installation Guide

詳細手順は以下の通り
1: AWSの初期設定
2: P-UserID作成
3: SAP GUIのダウンロード・インストール
4: AWSでLinuxのインスタンス_Ubuntuを立てる
5: MACからSSHで接続
6: 各種設定
7: GUI接続する
8: ブラウザ経由でNetweaverのインストーラーをダウンロード
9: Netweaverのインストーラーを解凍
10: nanoのインストール
11: host名などの設定
12: Netweaverをインストール

著者は、この手順の12でこけました。

1: AWSの初期設定

アカウントを作ったりクレジットカードの登録をしたりします。
あとセキュリティの設定とか。
https://qiita.com/tmknom/items/303db2d1d928db720888

AWSはアカウントが乗っ取られると大変なことになるみたいです。
https://qiita.com/mochizukikotaro/items/a0e98ff0063a77e7b694

2: P-UserID作成

P-UserIDはNetweaverのインストーラーをDLする時に使います。
あらかじめ先に作ってきます。
https://www.sap.com/community.html
↓のRegisterからメールアドレスなどを登録します。
P-UserID作成.png

3: SAP GUIのダウンロード・インストール

SAP Netweaverのインストーラーをダウンロードします。Netweaver自体をローカルにインストールするのではなく、中に入っているGUIをインストールします。

公式からもたどれますが、ここからDLします。
https://www.sap.com/developer/trials-downloads/additional-downloads/sap-netweaver-as-abap-developer-edition-sp01-7-52-15510.html

Part1から10まで全部DLします。(結構重いので時間かかります。)
ファイル「TD752SP01.part01.rar」
を指定して解凍すると、全部解凍されます。

GUIのインストールについては、下記を参照
https://matsukawar.hatenablog.com/entry/2019/05/06/172154#SAP-GUI-for-JAVA

4: AWSでLinuxのインスタンス_Ubuntuを立てる

EC2で下記のインスタンスを立てます。

  • Ubuntu Server 18.04 LTS (HVM), SSD Volume Type - ami-09b68f5653871885f

  • インスタンスタイプ:t2.learge

    • ハードウェア要件の at least 4 GB RAM and about 8 GB swap spaceに対応
  • ストレージ:120GB

    • ハードウェア要件の about 100 GB free disk space for the server installation に対応

完全に無料枠を超えているのでお金かかります。ご注意を。

5: MACからSSHで接続

SSH接続のやり方は下記を参考
https://dev.classmethod.jp/cloud/aws/first-login-to-ec2-linux/

著者はMacなので、ターミナルから接続しましたが、WindowsユーザーならTera Term や PuTTYでやります。

6: 各種設定

SAP AS ABAP 7.51 SP2 – Developer Edition to Download: Concise Installation Guide
に書いてある↓をやります。

Additional software requirement

The following software packages are required:
* csh – Ubuntu and Debian require you to install csh before you start the ABAP installation
* libaio – SAP Sybase ASE requires the libaio library to start the installation
* uuidd – SAP AS ABAP requires the OS to run uuidd service to ensure the uniqueness of GUIDs. For more information – eg on why this is extremely important – please see archive thread 3379688: Is it mandatory to have uuidd for SAP installation
* English – SAP AS ABAP requires that you configure English (LANG=en_US.UTF-8) as the >operating system language

打つコマンドは下記を参照。
https://eprs.online/2018/09/18/installing-as-abap-752-sp01-with-ubuntu-18-04-1-lts/?print=print#install-ubuntu

7: GUI接続する

要するにリモートデスクトップします。
リモデをしたいのは、Ubuntuの側からブラウザ経由でNetweaverのインストーラーを落としてくるためです。
(「3: SAP GUIのダウンロード・インストール」でローカルにインストーラーファイルを落としているので、そいつらをローカルからUbutuにアップするならGUIはいらないかも。。)

方法は下記を参照。
https://qiita.com/yonell/items/cb1a735bed2d7b9c6b45

デスクトップは、Xfceを使いました。
こんな感じで、粛々とコマンドを叩きます。
こんな感じで、粛々とコマンドを叩きます。.png

あと↓のサイトの前半のコマンドも叩きました。
https://qiita.com/tmikada/items/be27df3affc56eeffd8b

何がどう影響したかは覚えてないです。(すいません。)

成功したらこんな感じです。
成功したらこんな感じです。.png

8: ブラウザ経由でNetweaverのインストーラーをダウンロード

好みのブラウザをインストールして、下記のページにたどり着きます。(著者はFirefoxを使いましたが、インストールのコマンドは忘れました。)

FireFoxのインストールは、下記のリンク参照。
https://lookbackmargin.home.blog/2017/11/15/52196065/

https://www.sap.com/developer/trials-downloads/additional-downloads/sap-netweaver-as-abap-developer-edition-sp01-7-52-15510.html
下記の公式のページにたどり着きます.png

こんな感じで、ファイル「TD752SP01.part01」から「TD752SP01.part10」まで、粛々とダウンロードします。
粛々とダウンロードします。.png

9: Netweaverのインストーラーを解凍

rarファイルはデフォルトでは解凍できないそうなので、「unrar」ってのをインストールします。
https://zaka-think.com/linux/ubuntu/ubuntu-で「-rar」を解凍する方法/

unrarの使い方は以下を参照。
https://yatta47.hateblo.jp/entry/2019/03/04/060000

↓こんな感じで解凍しました。
unrar x TD752SP01.part01.rar

解凍したら、こんな感じです。
解凍したら、こんな感じです。.png

10: nanoのインストール

Ubuntuで使うエディタをインストールします。
著者は「nano」というエディタを選びました。
http://dotnsf.blog.jp/archives/1066662653.html

11: host名などの設定

↓のリンクのSystem Configurationをやります。
https://eprs.online/2018/09/18/installing-as-abap-752-sp01-with-ubuntu-18-04-1-lts/?print=print#install-ubuntu

System Configuration

  • Start UUIDD Service
    • sudo service uuidd start
  • Update Hostname
    • sudo gedit /etc/hostname
  • Check the IP Address
    • sudo ip addr show
  • Update Hosts sudo gedit /etc/hosts
  • Restart System after changes and validate the changes
    • sudo reboot
  • Check Hosts and Hostname
    • sudo cat /etc/hosts
    • sudo cat /etc/hostname

@mato-599さんのコメントにより、上記手順に誤りがあったことが判明。
詳細は、下部の「2019/8/13追記」を参照

12: Netweaverをインストール

上記リンクに出ている下記の操作をします。

Install AS ABAP and Post-Installation Settings

  • Open Terminal
  • Go To Root User environment
    • sudo -i
  • Navigate to folder having AS ABAP Installation Content e.g.
    • cd /media/sf_
      • if content is further deep then navigate to that folder Further please refer SAP Guide for the installation, from Section D Page 10 onward ( > Install the AS ABAP Server )

ここにたどり着くまで苦節1ヶ月、これでようやく自前のABAP環境が出来上がると思っていたところ、
こんなエラーを吐いて止まっちゃいました。

INFO       2019-07-17 13:41:26.316 (root/sapinst) (startInstallation) [syuxcdir.cpp:147] id=syslib.filesystem.removedDirectory CSyDirectoryImpl::sap_remove(ISyFSErrorHandler * pErrorHandler)
Removed directory /root/.sapinst/vhcalnplci/3364.
Error: sapinst has finished with an error code, please find logs in /tmp/sapinst_instdir
All logs have been written to the file /home/ubuntu/Downloads/install_2019-07-17_13-33-35.log
Please see readme.html to find out how to get help
root@vhcalnplci:/home/ubuntu/Downloads# 

ターミナルを遡ると、↓のエラーを吐いていました。こいつが怪しい。。

Unable to determine parameter "DNS domain name". DNS domain name is not configured in resolv.conf (UNIX) or the registry (Windows) and neither getaddrinfo nor gethostbyname could retrieve it.

出てきたエラーをググったら、↓のページに行き着きました。
https://answers.sap.com/questions/623312/netweaver-751-installation-error-unable-to-determi.html

11: host名などの設定でプライベートIPをセット指定た箇所を、パブリックIPにElasticIPを割り当てて(固定IPにして)再トライしても効果ありませんでした。
DNSがどうこうと言ってますが、いかんせん著者がネットワークもAWSも素人なのであえなくここでリタイアします。

この記事を読んで、同じ事をやろうと思った方は、ぜひ上述のエラーを突破してEC2にAPAP環境を構築してみてください。

2019/8/13追記

有識者の助言につき、#12のエラーを突破することに成功しました。
@mato-599さんありがとうございました!

が、また別のエラーが発生したので、以下の通り共有します。

#11の
↓こちら
https://eprs.online/2018/09/18/installing-as-abap-752-sp01-with-ubuntu-18-04-1-lts/?print=print#install-ubuntu

  • Update Hosts sudo gedit /etc/hosts

の設定が

[固定IP] vhcalnplci vhcalnplci.dummy.nodomain

となってますが、正しくは、

[固定IP] vhcalnplci.dummy.nodomain vhcalnplci

です。
下記の通りになっていれば正解です。

ubuntu@vhcalnplci:~$ hostname -f
vhcalnplci.dummy.nodomain
ubuntu@vhcalnplci:~$ hostname -s
vhcalnplci
ubuntu@vhcalnplci:~$ hostname
vhcalnplci

上記の通りに設定したことで、#12に上げたエラーは出なくなったのですが、代りに以下のエラーが出るようになりました。

a /tmp/sapinst_exe.2497.1565445203/dev_selfex.out
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/control.xml
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/controllerKdbClient.dmp
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/date.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/df.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/hostname.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/instana.xsl
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/keydb.xml
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/rpm.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/rsecssfx.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/sapinst.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/sapinst_dev.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/sapinst_loginquirer.log
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/start_dir.cd
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/stepKeydbClient.dmp
a /tmp/sapinst_instdir/NW73/SBC/STANDARD/syslib_priv.log
################################################
Abort execution because of 
Step returns modlib.jslib.caughtException
################################################

INFO       2019-08-10 13:54:05.275 (root/sapinst) (startInstallation) [syuxcdir.cpp:147] id=syslib.filesystem.removedDirectory CSyDirectoryImpl::sap_remove(ISyFSErrorHandler * pErrorHandler)
Removed directory /root/.sapinst/vhcalnplci/2498.

Error: sapinst has finished with an error code, please find logs in /tmp/sapinst_instdir
All logs have been written to the file /home/ubuntu/Downloads/install_2019-08-10_13-46-41.log
Please see readme.html to find out how to get help
root@vhcalnplci:/home/ubuntu/Downloads# 
Script version: c95e4ee99a5b9ca25fc1d4d872bdc0b9 /home/ubuntu/Downloads/install$
Running on tested distribution ubuntu
Error: libnsl: shared library not found
The following packages can provide the missing dependencies:
  libc6
Do you want to install the packages via your manager? yes/no:
To install this TestDrive you have to accept
the SAP COMMUNITY DEVELOPER License (DEV).
Do you agree to the above license terms? yes/no:
User's response to the accept license prompt = 'yes'
Please enter a password:
Please re-enter password for verification:
extracting data archives...
extracting /home/ubuntu/Downloads/server/TAR/x86_64/dbdata.tgz-*
extracting /home/ubuntu/Downloads/server/TAR/x86_64/dblog.tgz-*
extracting /home/ubuntu/Downloads/server/TAR/x86_64/dbexe.tgz-*
extracting /home/ubuntu/Downloads/server/TAR/x86_64/usrsap.tgz-*
extracting /home/ubuntu/Downloads/server/TAR/x86_64/sapmnt.tgz-*
Checking Linux kernel memory management parameters according to SAP Note 941735

(中略)

################################################
Abort execution because of 
Step returns modlib.jslib.caughtException
################################################

INFO       2019-08-10 13:54:05.275 (root/sapinst) (startInstallation) [syuxcdir.cpp:147] id=syslib.filesystem.removedDirectory CSyDirectoryImpl::sap_remove(ISyFSErrorHandler * pErrorHandler)
Removed directory /root/.sapinst/vhcalnplci/2498.

Error: sapinst has finished with an error code, please find logs in /tmp/sapinst_instdir
All logs have been written to the file /home/ubuntu/Downloads/install_2019-08-10_13-46-41.log
Please see readme.html to find out how to get help
root@vhcalnplci:/home/ubuntu/Downloads# nano install_2019-08-10_13-46-41.log
root@vhcalnplci:/home/ubuntu/Downloads# nano install_2019-08-10_13-46-41.log

  GNU nano 2.9.3           install_2019-08-10_13-46-41.log                      

HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-pol$
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
* ls -ld / /sybase /usr/sap /sapmnt
drwxr-xr-x 25 root root 4096 Aug 10 13:52 /
drwxr-xr-x  3 root root 4096 Jul 17  2018 /sapmnt
drwxr-x---  3 1003 1002 4096 Feb 20  2017 /sybase
drwxr-xr-x  4 root root 4096 Jul 17  2018 /usr/sap
++++ Support data section END ++++
All logs have been written to the file /home/ubuntu/Downloads/install_2019-08-1$
Please see readme.html to find out how to get help

このエラーに対し、以下のことを試しましたが、効果はありませんでした。

5
3
12

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3