差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| linux:389-directory-server [2013/10/02 15:02] – [Linuxサーバーのチューニング] ともやん | 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 / | ||
| 行 64: | 行 71: | ||
| < | < | ||
| net.ipv4.ip_local_port_range = 1024 65000 | net.ipv4.ip_local_port_range = 1024 65000 | ||
| - | net.ipv4.tcp_keepalive_time = 1800 | + | net.ipv4.tcp_keepalive_time = 300 | 
| </ | </ | ||
| + | ==== チューニングの反映 ==== | ||
| + | < | ||
| + | $ sudo reboot | ||
| + | </ | ||
| ===== 初期設定のバックアップ ===== | ===== 初期設定のバックアップ ===== | ||
| 初期状態に戻すことを可能にするために、以下のコマンドを実行してディレクトリのバックアップを行う。 | 初期状態に戻すことを可能にするために、以下のコマンドを実行してディレクトリのバックアップを行う。 | ||
| < | < | ||
| - | $ sudo cp -a /etc/dirsrv / | + | $ sudo cp -rf /etc/dirsrv / | 
| </ | </ | ||
| ===== setup-ds-admin.pl の実行 ===== | ===== setup-ds-admin.pl の実行 ===== | ||
| 行 91: | 行 102: | ||
| </ | </ | ||
| セットアップを続行する場合は、そのまま Enter キーを入力する。 | セットアップを続行する場合は、そのまま Enter キーを入力する。 | ||
| - | < | ||
| - | ============================================================================== | ||
| - | BY SETTING UP AND USING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY | ||
| - | AND ARE BECOMING A PARTY TO THE AGREEMENT FOUND IN THE | ||
| - | LICENSE.TXT FILE. IF YOU DO NOT AGREE TO ALL OF THE TERMS | ||
| - | OF THIS AGREEMENT, PLEASE DO NOT SET UP OR USE THIS SOFTWARE. | ||
| - | Do you agree to the license terms? [no]: yes | ||
| - | </ | ||
| - | ライセンス条件に同意する場合は yes と入力する。 | ||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 108: | 行 110: | ||
| environment. | environment. | ||
| - | 389 Directory Server system tuning analysis version | + | 389 Directory Server system tuning analysis version | 
| - | NOTICE : System is x86_64-unknown-linux2.6.35.9-64.fc14.x86_64 (2 processors). | + | NOTICE : System is x86_64-unknown-linux3.11.1-200.fc19.x86_64 (1 processor). | 
| - | NOTICE : The net.ipv4.tcp_keepalive_time is set to 7200000 milliseconds | + | Would you like to continue? [yes]: | 
| - | (120 minutes). | + | </ | 
| - | client connections. | + | 通知のみなので、そのまま Enter キーを入力して続行する。 | 
| - | WARNING: There are only 1024 file descriptors (hard limit) available, which | ||
| - | limit the number of simultaneous connections. | ||
| - | |||
| - | WARNING: There are only 1024 file descriptors (soft limit) available, which | ||
| - | limit the number of simultaneous connections. | ||
| - | |||
| - | Would you like to continue? [no]: yes | ||
| - | </ | ||
| - | 警告など表示されるが、セットアップを続行する場合は、yes と入力する。 | ||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 138: | 行 131: | ||
| 3. Custom | 3. Custom | ||
| - |  | + |  | 
|  |  | ||
| To accept the default shown in brackets, press the Enter key. | To accept the default shown in brackets, press the Enter key. | ||
| - | Choose a setup type [2]: | + | Choose a setup type [2]: | 
| </ | </ | ||
| セットアップタイプはデフォルトのまま Enter キーを入力して続行する。 | セットアップタイプはデフォルトのまま Enter キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 155: | 行 149: | ||
| To accept the default shown in brackets, press the Enter key. | To accept the default shown in brackets, press the Enter key. | ||
| - | Computer name [monster.fireball.local]: | + | Warning: This step may take a few minutes if your DNS servers | 
| + | can not be reached or if DNS is not configured correctly. | ||
| + | you would rather not wait, hit Ctrl-C and run this program again | ||
| + | with the following command line option to specify the hostname: | ||
| + | |||
| + | General.FullMachineName=your.hostname.domain.name | ||
| + | |||
| + | Computer name [green-ds.fireball.local]: | ||
| </ | </ | ||
| コンピュータ名はデフォルトのまま Enter キーを入力して続行する。 | コンピュータ名はデフォルトのまま Enter キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| + | |||
| ============================================================================== | ============================================================================== | ||
| The servers must run as a specific user in a specific group. | The servers must run as a specific user in a specific group. | ||
| 行 170: | 行 173: | ||
| system utilities. | system utilities. | ||
| - | System User [nobody]: | + | System User [nobody]: | 
| - | System Group [nobody]: | + | System Group [nobody]: | 
| </ | </ | ||
| - | サービスを特定のユーザー/ | + | サービスを特定のユーザー/ | 
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 198: | 行 202: | ||
| </ | </ | ||
| 既存のディレクトリサーバーが存在しない場合は、Enter キーを入力して続行する。 | 既存のディレクトリサーバーが存在しない場合は、Enter キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 205: | 行 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 キーを入力し、任意のパスワードを入力する。\\ | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 227: | 行 233: | ||
| </ | </ | ||
| 管理ドメインはデフォルトのまま Enter キーを入力して続行する。 | 管理ドメインはデフォルトのまま Enter キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 235: | 行 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 キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 245: | 行 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 キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 258: | 行 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 キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 276: | 行 286: | ||
| ディレクトリマネージャのDN(識別名)とパスワードを設定する。\\ | ディレクトリマネージャのDN(識別名)とパスワードを設定する。\\ | ||
| DNはデフォルトのまま Enter キーを入力し、任意のパスワードを入力する。\\ | DNはデフォルトのまま Enter キーを入力し、任意のパスワードを入力する。\\ | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 287: | 行 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 キーを入力して続行する。 | ||
| + | |||
| < | < | ||
| ============================================================================== | ============================================================================== | ||
| 行 295: | 行 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 . . . | ||
| 行 313: | 行 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 | + | |
| </ | </ | ||
| ^  プロセスの説明 | ^  プロセスの説明 | ||
| 行 338: | 行 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 | ||
| </ | </ | ||
| 行 349: | 行 415: | ||
| [[http:// | [[http:// | ||
| [[http:// | [[http:// | ||
| + | [[http:// | ||