ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 389 Directory Server 설치 [1]
    IT 2020. 11. 30. 19:30
    반응형

    CentOS 8 이상에서 LDAP 서비스를 구축하기 위한 내용을 정리하였습니다. CentOS 8부터는 Redhat의 지원을 받는 389 Directory Server 사용이 권장되고 OpenLDAP은 RPM으로 더 이상 제공하지 않고 있습니다.

    (Openldap을 사용하기 위해서는 Source를 컴파일 하거나 아니면 검증되지 않은 Repository에 연결해서 사용해야 합니다.)

    Hostname 변경

    ldap에서 사용할 hostname으로 변경합니다. hostname으로 변경은 FQDN(fully qualified domain name)을 사용합니다.

    $ hostnamectl set-hostname ds1.homelab.local

    EPEL Repository 연결

    389 directory server 설치 패키지는 EPEL에서 제공되므로 epel repository를 연결해서 설치해야합니다. 연결은 아래 명령어로 가능합니다.

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

    389 Directory Server 설치

    yum을 이용하여 389 Directory Server를 설치합니다. 389 Directory Server의 설치 가능한 Stream은 2가지가 있으며 stable과 testring이 있습니다. 실제 운영 서버에 적용할 계획이므로 stable로 설치하도록 합니다. 추가로 stream은 3가지 profile이 있습니다. 일반적으로 Directory Server는 cli로 관리는 쉽지만 디렉토리에 대해 직관적이지 않기 때문에 cockpit web ui를 필요로 합니다. profile은 base를 선택합니다.

    - default : 389-ds-base and cockpit web ui

    - minimal : just 389-ds-base

    - legacy : 기본에 perl 도구와 스크립트

    $ yum -y module install 389-directory-server:stable/default

    389 Directory Server 설정

    Interactive 모드로 Directory Server의 인스턴스를 생성합니다.

    $ dscreate interactive
    Install Directory Server (interactive mode)
    ===========================================
    
    Enter system's hostname [ds1.homelab.local]:
    
    Enter the instance name [ds1]: ds
    
    Enter port number [389]:
    
    Create self-signed certificate database [yes]:
    
    Enter secure port number [636]:
    
    Enter Directory Manager DN [cn=Directory Manager]:
    
    Enter the Directory Manager password:
    Confirm the Directory Manager Password:
    
    Enter the database suffix (or enter "none" to skip) [dc=ds1,dc=homelab,dc=local]:
    
    Create sample entries in the suffix [no]: yes
    
    Do you want to start the instance after the installation? [yes]:
    
    Are you ready to install? [no]: yes
    Starting installation...
    Completed installation for ds
    $

    설정이 완료되었으면 dsctl 명령으로 생성된 인스턴스를 확인 및 실행 상태를 확인합니다.

    $ dsctl --list
    slapd-ds
    $ dsctl slapd-ds status
    Instance "ds" is running
    $

    cockpit 활성화

    cockpit 서비스를 시작 및 활성화 합니다. cockpit은 CentOS 7에서부터 도입된 Web 기반 서버 관리 및 모니터링 도구입니다. 사용하지 않는다면 활성화 하지 않아도 됩니다.

    $ systemctl start cockpit.service
    $ systemctl status cockpit.service

    방화벽 추가

    directory server와 cockpit에서 사용하는 포트를 방화벽 규칙에 추가합니다.

    $ firewall-cmd --permanent --add-port=389/tcp
    $ firewall-cmd --permanent --add-port=636/tcp
    $ firewall-cmd --permanent --add-port=9090/tcp
    $ firewall-cmd --reload

     

    방화벽까지 오픈되면 https://${server_ip}:9090 으로 cockpit에 접속 가능합니다.

     

     

    참조 링크

    - https://directory.fedoraproject.org/docs/389ds/documentation.html

    - https://www.techsupportpk.com/2020/04/how-to-set-up-389-directory-server-centos-rhel-8.html

     

    반응형

    'IT' 카테고리의 다른 글

    Kubernetes Cluster Version 업그레이드  (0) 2021.01.01
    UEFI를 위한 PXE Boot 서버 구축  (0) 2020.12.05
    Bind Setup Guide  (0) 2020.12.05
    389 Directory Server 설치 [3]  (0) 2020.11.30
    389 Directory Server 설치 [2]  (0) 2020.11.30
Designed by Tistory.