freeipa

FreeIPA建立HA機制(副本伺服器)

前置準備

  • 準備兩台伺服器
    • lab-ipa-1.example.com => 主要伺服器
    • lab-ipa-2.example.com => 副本伺服器
  • 參考【使用CentOS 7安裝FreeIPA
    • 主要伺服器(lab-ipa-1.example.com)完成所有安裝步驟。
    • 副本伺服器(lab-ipa-2.example.com)安裝至步驟3即可。
  • 副本伺服器請將DNS指向lab-ipa-1.example.com,確保在安裝副本時可以正常解析。

安裝FreeIPA

步驟1:將副本伺服器加入到網域的主機清單內。

$ ipa-client-install --domain=example.com --realm=EXAMPLE.COM --server=lab-ipa-1.example.com

步驟2:執行副本伺服器的安裝。

$ ipa-replica-install

會看到系統顯示一些Error錯誤訊息,請無視,輸入【密碼】,並同意繼續安裝【YES】。

ipaserver.install.installutils: ERROR    Unable to resolve the IP address 192.168.50.201 to a host name, check /etc/hosts and DNS name resolution
Password for [email protected]:【輸入密碼】
ipaserver.install.server.replicainstall: ERROR    Reverse DNS resolution of address 192.168.50.201 (lab-ipa-1.example.com) failed. Clients may not function properly. Please check your DNS setup. (Note that this check queries IPA DNS directly and ignores /etc/hosts.)
Continue? [no]:【輸入YES】

稍等一會,系統會自動完成相關的安裝程序,直到看到以下訊息就表示安裝好副本伺服器了。

...
Applying LDAP updates
Upgrading IPA:. Estimated time: 1 minute 30 seconds
  [1/10]: stopping directory server
  [2/10]: saving configuration
  [3/10]: disabling listeners
  [4/10]: enabling DS global lock
  [5/10]: disabling Schema Compat
  [6/10]: starting directory server
  [7/10]: upgrading server
  [8/10]: stopping directory server
  [9/10]: restoring configuration
  [10/10]: starting directory server
Done.
Finalize replication settings
Restarting the KDC

WARNING: The CA service is only installed on one server (lab-ipa-1.example.com).
It is strongly recommended to install it on another server.
Run ipa-ca-install(1) on another master to accomplish this.

訊息最後有提示CA服務只有在主要伺服器執行,強烈建議在副本也建立,所以我就接著安裝CA服務。

步驟3:在副本伺服器(lab-ipa-2.example.com)安裝CA服務。

$ ipa-ca-install

系統會要求提供密碼Directory Manager的密碼。

Directory Manager (existing master) password:

看到以下訊息就代表安裝完成了。

Done configuring certificate server (pki-tomcatd).
Updating DNS system records

驟4:透過網頁管理介面檢查主副本的拓樸及服務狀態。

【IPA服務器】>>【拓樸】

可以看到IPA服務器清單內有兩台主機,並且都具有domain與ca角色,這樣就代表副本伺服器安裝完成了。

相關文章

~ END ~


, ,

Related posts

Latest posts