1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AIX の NIM(Network Installation Manager) で http/https プロトコルを使用する

Last updated at Posted at 2025-04-25

はじめに

一般的な(伝統的な) AIX NIM(Network Installation Manager) を構成するケースではあまり見かけませんが、実は AIX の NIM は http/https プロトコルを使用することができます。


AIXマニュアル -> "NIM を使用して、AIX 更新および新規パッケージを HTTP プロトコル経由でインストール"

Network Installation Manager (NIM) は、ネットワーク・ファイル・サーバー (NFS) の使用を制限する新しいデータ・センター・ポリシーに準拠するために、Hypertext Transfer Protocol Secure (HTTP) プロトコルを介した AIX® 更新のインストールをサポートします。

NFS が NGの場合などを背景として出てきた機能のようですね。

実装方法を確認しました。(コマンド1つです)


環境

・AIX 7.2 TL5 SP9

# oslevel -s
7200-05-09-2446

nim master と nim spot を導入。

# lslpp -l | grep nim
  bos.sysmgt.nim.client    7.2.5.203  COMMITTED  Network Install Manager -
  bos.sysmgt.nim.master    7.2.5.204  COMMITTED  Network Install Manager -
  bos.sysmgt.nim.spot      7.2.5.203  COMMITTED  Network Install Manager - SPOT
  bos.sysmgt.nim.client    7.2.5.203  COMMITTED  Network Install Manager -

NIM HTTP の設定

NIMサーバー用のファイルセットが導入されていても、NIMサーバーのセットアップを実行していない場合、nimconfig -hコマンドは失敗します。


・nimconfig コマンド
https://www.ibm.com/docs/en/aix/7.2?topic=ssw_aix_72/n_commands/nimconfig.html


  • NIM構成前
# nimconfig -h
0042-011 nimconfig: unable to access the /etc/niminfo file
#

  • NIMサーバー構成後
# nimconfig -h
0513-077 Subsystem has been changed.
0513-059 The nimhttp Subsystem has been started. Subsystem PID is 13762826.
#

nimhttp サブシステムが起動しました。

サービスも active 状態です。

# lssrc -a | grep nim
 nimesis          nim              14352748     active
 nimhttp                           13762826     active
 nimsh            nimclient                     inoperative
 nimd                                           inoperative
#

デフォルト設定では nimhttp は 4901 ポートを使用します。/etc/services に記載があります。

#  cat  /etc/services  | grep nimhttp
nimhttp         4901/tcp
nimhttp         4901/udp
#

HTTP構成はデフォルトで /httpd.conf が設定されています。
ドキュメントルートは /export/nim/が指定されています。

/httpd.conf
#
#---------------------
# http service defines
#---------------------
#
service.name=nimhttp
# Designates the service name used when discovering the listening port for requests (i.e., nimhttp)
#
service.log=/var/adm/ras/nimhttp.log
# Log of access attempts and equivalent responses. Also useful for debug purposes.
#
# service.proxy_port=
# Designates the service port number used when configured as a proxy.
#
# service.access_list=
# White-list of IP (host) addresses which have access to our http file service. All others are denied.
#
#
#---------------------
# http configuration
#---------------------
#
document_root=/export/nim/
# Designates the directory to serve files from.
#
enable_directory_listing=yes
#enable_directory_listing=no
# Allow requests for listing served files/directories under the document root.
#
enable_proxy=no
# Enable the web service to act as a proxy server.
#
ssl.cert_authority=/ssl_nimsh/certs/root.pem
# Designates the file location of the certificate authority used for digital certificate signing.
#
ssl.pemfile=/ssl_nimsh/certs/server.pem
# Designates the file location of the PEM format file which contains both a certificate and private key.
#

Web ブラウザのGUI表示を確認

Webブラウザで4901ポートにアクセスします。

以下は、ポートフォワーディングしているため http://localhost:4901 でアクセスしています。

http.png

"DIR scripts" の表示があります。

document_root の /export/nim/ と一致しています。

# ls -l /export/nim/
total 0
drwxrwxr-x    2 root     system          256 Apr 17 20:51 scripts
#

Secure Socket Layer (SSL) 設定

