6.4. 명령줄을 사용하여 허브 서버를 소비자의 공급업체로 구성

허브를 준비하려면 다음이 필요합니다.

  • 소비자에 대한 복제 계약을 만듭니다.
  • 소비자를 초기화합니다.

복제 토폴로지의 허브에서 이 절차를 수행합니다.

사전 요구 사항

  • 허브가 초기화되어 공급 업체에서 허브로 복제됩니다.
  • 허브에서 dc=example,dc=com 접미사에 대한 복제를 활성화했습니다.

절차

  • 복제 계약을 추가하고 소비자를 초기화합니다.

    # dsconf -D "cn=Directory Manager" ldap://hub.example.com repl-agmt create --suffix "dc=example,dc=com" --host "consumer.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "password" --bind-method SIMPLE --init example-agreement-hub-to-consumer

    이 명령은 example-agreement-hub-to-consumer 라는 복제 계약을 생성합니다. 복제 계약은 공급업체가 이 소비자에게 데이터를 연결하고 복제할 때 사용하는 소비자의 호스트 이름, 프로토콜 및 인증 정보와 같은 설정을 정의합니다.

    계약이 생성되면 Directory Server가 consumer.example.com 을 초기화합니다. 복제할 데이터의 양에 따라 초기화 시간이 오래 걸릴 수 있습니다.

검증

  1. 초기화에 성공했는지 확인합니다.

    # dsconf -D "cn=Directory Manager" ldap://hub.example.com repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-hub-to-consumer
    Agreement successfully initialized.
  2. 복제 상태를 표시합니다.

    # dsconf -D "cn=Directory Manager" ldap://hub.example.com repl-agmt status --suffix "dc=example,dc=com" example-agreement-hub-to-consumer
    Status For Agreement: "example-agreement-hub-to-consumer" (consumer.example.com:389)
    Replica Enabled: on
    Update In Progress: FALSE
    Last Update Start: 20210331131534Z
    Last Update End: 20210331131534Z
    Number Of Changes Sent: 0
    Number Of Changes Skipped: None
    Last Update Status: Error (0) Replica acquired successfully: Incremental update succeeded
    Last Init Start: 20210331131530Z
    Last Init End: 20210331131533Z
    Last Init Status: Error (0) Total update succeeded
    Reap Active: 0
    Replication Status: Not in Synchronization: supplier (Unknown) consumer (Unknown) State (green) Reason (error (0) replica acquired successfully: incremental update succeeded)
    Replication Lag Time: Unavailable

    복제 상태마지막 업데이트 상태 필드를 확인합니다.

문제 해결

  1. 기본적으로 서버의 모든 계약에 대한 복제 유휴 타임아웃은 1시간입니다. 시간 초과로 인해 대규모 데이터베이스를 초기화하지 못하는 경우 nsslapd-idletimeout 매개변수를 더 높은 값으로 설정합니다. 예를 들어 매개변수를 7200 (2시간)으로 설정하려면 다음을 입력합니다.

    # dsconf -D "cn=Directory Manager" ldap://hub .example.com config replace nsslapd-idletimeout=7200

    무제한 기간을 설정하려면 nsslapd-idletimeout0 으로 설정합니다.