1.安裝
1.1 檢視
# yum list | grep openldap1.2 安裝
# yum install openldap*2.配置
2.1 建立slapd.config配置檔案
# cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf2.2 修改密碼
new password: secret
re-enter new password: secret
hy/muwmzlixwawk6uzxwprmu0ferclnu
2.3 修改slapd.config檔案
# vi /etc/openldap/slapd.conf修改dc和rootpw,如下:
改前:
database bdb改後:suffix "dc=my-domain,dc=com"
checkpoint 1024 15
rootdn "cn=manager,dc=my-domain,dc=com"
# cleartext passwords, especially for the rootdn, should
# use of strong authentication encouraged.
# rootpw secret
# rootpw ijfyncsnctbyg
database bdb2.4 重新生成/etc/openldap/slapd.d目錄suffix "dc=my-domain,dc=com"
checkpoint 1024 15
rootdn "cn=manager,dc=my-domain,dc=com"
# cleartext passwords, especially for the rootdn, should
# use of strong authentication encouraged.
# rootpw secret
rootpw hy/muwmzlixwawk6uzxwprmu0ferclnu
# rm -rf slapd.d/*
# slaptest -f /etc/openldap/slapd.conf -f /etc/openldap/slapd.d2.5 修改/etc/openldap/slapd.d/目錄許可權bdb_db_open: warning - no db_config file found in directory /var/lib/ldap: (2).
expect poor performance for suffix "dc=my-domain,dc=com".
bdb_db_open: database "dc=my-domain,dc=com": db_open(/var/lib/ldap/id2entry.bdb) failed: no such file or directory (2).
backend_startup_one (type=bdb, suffix="dc=my-domain,dc=com"): bi_db_open failed! (2)
slap_startup failed (test would succeed using the -u switch)
# chown ldap:ldap -r /etc/openldap/slapd.d2.6 修改/var/lib/ldap/目錄許可權
# chown ldap:ldap -r /var/lib/ldap/3. 啟動slapd服務
# /etc/init.d/slapd startln: creating hard link `/var/run/slapd.pid': file exists [ ok ]
# telnet localhost 389trying ::1...
connected to localhost.
escape character is '^]'.
# ldapsearch -x# extended ldif
## ldapv3
# base <> (default) with scope subtree
# filter: (objectclass=*)
# requesting: all
## search result
search: 2
result: 32 no such object
未完待續...
openldap 安裝 配置
openldap是輕型目錄訪問協議 lightweight directory access protocol,ldap 的開源實現,是較常用的一種目錄服務。openldap版本openldap 2.4.35 berkelydb版本db 4.7.25 然後解壓安裝berkelydb tar xvzf...
OpenLdap安裝與配置
1.1 檢視 yum list grep openldap 1.2 安裝 yum install y openldap servers openldap clients 2.1 準備資料庫目錄,openldap配置檔案 cp usr share openldap servers slapd.conf...
openldap 安裝 配置 使用
1 安裝 安裝yum install y openldap servers openldap clients openldap devel 2 複製配置檔案 複製配置檔案 cp usr share openldap servers db config.example var lib ldap db ...