免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: sttty
打印 上一主题 下一主题

[ldap] 安装openldap出现问题, 请高手帮忙 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2005-09-06 12:15 |只看该作者

安装openldap出现问题, 请高手帮忙

Assuming you have compiled/install SASL using default options, i.e. it installed at /usr/loca/lib/sasl2.

You then have two choices:

1) Tell openldap configure to look for it at /usr/local/lib/sasl2

env CPPFLAGS="-I/usr/local/BerkeleyDB.4.2/include -I/usr/local/lib/sasl2" LDFLAGS="-L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/lib/sasl2" ./configure --prefix=/usr/local/openldap --enable-ldbm --with-cyrus-sasl

2) Use SASL_PATH, before you run "make"

export SASL_PATH=/usr/local/lib/sasl2
make
make depend
make test

Gary

论坛徽章:
0
12 [报告]
发表于 2005-09-06 14:55 |只看该作者

安装openldap出现问题, 请高手帮忙

谢谢gary_tay88     
我是这样编译得:
export SASL_PATH=/usr/local/lib/sasl2
env LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/sasl2:/usr/local/BerkeleyDB.4.3/lib:/usr/local/ssl/lib" LDFLAGS="-L/usr/local/lib -L/usr/local/lib/sasl2 -L/usr/local/BerkeleyDB.4.3lib -L/usr/local/ssl/lib -R/usr/local/lib -R/usr/local/lib/sasl2 -R/usr/local/BerkeleyDB.4.2/lib -R/usr/local/ssl/lib" CPPFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -I/usr/local/ssl/include" ./configure --enable-bdb --enable-ldbm --enable-ldap --enable-meta --enable-crypt --with-tls --with-cyrus-sasl
一切正常,
make depend
make
make test  (在此出现了问题)
为了让错误的地方看得更清楚, 我把make  test>;debug
[st@SSL openldap-2.1.29]$ make test >;debug
ln: ‘./data’:无法覆盖目录
make[1]: [test-bdb] Error 1 (ignored)
ln: ‘./schema’:文件已存在
make[1]: [test-bdb] Error 1 (ignored)
ln: ‘ucdata/liblunicode’:文件已存在
make[1]: [test-bdb] Error 1 (ignored)
./scripts/test007-replication: line 213: 25281 已杀死                  $SLURPD -f $MASTERCONF -d ${SLURPD_DEBUG-5} -t $REPLDIR >;$SLURPLOG 2>;&1
PID=25312 - Add/Delete(50): entry="cn=James A Jones 2,ou=Alumni Association,ou=People,o=University of Michigan,c=US".
PID=25315 - Add/Delete(50): entry="cn=James A Jones 3,ou=Alumni Association,ou=People,o=University of Michigan,c=US".
PID=25318 - Add/Delete(50): entry="cn=James A Jones 4,ou=People,o=University of Michigan,c=US".
PID=25321 - Add/Delete(50): entry="cn=James A Jones 5,o=University of Michigan,c=US".
PID=25311 - Read(1000): entry="cn=Barbara Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US".
PID=25314 - Read(1000): entry="cn=ITD Staff,ou=Groups,o=University of Michigan,c=US".
PID=25320 - Read(1000): entry="ou=Alumni Association, ou=People, o=University of Michigan, c=US".
PID=25323 - Read(1000): entry="cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US".
PID=25317 - Read(1000): entry="ou=Groups, o=University of Michigan, c=US".
PID=25310 - Search(500): base="o=University of Michigan,c=US", filter="cn=Barbara Jensen".
PID=25313 - Search(500): base="o=University of Michigan,c=US", filter="cn=Bjorn Jensen".
PID=25316 - Search(500): base="o=University of Michigan,c=US", filter="cn=James A Jones 1".
PID=25319 - Search(500): base="o=University of Michigan,c=US", filter="cn=Bjorn Jensen".
PID=25322 - Search(500): base="o=University of Michigan,c=US", filter="cn=Alumni Assoc Staff".
PID=25320 - Read done.
PID=25311 - Read done.
PID=25314 - Read done.
PID=25323 - Read done.
PID=25317 - Read done.
PID=25310 - Search done.
PID=25313 - Search done.
PID=25316 - Search done.
PID=25319 - Search done.
PID=25322 - Search done.
PID=25312 - Add/Delete done.
PID=25315 - Add/Delete done.
PID=25318 - Add/Delete done.
PID=25321 - Add/Delete done.
rm: 无法删除‘./test-repl/replica’: 是一个目录
mkdir: 无法创建目录‘./test-db/C_db1’: 文件已存在
mkdir: 无法创建目录‘./test-db/C_db2’: 文件已存在
mkdir: 无法创建目录‘./test-db/C_db3’: 文件已存在
ln: ‘./data’:无法覆盖目录
make[1]: [test-ldbm] Error 1 (ignored)
ln: ‘./schema’:文件已存在
make[1]: [test-ldbm] Error 1 (ignored)
ln: ‘ucdata/liblunicode’:文件已存在
make[1]: [test-ldbm] Error 1 (ignored)
./scripts/test007-replication: line 213: 25827 已杀死                  $SLURPD -f $MASTERCONF -d ${SLURPD_DEBUG-5} -t $REPLDIR >;$SLURPLOG 2>;&1

