Red Hat Training

A Red Hat training course is available for RHEL 8

7.2. 交互式安装

在使用 ipa-server-install 工具进行交互式安装过程中,您需要提供系统的基本配置,如 realm、管理员的密码和目录管理器的密码。

ipa-server-install 安装脚本在 /var/log/ipaserver-install.log 中创建一个日志文件。如果安装失败,日志可帮助您辨别问题。

按照以下流程安装服务器:

  • 没有集成的 DNS
  • 使用外部证书颁发机构(CA)作为 root CA

先决条件

  • 您已确定了要通过 --external-ca-type 选项指定的外部 CA 的类型。详情请查看 ipa-server-install(1)手册页。
  • 如果您使用 Microsoft Certificate Services 证书颁发机构(MS CS CA)作为外部 CA:您已确定要通过 --external-ca-profile 选项指定的证书配置文件或模板。默认情况下使用 SubCA 模板。

    有关 --external-ca-type--external-ca-profile 选项的更多信息,请参阅 在安装外部 CA 作为根 CA 的 IdM CA 时使用的选项

流程

  1. 使用 --external-ca 选项来运行 ipa-server-install 工具。

    • 如果您使用 Microsoft 证书服务(MS CS) CA,还使用 --external-ca-type 选项,并可选使用 --external-ca-profile 选项:

      [root@server ~]# ipa-server-install --external-ca --external-ca-type=ms-cs --external-ca-profile=<oid>/<name>/default
    • 如果您没有使用 MS CS 为 IdM CA 生成签名证书,则不需要其他选项:

      # ipa-server-install --external-ca
  2. 此脚本提示配置集成的 DNS 服务。按 Enter 键选择默认的 no 选项。

    Do you want to configure integrated DNS (BIND)? [no]:
  3. 该脚本提示输入一些必需的设置,并在括号中提供推荐的默认值。

    • 要接受默认值,请按 Enter 键。
    • 要提供自定义值,请输入所需的值。

      Server host name [server.idm.example.com]:
      Please confirm the domain name [idm.example.com]:
      Please provide a realm name [IDM.EXAMPLE.COM]:
      警告

      仔细规划这些名称。安装完成后您将无法更改它们。

  4. 输入目录服务器超级用户(cn=Directory Manager)和 IdM 管理系统用户帐户(admin)的密码。

    Directory Manager password:
    IPA admin password:
  5. 输入 yes 以确认服务器配置。

    Continue to configure the system with these values? [no]: yes
  6. 在证书系统实例配置过程中,该工具会打印证书签名请求(CSR)的位置: /root/ipa.csr:

    ...
    
    Configuring certificate server (pki-tomcatd): Estimated time 3 minutes 30 seconds
      [1/8]: creating certificate server user
      [2/8]: configuring certificate server instance
    The next step is to get /root/ipa.csr signed by your CA and re-run /sbin/ipa-server-install as:
    /sbin/ipa-server-install --external-cert-file=/path/to/signed_certificate --external-cert-file=/path/to/external_ca_certificate

    当发生这种情况时:

    1. 将位于 /root/ipa.csr 中的 CSR 提交给外部 CA。这个过程根据要用作外部 CA 的服务的不同而有所不同。
    2. 在基础 64 编码 blob 中检索颁发的证书和颁发 CA 的 CA 证书链(Windows CA 的 PEM 文件或 Base_64 证书)。同样,不同的证书服务的进程会有所不同。通常,网页或通知电子邮件中的下载链接允许管理员下载所有需要的证书。

      重要

      确保获取 CA 的完整证书链,而不只是 CA 证书。

    3. 再次运行 ipa-server-install,这次指定新发布的 CA 证书和 CA 链文件的位置和名称。例如:

      # ipa-server-install --external-cert-file=/tmp/servercert20170601.pem --external-cert-file=/tmp/cacert.pem
  7. 安装脚本现在配置服务器。等待操作完成。
  8. 安装脚本生成包含 DNS 资源记录的文件:下面示例输出中的 /tmp/ipa.system.records.UFRPto.db 文件。将这些记录添加到现有的外部 DNS 服务器中。更新 DNS 记录的过程因特定的 DNS 解决方案而异。

    ...
    Restarting the KDC
    Please add records in this file to your DNS system: /tmp/ipa.system.records.UFRBto.db
    Restarting the web server
    ...
    重要

    在将 DNS 记录添加到现有 DNS 服务器之前,服务器安装不会完成。

其他资源

  • 有关您必须添加到 DNS 系统中的 DNS 资源记录的更多信息,请参阅 外部 DNS 系统的 IdM DNS 记录
  • ipa-server-install --external-ca 命令有时可能会失败,并显示以下错误:

    ipa         : CRITICAL failed to configure ca instance Command '/usr/sbin/pkispawn -s CA -f /tmp/pass:quotes[configuration_file]' returned non-zero exit status 1
    Configuration of CA failed

    当设置 *_proxy 环境变量时,会发生此失败。有关此问题的解决方案,请参阅 故障排除:外部 CA 安装失败