freeipa

使用CentOS 7安裝FreeIPA

What Is FreeIPA?

FreeIPA官方網站:https://www.freeipa.org/

安裝環境

  • 作業系統:CentOS 7
  • 安裝版本:FreeIPA 4.6.8

安裝

步驟1:先安裝epel,並更新系統。

$ sudo yum -y install epel-release
$ sudo yum -y update

步驟2:安裝bind-utils。

$ sudo yum -y install bind-utils

步驟3:安裝包含LDAP、DNS、HTTP服務等的FreeIPA伺服器。

$ sudo yum -y install ipa-server-dns bindipa-server  bind-dyndb-ldap

步驟4:將主機的DNS改為127.0.0.1,避免指定的網域名稱與現實世界的網域有重複,因為FreeIPA不允許安裝重複的網域,為求安裝過程順利,指定本機作為DNS伺服器,讓FreeIPA安裝過程中無法搜尋現實世界的網域。

步驟5:設定FreeIP的系統參數,以完成FreeIPA各服務的設定與安裝。

$ sudo ipa-server-install --setup-dns

安裝參數注意事項:

  • Server Host Name:請輸入帶有網域的FQDN,格式為<hostname>.<domainname>,因為安裝過程會去抓此資訊作為預設的網域。
  • 安裝過程中會有抓不到反向DNS的資訊,可以在安裝完成後手動設定,不影響安裝過程與後續使用。
  • DNS轉發設定也可以於後續使用網頁來設定,此階段可先跳過。
The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)
  * Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.


Server host name [lab-ipa-1]: lab-ipa-1.example.com

Warning: skipping DNS resolution of host lab-ipa-1.example.com
The domain name has been determined based on the host name.

Please confirm the domain name [example.com]:

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [EXAMPLE.COM]:
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.

Directory Manager password:
Password (confirm):

The IPA server requires an administrative user, named 'admin'.
This user is a regular system account used for IPA server administration.

IPA admin password:
Password (confirm):

Checking DNS domain example.com., please wait ...
Please provide the IP address to be used for this host name: 192.168.50.201
Enter an additional IP address, or press Enter to skip:
Do you want to configure DNS forwarders? [yes]: no
No DNS forwarders configured
Do you want to search for missing reverse zones? [yes]: no

The IPA Master Server will be configured with:
Hostname:       lab-ipa-1.example.com
IP address(es): 192.168.50.201
Domain name:    example.com
Realm name:     EXAMPLE.COM

BIND DNS server will be configured to serve IPA domain with:
Forwarders:       No forwarders
Forward policy:   only
Reverse zone(s):  No reverse zone

Continue to configure the system with these values? [no]: yes

看到以下資訊,代表安裝已經完成且成功。

Setup complete

Next steps:
	1. You must make sure these network ports are open:
		TCP Ports:
		  * 80, 443: HTTP/HTTPS
		  * 389, 636: LDAP/LDAPS
		  * 88, 464: kerberos
		  * 53: bind
		UDP Ports:
		  * 88, 464: kerberos
		  * 53: bind
		  * 123: ntp

	2. You can now obtain a kerberos ticket using the command: 'kinit admin'
	   This ticket will allow you to use the IPA tools (e.g., ipa user-add)
	   and the web user interface.

Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password

步驟6:設定開放防火牆

$ sudo firewall-cmd --add-service={dns,freeipa-ldap,freeipa-ldaps} --permanent
$ sudo firewall-cmd --reload

步驟7:使用IP或安裝時所設定的FQDN連入網頁介面,預設帳號為”admin”,密碼是方才安裝時所設定的”IPA admin password”。

相關文章

~ END ~


,

Related posts

Latest posts