3.2. 명령줄을 사용하여 데이터베이스를 읽기 전용 모드로 전환
이 절차에서는 명령줄에서 Directory Server 데이터베이스를 읽기 전용 모드로 전환하는 방법을 지시합니다.
절차
접미사와 해당 데이터베이스를 나열합니다.
dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix list
# dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix listdsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix listdsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix listdsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix listdsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix list dc=example,dc=com (userroot) o=test (test_database)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 전환하려는 데이터베이스의 이름 또는 접미사를 확인합니다.
enable-readonly
매개변수를 사용하여 읽기 전용 모드를 활성화하고 name 또는 접미사로 데이터베이스를 지정합니다.dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"
# dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --enable-readonly "test_database"dsconf -D "cn=Directory Manager" ldap://server.example.com 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 -xldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -xldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -xldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -xldapmodify -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