4.2. non-root ユーザーとして新しいインスタンスをインストール

root 権限なしで Directory Server をインストールする場合、対話型インストーラを使用できます。インストール後、Directory Server はカスタムの場所にインスタンスを作成し、ユーザーは通常どおり dscreatedsctldsconf ユーティリティーを実行できます。

前提条件

  • non-root インストール用の環境を準備している。
  • firewall-cmd ユーティリティーを使用するための sudo 権限がある (外部から Directory Server インスタンスを使用できるようにする場合)。

手順

  1. 対話型インストーラーを使用したインスタンスの作成

    1. 対話型インストーラーを起動します。

      $ dscreate interactive
    2. 対話型インストーラーの質問に答えます。

      インストーラーのほとんどの質問の後ろにある角括弧内に表示されるデフォルト値を使用するには、値を入力せずに Enter キーを押します。

      注記

      インストール中に、1024 より大きい インスタンスポートとセキュアポートの番号 (たとえば 1389 と 1636) を選択する必要があります。選択しない場合、ユーザーは特権ポート (1-1023) にバインドする権限を持ちません。

      Install Directory Server (interactive mode)
      ===========================================
      Non privileged user cannot use semanage, will not relabel ports or files.
      
      Selinux support will be disabled, continue? [yes]: yes
      
      Enter system's hostname [server.example.com]:
      
      Enter the instance name [server]: instance_name
      
      Enter port number [389]: 1389
      
      Create self-signed certificate database [yes]:
      
      Enter secure port number [636]: 1636
      
      Enter Directory Manager DN [cn=Directory Manager]:
      
      Enter the Directory Manager password: password
      Confirm the Directory Manager Password: password
      
      Enter the database suffix (or enter "none" to skip) [dc=server,dc=example,dc=com]: dc=example,dc=com
      
      Create sample entries in the suffix [no]:
      
      Create just the top suffix entry [no]: yes
      
      Do you want to start the instance after the installation? [yes]:
      
      Are you ready to install? [no]: yes
      注記

      クリアテキストでパスワードを設定する代わりに、pwdhash ユーティリティーで生成された {algorithm}hash 文字列を設定できます。

  2. オプション: 外部から Directory Server インスタンスを使用できるようにする場合、以下を行います。

    1. ファイアウォールでポートを開きます。

      # sudo firewall-cmd --permanent --add-port={1389/tcp,1636/tcp}
    2. ファイアウォール設定を再読み込みします。

      # sudo firewall-cmd --reload

検証

  • ldapsearch コマンドを実行して、ユーザーがインスタンスに接続できることをテストします。

    $ ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com:1389 -b "dc=example,dc=com" -s sub -x "(objectclass=*)"