3.2. 명령줄을 사용하여 기존 서버를 새 서버의 공급자로 구성
기존 서버 provider 1.example.com
을 공급업체로 준비하려면 다음을 수행해야 합니다.
- 접미사 복제를 활성화합니다.
- 새 공급업체에 대한 복제 계약을 생성합니다.
- 새 공급자를 초기화합니다.
복제 토폴로지의 기존 공급자에서 이 절차를 수행합니다.
사전 요구 사항
-
공급업체의
dc=example,dc=com
접미사 복제를 활성화했습니다.
프로세스
dc=example,dc=com
접미사의 복제를 활성화합니다.dsconf <supplier1_instance_name> replication enable --suffix "dc=example,dc=com" --role "supplier" --replica-id 2 --bind-dn "cn=replication manager,cn=config" --bind-passwd "password"
# dsconf <supplier1_instance_name> replication enable --suffix "dc=example,dc=com" --role "supplier" --replica-id 2 --bind-dn "cn=replication manager,cn=config" --bind-passwd "password"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이 명령은 provider
1.example.com
호스트를dc=example,dc=com
접미사로 구성하고 이 항목의 복제본 ID를2
로 설정합니다. 또한 이 명령은 지정된 암호를 사용하여cn=replication 관리자,cn=config
사용자를 생성하고 이 계정에서 이 호스트의 접미사 변경 사항을 복제할 수 있습니다.중요복제본 ID는 토폴로지의 모든 공급 업체의 접미사에 대해
1
에서65534
사이의 고유한 정수여야 합니다.복제 계약을 추가하고 새 서버를 초기화합니다.
dsconf <supplier1_instance_name> repl-agmt create --suffix "dc=example,dc=com" --host "supplier2.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "password" --bind-method SIMPLE --init example-agreement-supplier1-to-supplier2
# dsconf <supplier1_instance_name> repl-agmt create --suffix "dc=example,dc=com" --host "supplier2.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "password" --bind-method SIMPLE --init example-agreement-supplier1-to-supplier2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이 명령은
example-agreement-supplier1-to-supplier2
라는 복제 계약을 생성합니다. 복제 계약은 새로운 공급 업체의 호스트 이름, 프로토콜 및 인증 정보와 같은 설정을 정의하며, 공급자가 새 공급 업체에 연결하고 복제할 때 사용하는 인증 정보를 정의합니다.계약이 생성되면 Directory Server는 provider
2.example.com
을 초기화합니다. 복제할 데이터 양에 따라 초기화 시간이 오래 걸릴 수 있습니다.
검증
복제 구성을 표시합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이러한 매개변수는 다음을 나타냅니다.
-
nsDS5ReplicaBindDN
은 복제 관리자 계정을 지정합니다. -
nsDS5ReplicaRoot
는 복제되는 접미사를 설정합니다. -
nsDS5ReplicaType
을3
으로 설정하면 이 호스트가 공급자임을 정의합니다.
-
초기화에 성공했는지 확인합니다.
dsconf <supplier1_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier1-to-supplier2
# dsconf <supplier1_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier1-to-supplier2 Agreement successfully initialized.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 복제 상태를 표시합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 복제 상태
및마지막 업데이트 상태
필드를 확인합니다.
문제 해결
기본적으로 서버의 모든 계약에 대한 복제 유휴 시간 제한은 1시간입니다. 시간 초과로 인해 대규모 데이터베이스 초기화가 실패하는 경우
nsslapd-idletimeout
매개변수를 더 높은 값으로 설정합니다. 예를 들어 매개변수를7200
(2시간)으로 설정하려면 다음을 입력합니다.dsconf <supplier1_instance_name> config replace nsslapd-idletimeout=7200
# dsconf <supplier1_instance_name> config replace nsslapd-idletimeout=7200
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 무제한 기간을 설정하려면
nsslapd-idletimeout
을0
으로 설정합니다.