安装openLDAP

我遵循从http://www.openldap.org/doc/admin24/quickstart.html安装openLDAP并按照#9的任务执行[su root -c / usr / local / libexec / slapd]要求input密码,input密码后,服务器是否已经启动。 当我运行[ldapsearch-x -b''-s base'(objectclass = *)'namingContexts]我得到这个错误[ldap_sasl_bind(SIMPLE):无法联系LDAP服务器(-1)]我无法find它出了什么问题。 谁能帮忙?

谢谢

这可能是slapd发现你的configuration无效,因此不会启动。

要testing这个,使用相同的选项和权限运行slaptest。 这应该输出错误消息,如果configuration错误。 所以像这样:

su root -c /usr/local/libexec/slaptest 

尝试下面的命令来检查slapd是否实际启动:

 netstat -ptnl #(provide list of all servers running) 

像下面的东西会来:

 Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:1394 0.0.0.0:* LISTEN 24000/slapd tcp 0 0 139.54.136.132:1395 0.0.0.0:* LISTEN 23927/slapd 

要么

 ps -ef |grep slapd 

像下面的东西会来:

 root 9147 1 0 16:13 ? 00:00:00 slapd -h ldap://172.21.140.73:1389 -f /usr/local/etc/openldap2-4-30/slapd.conf root 29285 11091 0 17:16 pts/6 00:00:00 grep slapd 

如果上述命令中没有列出slpad进程,则说明slapd未启动。

在这种情况下,您可以尝试使用debugging选项运行slpad:

 slapd -d -1 

-1将启用所有的debugging。 有各种其他的选项,你可以谷歌这些。

当你运行ps ,列出的是slapd进程? 什么是日志?