SSLの設定を行います。

# nimconfig -c
0513-029 The tftpd Subsystem is already active.
Multiple instances are not supported.
NIM_MASTER_HOSTNAME=testnim
x - /usr/lib/libssl.so.3
x - /usr/lib/libcrypto.so.3
Target "all" is up to date.
.+...+.+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+..+.......+...+........+......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+..+...............+....+...+..+....+...............+.....+.......+..+......+.......+...+.....+....+..+...+............+....+.....+....+.....+...+...+...............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.+.........+..+....+..+.......+......+.....+......+....+...........+......+.......+.....+..........+........+...+....+..+.+..+.......+...+..+..........+......+.....+....+......+..+......+......+.............+...+............+...+...+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+...+.......+......+.........+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+..................+...+......+......+.............+....................+.+...+......+.....+.......+..............+...+.......+...+.................+......+....+...+..+...+......+.......+..+.+......+.........+.....+......+....+......+.....+.............+......+.........+......+......+...........+..........+..+......+.+...+.....+.+.....+.......+..+...+....+..............+.+...........+...+....+..+...+..................+...+.......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
Certificate request self-signature ok
subject=C = US, ST = Texas, L = Austin, O = ibm.com, CN = Root CA
.......+..............+...+.......+.....+......+....+.................+......+...+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+...+..........+..+.........+.+...+..+......+..........+...+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+...+............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...+...+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.........+.+.........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*........+...+...+.+.....+.............+......+...........+....+..+.......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
Certificate request self-signature ok
subject=C = US, ST = Texas, L = Austin, O = ibm.com
..+.+...+.....+....+..+...+...+....+...+...+............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+...........+......+...+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+......+...+............+.........+.+.....+.......+......+......+...........+...+...............+....+.................+....+...........+.+.....+.........+....+.........+...+.........+.....+......+.............+..+.........+..........+.....+...+.+.........+.....+......+.+...+........+.......+...+.........+...+.....+...+...+.+...........+.......+.....+......+..........+......+...+.....+.......+.....+.+..............+.+..+.+..............+.+..+..........+..+.+......+...+.....+................+......+...............+...+......+..+.............+..+.............+.....+....+...+..+.............+..+.+............+........+......+......+...+....+...+........+....+...+.........+..............+....+...+...+......+......+...+......+.....+...+............+...............+.........+......+.+...+..............+......+............+...+....+..+.........+.......+.........+......+............+...+...+..+.........+.+...+..+............+..........+............+......+...+.....+.......+.........+........................+..+...+....+..+......+.........+.............+.....+.+.....+.+.....+.........+.+...........+...+.+..............+.......+...+.....+....+..+...+.+..+....+.....+...+.+..+....+..............+.+.....+..........+.........+......+......+..+...+...+.......+...+..+......................+............+...+...+..+..........+.....+......+.........+...+............+...+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
............+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+.....+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.+..+......+....+...+...+.....+......+.+..+.+..............+..........+...........+....+..+................+.........+.....+...+...+...+.+......+............+...+..+...+....+.........+.....+............+...+......+...+.+............+...+...........+...+...+.............+..+.......+.....+..........+....................+......+.+......+..+......+.......+...+.....+.+...............+...+..+.+............+............+...+..+......+....+....................+....+......+.........+.........+..+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
Certificate request self-signature ok
subject=C = US, ST = Texas, L = Austin, O = ibm.com
#

SSL設定で再起動がかかったかどうかが確認できなかったため、nimhttpを再構成しました。


  • nimhttp の解除
# nimconfig -H

  • nimhttp を構成
# nimconfig -h
0513-077 Subsystem has been changed.
0513-059 The nimhttp Subsystem has been started. Subsystem PID is 12648844.
#

再起動後、"https://localhost:4901" にアクセスします。
先ほど同じく、/export/nim/ディレクトリの内容が見えています。

https.png

http ではアクセス不可でした。

http.png

SSLの設定が簡単にできてセキュリティを高められる点は良いですね。


おわりに

nim http の設定方法を確認しました。

NFS でない NIM プロトコルを使用されたい場合などで実装検討いただければと思います。


以上です。

1
1
3

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?