歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> openldap的安裝

openldap的安裝

日期:2017/2/27 14:21:57   编辑:更多Linux
  1、獲得軟件 http://www.openldap.org/software/download/ http://www.openldap.org/software/repo.Html 2、解壓 gunzip -c openldap-VERSION.tgz tar xfB - 在當前工作目錄下將產生一個ldap子目錄。 3、認真閱讀README和INSTALL 4、運行configure ./configure 查看configure的可選項 ./configure --help 5、編譯 make depend make 6、測試編譯結果 cd tests make cd .. 7、安裝軟件 su root -c make install 8、創建SLAPD的配置文件 編輯/usr/local/etc/slapd.conf文件,該文件中包含下列格式的LDBM數據庫定義 database ldbm suffix "dc=MY-DOMAIN, dc=COM" rootdn "cn=Manager, dc=MY-DOMAIN, dc=COM" rootpw secret 替換上面的MY-DOMAIN和COM成實際的域名,例如: database ldbm suffix "dc=mydomain, dc=com" rootdn "cn=Manager, dc=mydomain, dc=com" rootpw secret 樣本slapd.conf放置在/usr/local/etc/openldap/slapd.conf 9、啟動SLAPD su root -c /usr/local/libexec/slapd -f myslapd.conf slapd被安裝在配置文件指定的"libexecdir"目錄下,通常為/usr/local/libexec/slpad。 10、增加初始的入口(entries) 1) 創建LDIF文件 編輯一個LDIF格式文件: dn: dc=MY-DOMAIN, dc=COM dc: MY-DOMAIN o: MY-ORGANIZATION objectclass: organization objectclass: dcObject dn: cn=Manager, dc=MY-DOMAIN, dc=COM cn: Manager sn: Manager objectclass: person 2) 運行ldapadd ldapadd -D "cn=Manager, dc=MY-DOMAIN, dc=COM" -W < myldif.ldif 11、檢查是否已經開始正常工作 ldapsearch -L -b "dc=MY-DOMAIN, dc=COM" "(objectclass=*)" 例如: ldapsearch -L -b "dc=mydomain, dc=com" -W "(objectclass=*)"




Copyright © Linux教程網 All Rights Reserved