差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:389-directory-server [2013/10/02 15:21] – [setup-ds-admin.pl の実行] ともやん | linux:389-directory-server [2019/05/18 02:23] (現在) – 外部編集 非ログインユーザー | ||
---|---|---|---|
行 3: | 行 3: | ||
日本語の文献を探す場合は、Fedora Directory Server(FDS) を検索する方が良いかもしれません。\\ | 日本語の文献を探す場合は、Fedora Directory Server(FDS) を検索する方が良いかもしれません。\\ | ||
\\ | \\ | ||
- | 以降では、Fedora | + | 以降では、Fedora |
===== 389-ds のインストール ===== | ===== 389-ds のインストール ===== | ||
行 20: | 行 20: | ||
サービス実行ユーザーの作成 | サービス実行ユーザーの作成 | ||
< | < | ||
- | $ sudo groupadd -g 10000 389ds | + | $ sudo groupadd -g 10000 ldap |
- | $ sudo useradd -u 10000 -g 389ds 389ds | + | $ sudo useradd -u 10000 -g ldap ldap |
</ | </ | ||
===== Linuxのチューニング ===== | ===== Linuxのチューニング ===== | ||
行 49: | 行 49: | ||
==== ファイルディスクリプタ上限の変更 ==== | ==== ファイルディスクリプタ上限の変更 ==== | ||
+ | | ||
< | < | ||
$ sudo vi / | $ sudo vi / | ||
</ | </ | ||
< | < | ||
- | # End of file | ||
* | * | ||
* | * | ||
</ | </ | ||
+ | < | ||
+ | $ sudo vi / | ||
+ | </ | ||
+ | < | ||
+ | ulimit -n 8192 | ||
+ | </ | ||
==== ネットワークパラメータの変更 ==== | ==== ネットワークパラメータの変更 ==== | ||
+ | | ||
< | < | ||
$ sudo vi / | $ sudo vi / | ||
行 67: | 行 74: | ||
</ | </ | ||
+ | ==== チューニングの反映 ==== | ||
+ | < | ||
+ | $ sudo reboot | ||
+ | </ | ||
===== 初期設定のバックアップ ===== | ===== 初期設定のバックアップ ===== | ||
初期状態に戻すことを可能にするために、以下のコマンドを実行してディレクトリのバックアップを行う。 | 初期状態に戻すことを可能にするために、以下のコマンドを実行してディレクトリのバックアップを行う。 | ||
< | < | ||
- | $ sudo cp -a /etc/dirsrv / | + | $ sudo cp -rf /etc/dirsrv / |
</ | </ | ||
===== setup-ds-admin.pl の実行 ===== | ===== setup-ds-admin.pl の実行 ===== | ||
行 162: | 行 173: | ||
system utilities. | system utilities. | ||
- | System User [nobody]: | + | System User [nobody]: |
- | System Group [nobody]: | + | System Group [nobody]: |
</ | </ | ||
- | サービスを特定のユーザー/ | + | サービスを特定のユーザー/ |
< | < | ||
============================================================================== | ============================================================================== | ||
行 190: | 行 202: | ||
</ | </ | ||
既存のディレクトリサーバーが存在しない場合は、Enter キーを入力して続行する。 | 既存のディレクトリサーバーが存在しない場合は、Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 197: | 行 210: | ||
Configuration directory server | Configuration directory server | ||
- | administrator ID [admin]: | + | administrator ID [admin]: |
- | Password: | + | Password: |
Password (confirm): | Password (confirm): | ||
</ | </ | ||
- | コンフィギュレーションディレクトリサーバーの管理者IDとパスワードを設定する。\\ | + | ディレクトリサーバーの管理者IDとパスワードを設定する。\\ |
管理者IDはデフォルトのまま Enter キーを入力し、任意のパスワードを入力する。\\ | 管理者IDはデフォルトのまま Enter キーを入力し、任意のパスワードを入力する。\\ | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 219: | 行 233: | ||
</ | </ | ||
管理ドメインはデフォルトのまま Enter キーを入力して続行する。 | 管理ドメインはデフォルトのまま Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 227: | 行 242: | ||
superuser, that port 389 is not in use. | superuser, that port 389 is not in use. | ||
- | Directory server network port [389]: | + | Directory server network port [389]: |
</ | </ | ||
ディレクトリサーバーのポート番号もデフォルトのまま Enter キーを入力して続行する。 | ディレクトリサーバーのポート番号もデフォルトのまま Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 237: | 行 253: | ||
as well as for other uses as a server instance identifier. | as well as for other uses as a server instance identifier. | ||
- | Directory server identifier [monster]: | + | Directory server identifier [green-ds]: |
</ | </ | ||
ディレクトリサーバーの識別子もデフォルトのまま Enter キーを入力して続行する。 | ディレクトリサーバーの識別子もデフォルトのまま Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 250: | 行 267: | ||
Use the directory server utilities to create additional suffixes. | Use the directory server utilities to create additional suffixes. | ||
- | Suffix [dc=fireball, | + | Suffix [dc=fireball, |
</ | </ | ||
ディレクトリサーバーのサフィックスもデフォルトのまま Enter キーを入力して続行する。 | ディレクトリサーバーのサフィックスもデフォルトのまま Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 268: | 行 286: | ||
ディレクトリマネージャのDN(識別名)とパスワードを設定する。\\ | ディレクトリマネージャのDN(識別名)とパスワードを設定する。\\ | ||
DNはデフォルトのまま Enter キーを入力し、任意のパスワードを入力する。\\ | DNはデフォルトのまま Enter キーを入力し、任意のパスワードを入力する。\\ | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 279: | 行 298: | ||
will remember and which will not be used for anything else. | will remember and which will not be used for anything else. | ||
- | Administration port [9830]: | + | Administration port [9830]: |
</ | </ | ||
管理サーバーのポート番号もデフォルトのまま Enter キーを入力して続行する。 | 管理サーバーのポート番号もデフォルトのまま Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
============================================================================== | ============================================================================== | ||
行 287: | 行 307: | ||
servers. | servers. | ||
- | Are you ready to set up your servers? [yes]: | + | Are you ready to set up your servers? [yes]: |
</ | </ | ||
問い合わせに対して Enter キーを入力して続行する。 | 問い合わせに対して Enter キーを入力して続行する。 | ||
+ | |||
< | < | ||
Creating directory server . . . | Creating directory server . . . | ||
- | Your new DS instance 'monster' was successfully created. | + | Your new DS instance 'green-nas' was successfully created. |
Creating the configuration directory server . . . | Creating the configuration directory server . . . | ||
Beginning Admin Server creation . . . | Beginning Admin Server creation . . . | ||
行 305: | 行 326: | ||
Admin server was successfully created, configured, and started. | Admin server was successfully created, configured, and started. | ||
Exiting . . . | Exiting . . . | ||
- | Log file is '/tmp/setupF6cGLQ.log' | + | Log file is '/tmp/setupwakfkC.log' |
</ | </ | ||
ディレクトリサーバーの作成、管理サーバーの構成が行われて、サービスが起動される。 | ディレクトリサーバーの作成、管理サーバーの構成が行われて、サービスが起動される。 | ||
+ | ===== サービス自動起動設定 ===== | ||
+ | < | ||
+ | $ sudo systemctl enable dirsrv-admin.service | ||
+ | $ sudo systemctl enable dirsrv@green-ds.service | ||
+ | </ | ||
+ | |||
+ | ===== firewall設定 ===== | ||
+ | < | ||
+ | $ sudo firewall-cmd --permanent --add-service=ldap | ||
+ | $ sudo firewall-cmd --permanent --add-service=ldaps | ||
+ | $ sudo firewall-cmd --permanent --add-port=9830/ | ||
+ | $ sudo firewall-cmd --reload | ||
+ | </ | ||
+ | < | ||
+ | $ sudo firewall-cmd --list-services | ||
+ | ipp-client mdns ldaps dhcpv6-client ldap | ||
+ | $ sudo firewall-cmd --list-ports | ||
+ | 9830/tcp | ||
+ | </ | ||
+ | |||
===== ディレクトリサーバーと管理サーバーの起動確認 ===== | ===== ディレクトリサーバーと管理サーバーの起動確認 ===== | ||
以下のコマンドを実行してプロセスが起動していることを確認する。 | 以下のコマンドを実行してプロセスが起動していることを確認する。 | ||
< | < | ||
- | # ps ax | grep dirsrv | + | $ ps aux | grep ldap |
- | 7604 ? Sl | + | ldap 1104 0.1 1.0 1090784 20536 ? |
- | slapd-monster.pid -w / | + | slapd-green-ds |
- | 7817 ? Ss 0:00 / | + | ldap 1190 |
- | 7818 ? S | + | / |
- | | + | |
- | 8542 pts/1 S+ 0:00 grep --color=auto dirsrv | + | |
</ | </ | ||
^ プロセスの説明 | ^ プロセスの説明 | ||
行 330: | 行 368: | ||
</ | </ | ||
- | ===== サービス自動起動設定 | + | ===== Directory Server インスタンスの削除 |
- | CentOSが起動するときに、ディレクトリサーバーと管理サーバーを自動起動するには、以下のコマンドにてサービスの設定を on にしておく。 | + | |
< | < | ||
- | # chkconfig | + | $ sudo remove-ds.pl -i slapd-instancename |
- | # chkconfig | + | </ |
+ | ===== トラブルシューティング ===== | ||
+ | ==== dirsrv-admin.service が起動しない ==== | ||
+ | ステータスを確認すると、以下のエラーが出力されている。 | ||
+ | < | ||
+ | $ sudo systemctl status | ||
+ | </ | ||
+ | < | ||
+ | PID file / | ||
+ | dirsrv-admin.service never wrote its PID file. Failing. | ||
+ | Failed to start 389 Administration Server.. | ||
+ | Unit dirsrv-admin.service entered failed state. | ||
+ | </ | ||
+ | |||
+ | [[https:// | ||
+ | < | ||
+ | $ cat / | ||
+ | </ | ||
+ | < | ||
+ | d /var/dirsrv 0770 ldap ldap | ||
+ | d / | ||
+ | d / | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | $ sudo vi / | ||
+ | </ | ||
+ | < | ||
+ | d /var/dirsrv 0770 ldap ldap | ||
+ | d / | ||
+ | d / | ||
+ | d / | ||
+ | </ | ||
+ | |||
+ | 再起動する。 | ||
+ | < | ||
+ | $ sudo reboot | ||
</ | </ | ||
行 341: | 行 415: | ||
[[http:// | [[http:// | ||
[[http:// | [[http:// | ||
+ | [[http:// |