PID=25855 - Search(500): base="o=University of Michigan,c=US", filter="cn=Barbara Jensen".
PID=25856 - Read(1000): entry="cn=Barbara Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US".
PID=25858 - Search(500): base="o=University of Michigan,c=US", filter="cn=Bjorn Jensen".
PID=25859 - Read(1000): entry="cn=ITD Staff,ou=Groups,o=University of Michigan,c=US".
PID=25860 - Add/Delete(50): entry="cn=James A Jones 3,ou=Alumni Association,ou=People,o=University of Michigan,c=US".
PID=25861 - Search(500): base="o=University of Michigan,c=US", filter="cn=James A Jones 1".
PID=25857 - Add/Delete(50): entry="cn=James A Jones 2,ou=Alumni Association,ou=People,o=University of Michigan,c=US".
PID=25864 - Search(500): base="o=University of Michigan,c=US", filter="cn=Bjorn Jensen".
PID=25863 - Add/Delete(50): entry="cn=James A Jones 4,ou=People,o=University of Michigan,c=US".
PID=25866 - Add/Delete(50): entry="cn=James A Jones 5,o=University of Michigan,c=US".
PID=25867 - Search(500): base="o=University of Michigan,c=US", filter="cn=Alumni Assoc Staff".
PID=25868 - Read(1000): entry="cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US".
PID=25862 - Read(1000): entry="ou=Groups, o=University of Michigan, c=US".
PID=25865 - Read(1000): entry="ou=Alumni Association, ou=People, o=University of Michigan, c=US".
PID=25855 - Search done.
PID=25858 - Search done.
PID=25861 - Search done.
PID=25864 - Search done.
PID=25867 - Search done.
PID=25856 - Read done.
PID=25859 - Read done.
PID=25868 - Read done.
PID=25862 - Read done.
PID=25865 - Read done.
PID=25863 - Add/Delete done.
PID=25860 - Add/Delete done.
PID=25857 - Add/Delete done.
PID=25866 - Add/Delete dorm:
无法删除‘./test-repl/replica’: 是一个目录
mkdir: 无法创建目录‘./test-db/C_db1’: 文件已存在
mkdir: 无法创建目录‘./test-db/C_db2’: 文件已存在
mkdir: 无法创建目录‘./test-db/C_db3’: 文件已存在

论坛徽章:
0
13 [报告]
发表于 2005-09-06 14:58 |只看该作者

安装openldap出现问题, 请高手帮忙

debug 文件里的信息应该都是正确信息。 太长了 600多行就不贴上来了。
开始用的是
env CPPFLAGS="-I/usr/local/BerkeleyDB.4.2/include -I/usr/local/lib/sasl2" LDFLAGS="-L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/lib/sasl2" ./configure --prefix=/usr/local/openldap --enable-ldbm --with-cyrus-sasl
后来不行,然后就用了上面得方法。

