開源身份認證工具 FreeIPA 安裝配置大全

安裝伺服器軟體

下一步是安裝伺服器軟體。
yum -y install ipa-server ipa-server-dns bind bind-dyndb-ldap (ENTER)
如果局域網內沒有可用的 DNS,則最好讓 ipasever 自動安裝 dns 服務,安裝時加上「–setup-dns」選項即可。
ipa-server-install –setup-dns (ENTER)
開始設定,系統將輸出如下訊息。
Existing BIND configuration detected, overwrite? [no]:
此處輸入 no,表示不覆蓋 DNS 預設配置。
Server host name [example.com]:
此處使用預設值即可。
Please confirm the domain name [example.com]:
此處同樣使用預設值,表示域名根據主機名稱自動解析。
Please provide a realm name [example.com]:
同樣使用預設值,表示 Kerberos realm name 由 DNS 域名自動生成。
之後在 Directory Manager password 輸入 Directory Manager 密碼,IPA admin password 輸入管理員密碼,以下兩條問題回答 no 即可,分別代表不轉發和不做反向解析。
Do you want to configure DNS forwarders? [yes]: no
Do you want to configure the reverse zone? [yes]: no
最後會看到剛才輸入的資料總結。
The IPA Master Server will be configured with:
Hostname: ipa.example.com
IP address: 192.168.1.12
Domain name: example.com
Realm name: example.com
BIND DNS server will be configured to serve IPA domain with:
Forwarders: No forwarders
Reverse zone: No reverse zone

以下問題回答 yes,表示確認配置。
Continue to configure the system with these values? [no]: yes
接下來系統會自動配置啟動各項服務,看到 Setup complete 便代表安裝完成,別忘了備份在 /root/cacert.p12 的 CA 證書。接下來取得一個 Kerberos 的登入票據,此票據具有時效性,預設為 10 小時,用於登入 Web 界面和使用其他管理命令 。
kinit admin (ENTER)
然後在 Password for admin@example.com 輸入 IPA 系統管理員密碼,要查看票據可用 klist 命令。我們可修改預設 shell。
ipa config-mod –defaultshell=/bin/bash (ENTER)
要修改家目錄,可用以下命令。
ipa config-mod –homedirectory=/tmp (ENTER)

日常管理

如果對安裝過程中的設置不滿意,可以使用以下命令卸載配置。
ipa-server-install –uninstall (ENTER)
然後重新配置,要啟動服務,可用以下命令。
ipactl start (ENTER)
要停止服務,可用以下命令。
ipactl stop (ENTER)
要重啟服務,可用以下命令。
ipactl restart (ENTER)

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。