티스토리 뷰

KR/CentOS 7

CentOS 7 FreeIPA 서버 설정

식빵TV 2016.10.05 21:13

FreeIPA 서버 설정

 

각 서버에서 사용자의 계정 정보를 공유 할 수 있도록 FreeIPA 서버를 구축합니다.


1. FreeIPA를 설치합니다.


[root@cent7 ~]# yum -y install ipa-server ipa-server-dns bind bind-dyndb-ldap




2. FreeIPA를 설치합니다.


[root@cent7 ~]# vi /etc/hosts

# 자신의 IP를 등록

 10.0.0.30   cent7.srv.world cent7


[root@cent7 ~]# ipa-server-install --setup-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)


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


# DNS 설정 (BIND의 기존 설정을 덮어 쓸)

Existing BIND configuration detected, overwrite? [no]: yes

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.


# 호스트 이름을 확인하고 Enter

Server host name [cent7.srv.world]:


The domain name has been determined based on the host name.


# 도메인 이름을 확인하고 Enter

Please confirm the domain name [srv.world]:


The kerberos protocol requires a Realm name to be defined.

This is typically the domain name converted to uppercase.


# realm 이름을 확인하거나 변경하고 Enter

Please provide a realm name [SRV.WORLD]:

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 암호 설정

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 암호 설정

IPA admin password:

Password (confirm):


# DNS forwarder를 설정하지 않으면 no로 응답

Do you want to configure DNS forwarders? [yes]:

Enter the IP address of DNS forwarder to use, or press Enter to finish.


# DNS forwarder를 설정하는 경우 forwarder의 IP를 지정

Enter IP address for a DNS forwarder: 10.0.0.10

DNS forwarder 10.0.0.10 added


# DNS forwarder를 모두 지정하면 하늘 Enter 응답

Enter IP address for a DNS forwarder:


# 역방향 영역을 설정하지 않으면 no로 응답

Do you want to configure the reverse zone? [yes]:


# 역방향 영역을 설정하는 경우 영역 이름

Please specify the reverse zone name [0.0.10.in-addr.arpa.]:


The IPA Master Server will be configured with:

Hostname:      cent7.srv.world

IP address:    10.0.0.30

Domain name:   srv.world

Realm name:    SRV.WORLD


BIND DNS server will be configured to serve IPA domain with:

Forwarders:    10.0.0.10

Reverse zone:  0.0.10.in-addr.arpa.


# 설정을 확인하고 yes로 진행

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


The following operations may take some minutes to complete.

Please wait until the prompt is returned.


Configuring NTP daemon (ntpd)

...

...

...

==============================================================================

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

                UDP Ports:

                  * 88, 464: kerberos

                  * 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 certificate stored in /root/cacert.p12

This file is required to create replicas. The password for this

file is the Directory Manager password




3. Kerberos 티켓을 취득 해, 기본 쉘을 bash로 변경해야합니다.


[root@cent7 ~]# kinit admin 

Password for admin@SRV.WORLD:# IPA admin password


[root@cent7 ~]# klist # confirm

Ticket cache: KEYRING:persistent:0:0

Default principal: admin@SRV.WORLD


Valid starting       Expires              Service principal

03/21/2015 14:25:53  03/24/2015 14:25:50  krbtgt/SRV.WORLD@SRV.WORLD


[root@cent7 ~]# ipa config-mod --defaultshell=/bin/bash 

  Maximum username length: 32

  Home directory base: /home

  Default shell: /bin/bash

  Default users group: ipausers

  Default e-mail domain: srv.world

  Search time limit: 2

  Search size limit: 100

  User search fields: uid,givenname,sn,telephonenumber,ou,title

  Group search fields: cn,description

  Enable migration mode: FALSE

  Certificate Subject base: O=SRV.WORLD

  Password Expiration Notification (days): 4

  Password plugin features: AllowNThash

  SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023

  Default SELinux user: unconfined_u:s0-s0:c0.c1023

  Default PAC types: MS-PAC


  

  

4. Firewalld을 사용하고있는 경우 , FreeIPA 관련 서비스 권한이 필요합니다.


[root@cent7 ~]# firewall-cmd --add-service={ssh,dns,freeipa-ldap,freeipa-ldaps} --permanent 

success


[root@cent7 ~]# firewall-cmd --reload 

success


※ download & Next Menu



저작자 표시 비영리 변경 금지
신고
댓글