openldap安装步骤

1、OpenLDAP下载地址:http://download.bergmans.us/openldap/openldap-2.2.29/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe 下载后点击安装即可。

2、修改sldap.conf,添加下面内容。
include  ./schema/cosine.schema
include  ./schema/inetorgperson.schema
include  ./schema/corba.schema
include  ./schema/dyngroup.schema
include  ./schema/java.schema
include  ./schema/misc.schema
include  ./schema/nis.schema
include  ./schema/openldap.schema

3、修改sldap.conf
#suffix        "dc=my-domain,dc=com"
#rootdn        "cn=Manager,dc=my-domain,dc=com"
修改成
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"

4、启动openldap服务
sldap -d 1
用可以看到控制台下打印一片信息,openldap 默认是用的 Berkeley DB 数据库存储目录数据的。

5、测试是否启动成功
ldapsearch -x -s base (objectclass=*) namingContexts
如果返回:
dn:
namingContexts: dc=example,dc=com
则说明OpenLDAP成功启动

6、添加项目
在安装目录下,新建文件example.ldif,输入如下内容:
dn: dc=example,dc=com
objectclass: dcObject
objectclass: organization
o: Example Company
dc: example

dn: cn=Manager,dc=example,dc=com
objectclass: organizationalRole
cn: Manager

7、查询
ldapsearch -x -b dc=example,dc=com (objectclass=*)
ldapadd -x -D cn=Manager,dc=example,dc=com -W -f example.ldif
可能会要求输入密码:secret

8、图形化界面LDAPBrowser的配置
下载地址: http://files.blogjava.net/Unmi/LdapBrowser282.rar
解压后进入LdapBrowser282目录,打开配置文件OpenLdap_Localhost.cfg
修改配置:
basedn=dc=example,dc=com
managerdn=cn=Manager,dc=example,dc=com
运行lbe.bat进入图形界面后选择连接OpenLdap_Localhost即可。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值