请帮忙看看,谢谢 :)

论坛徽章:
0
14 [报告]
发表于 2005-09-06 15:04 |只看该作者

安装openldap出现问题, 请高手帮忙

Look into openldap-x.x.x/tests/testrun/slapd.1.log file, the first test for test001-rootdse failed with error message something like "SASL Version Mismatch, look for version X.X.X found version Y.Y.Y"

HOW TO FIX "SASL Version Mismatch" error?

IF

You have BOTH the original SASL from RedHat distro (/usr/lib/sasl2/* and /usr/lib/libsasl2.so) and also compiled/installed a latest version at the default --prefix=/usr/local (/usr/local/lib/sasl2/* and /usr/local/lib/libsasl2.so)

THEN

Please also include LD_LIBRARY_PATH and include path for SASL, use the following ./configure options:

env LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/sasl2:/usr/local/BerkeleyDB.4.2/lib" LDFLAGS="-L/usr/local/lib -L/usr/local/lib/sasl2 -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/lib -R/usr/local/lib/sasl2 -R/usr/local/BerkeleyDB.4.2/lib" CPPFLAGS="-I/usr/local/include -I/usr/local/include/sasl -I/usr/local/BerkeleyDB.4.2/include" ./configure --enable-bdb --enable-ldbm --enable-ldap --enable-meta --enable-crypt --with-tls --with-cyrus-sasl

ENDIF

Gary

论坛徽章:
0
15 [报告]
发表于 2005-09-06 15:22 |只看该作者

安装openldap出现问题, 请高手帮忙

Assume you have compiled/installed SASL from source onto default prefix /usr/local.
Could you please add "-I/usr/local/include/sasl"  to CPPFLAGS? Sorry I missed this out.

I have noticed that many of you KEEP using very old versions of OpenlDAP (2.1.XX), and backend like "lddm", if you choose to use it for testing/development that is fine, for production running purpose please download OpenLDAP stable release 2.2.26 and use "bdb" backend, and download/compile latest SASL 2.1.21, my examples are all based on relatively latest versions of these opensource products.

When using the old versions, run "./configure --help" to look at the available options, some options may not be supported in old versions, do note, so please don't just simply copy.

Gary

论坛徽章:
0
16 [报告]
发表于 2005-09-06 15:27 |只看该作者

安装openldap出现问题, 请高手帮忙

gary_tay88  我这上面没有你说的那个目录
[st@SSL openldap-2.1.29]$ cd tests/
[st@SSL tests]$ ls
data      Makefile.in  README  scripts  test-repl
Makefile  progs        schema  test-db  ucdata
[st@SSL tests]$

也没有找到slapd.1.log 文件
我的 sasl 装到了   /usr/local/lib/sasl2/

[st@SSL tests]$ ls /usr/local/lib/sasl2/
libanonymous.la         libdigestmd5.so         libplain.so.2
libanonymous.so         libdigestmd5.so.2       libplain.so.2.0.12
libanonymous.so.2       libdigestmd5.so.2.0.12  libsasldb.la
libanonymous.so.2.0.12  libotp.la               libsasldb.so
libcrammd5.la           libotp.so               libsasldb.so.2
libcrammd5.so           libotp.so.2             libsasldb.so.2.0.12
libcrammd5.so.2         libotp.so.2.0.12        sasl2
libcrammd5.so.2.0.12    libplain.la
libdigestmd5.la         libplain.so

[st@SSL tests]$ ls -l /usr/lib/sasl2
lrwxrwxrwx    1 root     root           20  9月  6 14:02 /usr/lib/sasl2 ->; /usr/local/lib/sasl2
[st@SSL tests]$

论坛徽章:
0
17 [报告]
发表于 2005-09-06 15:32 |只看该作者

安装openldap出现问题, 请高手帮忙

Your "make test" failure has got something to do with the "login" id you use, i.e. under openldap-x.x.x/tests directory, all the files/directories were previously created and owned by "root" and after that they are not able to be overwritten by "st" user.

Previosuly you use "root" account:
[root@SSL openldap-2.1.29]# make test

After that you use "st" account:
[st@SSL openldap-2.1.29]$ make test >;debug

Can you use "root" account, run "make clean", then re-run "./configure ..." and "make depend; make; make test" again.

If you prefer to use "st", THEN untar openldap-x.x.x to a BRAND NEW working area and start from scratch again.

Gary

论坛徽章:
0
18 [报告]
发表于 2005-09-06 15:43 |只看该作者

安装openldap出现问题, 请高手帮忙

You couldn't find testrun directory and slapd.1.log, this is because you are using OLD version of OpenLDAP, 2.1.29.

If you use OpenLDAP release 2.2.XX or 2.3.X, the test scripts will create these files/directories:

# pwd
/var/tmp/openldap-2.3.7/tests/testrun
[root@sglnx01 /var/tmp/openldap-2.3.7/tests/testrun]# ls -alrt
total 15656
drwxrwxr-x  6 2000 root     4096 Sep  6 15:39 ..
-rw-r--r--  1 root root         1537 Sep  6 15:39 slapd.1.conf
drwxr-xr-x  2 root root         4096 Sep  6 15:39 db.1.a
-rw-r--r--  1 root root       132317 Sep  6 15:39 slapadd.1.log
-rw-r--r--  1 root root            5 Sep  6 15:39 slapd.1.pid
-rw-r--r--  1 root root           87 Sep  6 15:39 slapd.1.args
drwxr-xr-x  3 root root         4096 Sep  6 15:39 .
-rw-r--r--  1 root root     15843625 Sep  6 15:39 slapd.1.log
#

Gary

论坛徽章:
0
19 [报告]
发表于 2005-09-06 15:55 |只看该作者

安装openldap出现问题, 请高手帮忙

我使用了root  执行 make test  依然是那样的错误,并且我也加入了-I/usr/local/include/sasl

伤心 :(  怎么就我的编译不错呢。

论坛徽章:
0
20 [报告]
发表于 2005-09-06 16:00 |只看该作者

安装openldap出现问题, 请高手帮忙

我最初用的 就是openldap-stable-20050429.tgz(openldap-2.2.26/)  但是遗憾的是,这个总是报错

[st@SSL openldap-2.2.26]$ env LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/sasl2:/usr/local/BerkeleyDB.4.3/lib:/usr/local/ssl/lib" LDFLAGS="-L/usr/local/lib -L/usr/local/lib/sasl2 -L/usr/local/BerkeleyDB.4.3/lib -L/usr/local/ssl/lib -R/usr/local/lib -R/usr/local/lib/sasl2 -R/usr/local/BerkeleyDB.4.3/lib -R/usr/local/ssl/lib" CPPFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -I/usr/local/ssl/include -I/usr/local/include/sasl" ./configure --enable-bdb --enable-ldbm --enable-ldap --enable-crypt --with-tls --with-cyrus-sasl


checking types of arguments for select()... int,fd_set *,struct timeval *
checking for regex.h... yes
checking for library containing regfree... none required
checking for compatible POSIX regex... yes
checking for sys/uuid.h... no
checking to see if -lrpcrt4 is needed for win32 UUID support... no
checking for res_query... no
checking for __res_query... no
checking for res_query in -lbind... no
checking for __res_query in -lbind... no
checking for res_query in -lresolv... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for gai_strerror... yes
checking for inet_ntop... yes
checking INET6_ADDRSTRLEN... yes
checking struct sockaddr_storage... yes
checking for sys/un.h... yes
checking for openssl/ssl.h... yes
checking for ssl.h... no
checking for SSLeay_add_ssl_algorithms in -lssl... no
checking for SSL_library_init in -lssl... no
checking for ssl3_accept in -lssl... no
configure: error: Could not locate TLS/SSL package
[st@SSL openldap-2.2.26]$
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP