Show Table of Contents
4.3. 为系统设置主机名
director 的安装和配置过程需要一个完全限定域名(FQDN),这意味着您需要为 director 的主机设置主机名(hostname)。使用以下命令检查主机的主机名:
$ hostname # Checks the base hostname $ hostname -f # Checks the long hostname (FQDN)
如果需要,使用
hostnamectl 设置主机名:
$ sudo hostnamectl set-hostname manager.example.com $ sudo hostnamectl set-hostname --transient manager.example.com
另外,director 还需要在
/etc/hosts 文件中包括一个带有系统主机名和基本名的项。例如,您系统的名称是 manager.example.com,/etc/hosts 则需要包括一个和以下类似的项:
127.0.0.1 manager.example.com manager localhost localhost.localdomain localhost4 localhost4.localdomain4

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.