4.3. 데이터베이스를 읽기 전용 모드로 전환
Directory Server의 데이터베이스는 기본적으로 읽기-쓰기 모드로 실행되며, 이 모드에서 사용자는 데이터를 검색하고 저장할 수 있습니다.
예를 들어 백업 전에 또는 소비자를 수동으로 초기화하기 전에는 사용자가 항목을 생성, 수정 또는 삭제하지 못하도록 데이터베이스를 읽기 전용 모드로 전환할 수 있습니다.
4.3.1. 사전 요구 사항 링크 복사링크가 클립보드에 복사되었습니다!
- 데이터베이스는 읽기-쓰기 모드입니다.
- 읽기 전용 모드를 활성화하면 복제를 비활성화하므로 데이터베이스는 복제에 사용되지 않습니다.
4.3.2. 명령줄을 사용하여 데이터베이스를 읽기 전용 모드로 전환 링크 복사링크가 클립보드에 복사되었습니다!
이 절차에서는 명령줄에서 Directory Server 데이터베이스를 읽기 전용 모드로 전환하는 방법을 설명합니다.
프로세스
접미사 및 해당 데이터베이스를 나열합니다.
dsconf <instance_name> backend suffix list
# dsconf <instance_name> backend suffix list dc=example,dc=com (userroot) o=test (test_database)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 전환하려는 데이터베이스의 이름 또는 접미사를 기록해 둡니다.
--enable-readonly
매개변수를 사용하여 읽기 전용 모드를 활성화하고 이름 또는 접미사로 데이터베이스를 지정합니다.dsconf <instance_name> backend suffix set --enable-readonly "test_database"
# dsconf <instance_name> backend suffix set --enable-readonly "test_database"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
검증
다음과 같은 디렉터리에 쓰기 작업을 시도합니다.
ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
# ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x dn: dc=example,dc=com changetype: modify add: description description: foo
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 서버가 실행을 거부해야 합니다.
modifying entry "dc=example,dc=com" ldap_modify: Server is unwilling to perform (53) additional info: Server is read-only
modifying entry "dc=example,dc=com" ldap_modify: Server is unwilling to perform (53) additional info: Server is read-only
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3.3. 웹 콘솔을 사용하여 데이터베이스를 읽기 전용 모드로 전환 링크 복사링크가 클립보드에 복사되었습니다!
이 절차에서는 브라우저에서 Directory Server 데이터베이스를 읽기 전용 모드로 전환하는 방법을 설명합니다.
사전 요구 사항
- 웹 콘솔에서 인스턴스에 로그인되어 있습니다.
프로세스
-
Database
아래에서 구성 트리의 접미사를 선택합니다. -
데이터베이스 읽기 전용 모드
옵션을 확인합니다. - 을 클릭합니다.
검증
다음과 같은 디렉터리에 쓰기 작업을 시도합니다.
ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
# ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x dn: dc=example,dc=com changetype: modify add: description description: foo
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 서버가 실행을 거부해야 합니다.
modifying entry "dc=example,dc=com" ldap_modify: Server is unwilling to perform (53) additional info: Server is read-only
modifying entry "dc=example,dc=com" ldap_modify: Server is unwilling to perform (53) additional info: Server is read-only
Copy to Clipboard Copied! Toggle word wrap Toggle overflow