LoginSignup
0
1

More than 1 year has passed since last update.

docker で IHS をリモートにたてた形の実現

Posted at

あらまし

WebSphere Application Server (traditional) を docker で動かした。お次に実際の運用環境を想定して WEB サーバーをたてる。 IBM HTTP Server の docker を取得して、順次構成していく。

自分の試したコマンドを記録する。

今回の最終目標

IHS 経由で WebSphere Application Server 上のアプリを呼び出せること。

Docker イメージの取得とコンテナ起動

docker hub から取得しつつ起動

ibmcom/ibm-http-server の記載されている次のコマンドを実行。

docker run --name ihs -h ihs -p 80:80 -it ibmcom/ibm-http-server bash

この段階ではまだ IHS は稼働していない。
次のコマンドを実行し IHS を起動する。

docker exec -d ihs /opt/IBM/HTTPServer/bin/apachectl start

Web ブラウザで http://localhost/ にアクセスし IHS のウェルカム画面が表示されることを確認。

IHS の停止。

docker exec -d ihs /opt/IBM/HTTPServer/bin/apachectl stop

IHS の構成

実施手順の参照先

Knowledge Center の IBM HTTP Server バージョン 9.0 の構成 と、それの子。

実施内容

IHS のコンテナで bash を起動して対話モードに入る。

docker exec -it ihs /bin/bash

IHS WEB サーバーの構成

アーキテクチャーの確認。

root@ihs> /opt/IBM/HTTPServer/bin/versionInfo.sh | grep Architecture
Architecture          x86-64 (64 bit)
Architecture    x86-64 (64 bit)

vi をインストールして vi で httpd.conf の最下行に Knowledge Center の指示通り追記。

root@ihs> apt-get update
root@ihs> apt-get install vim # vi が使えなかったのでインストール
root@ihs> vi /opt/IBM/HTTPServer/conf/httpd.conf

## 以下を再下行へ追加(64bits となっているのは上で 64 bit だったから)
LoadModule was_ap24_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap24_http.so
WebSpherePluginConfig /opt/IBM/WebSphere/Plugins/config/サーバー名/plugin-cfg.xml

ここで WebSpherePluginConfig については、IHS と WebSphere Application Server が別ノードの場合の指定が上記の内容。それ以外は「IBM HTTP Server バージョン 9.0 の構成」を参照。

ディレクトリーの作成とファイルのコピー。
パス中の「サーバー名」は WAS 上でプラグイン作成のために定義する Webサーバーの名前。

root@ihs> mkdir -p /opt/IBM/WebSphere/Plugins/{logs,config}/サーバー名
root@ihs> cp /opt/IBM/WebSphere/Plugins/etc/plugin-key* /opt/IBM/WebSphere/Plugins/config/サーバー名/          
root@ihs> cp /opt/IBM/WebSphere/Plugins/config/templates/plugin-cfg.xml /opt/IBM/WebSphere/Plugins/config/サーバー名/

IHS 管理サーバーの構成

管理サーバーを WebSphere Application Server の管理コンソールから起動、停止するための構成。

管理ユーザー用のグループとユーザーの追加。

root@ihs> groupadd グループ名
root@ihs> useradd -g グループ名 ユーザー名

管理ユーザーのパスワード設定。

root@ihs> cd /opt/IBM/HTTPServer/conf
root@ihs> ../bin/htpasswd -b admin.passwd ユーザー名 パスワード

ディレクトリー、ファイルへの権限の設定と admin.conf の更新。

root@ihs> cd /opt/IBM/HTTPServer
root@ihs> bin/setupadm -usr ユーザー名 -grp グループ名 -cfg /opt/IBM/HTTPServer/conf/httpd.conf -adm /opt/IBM/HTTPServer/conf/admin.conf -plg /opt/IBM/WebSphere/Plugins/config/サーバー名/plugin-cfg.xml
root@ihs> vim conf/admin.conf

## @@AdminPort@@ を 8008 に置換し保存する
Listen @@AdminPort@@
ServerName <16進数>:@@AdminPort@@

サーバーの起動

管理サーバーの起動。

root@ihs> cd bin
root@ihs> ./adminctl start

WEB サーバーの起動。

root@ihs> ./apachectl start

ここまで、とりあえず設定のメモを書いた。現時点でこれで意図通りになっているかどうか確認出来ていない。先へ進む前に最低限のところを確認する。

0
1
0

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
0
1