使用 DNS 安裝 FreeIPA -- 網路錯誤:無法連線到 'ldap://labipa.example.com:389'

使用 DNS 安裝 FreeIPA -- 網路錯誤:無法連線到 'ldap://labipa.example.com:389'

我使用的環境:

Red Hat Enterprise Linux 7.4
Virtualbox

我已經安裝了所有必需的軟體包:

yum -y install ipa-server bind-dyndb-ldap ipa-server-dns

在我的 /etc/hosts 中加入了以下內容:

192.168.1.1      labipa.example.com labipa

安裝帶有 DNS 的 FreeIPA:

ipa-server-install --setup-dns --allow-zone-overlap

Server host name: labipa.example.com
Directory Manager password: ~~password~~
IPA admin password: ~~password~~
Enter IP address for a DNS forwarder: 8.8.8.8
Do you want to search for missing reverse zones? yes

[37/45]: initializing group membership
[error] NetworkError: cannot connect to 'ldap://labipa.example.com:389': 
ipa.ipapython.install.cli.install_tool(CompatServerMasterInstall): ERROR    cannot connect to 
'ldap://labipa.example.com:389': 
ipa.ipapython.install.cli.install_tool(CompatServerMasterInstall): ERROR    The ipa-server-install command 
failed. See /var/log/ipaserver-install.log for more information

我嘗試修復的步驟:

firewall-cmd --permanent --add-service=ldap
firewall-cmd --reload

答案1

安裝程式會要求您提供 DNS 轉發器,然後它可能會使用該轉發器來解析任何 DNS 查找。

因為您指定了 8.8.8.8,所以它無法計算 labipa.example.com 指向您的電腦。

您可以安裝 dnsmasq 之類的東西,讓它讀取您的 /etc/hosts 項目,然後告訴 freeipa 安裝程式使用 127.0.0.1 作為您的 DNS 轉發器。

這裡是關於執行此操作的 RedHat 指南。它需要一個 RedHat 支援帳戶(但您使用的是 RedHat,所以可能有一個帳戶)。有一個相似的stackexchange 上也有解決方案

相關內容