88971730 2011-09-04
配置WAS的standalone LDAP加密时,选择安装了openldap。
下载的openldap版本:openldap-2.4.23
问题:
在./configure时,报checking if Berkeley DB version supported by BDB/HDB backends… noconfigure: error: BerkeleyDB version incompatible with BDB/HDB backends
需要先安装BerkeleyDB,下载地址:
http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
我最先下载的是提供的最新的版本:db-5.2.28.tar.gz
安装步骤:
unzip db-5.2.28.tar.gz 解压,然后cd build_unix/ ,再运行../dist/configure , 最后,运行make, make install安装。默认的安装在/usr/local, 可以通过 ../dist/configure –prefix=你的路径,来改变安装路径。
安装好db-5.2.28.tar.gz后,发现对openldap进行configure时,还是报错:
configure: error: BDB/HDB: BerkeleyDB not available
解决办法:
尝试了网上很多办法,还是不行。决定换一个BerkeleyDB的版本试试。
于是重新下载了:db-4.8.30.tar.gz
重新安装好BerkeleyDB后,需要添加一些环境变量,见以下粗体部分:
[[email protected]]#exportCPPFLAGS=”-I/usr/local/BerkeleyDB.4.8/include”
[[email protected]]#exportLDFLAGS=”-L/usr/local/lib-L/usr/local/BerkeleyDB.4.8/lib-R/usr/local/BerkeleyDB.4.8/lib”
[[email protected]]#exportLD_LIBRARY_PATH=”/usr/local/BerkeleyDB.4.8/lib”
[[email protected]]#env
LDFLAGS=-L/usr/local/lib-L/usr/local/BerkeleyDB.4.8/lib-R/usr/local/BerkeleyDB.4.8/lib
HOSTNAME=mylinux
TERM=vt100
SHELL=/bin/bash
HISTSIZE=1000
CPPFLAGS=-I/usr/local/BerkeleyDB.4.8/include
SSH_CLIENT=::ffff:192.168.0.10333622
OLDPWD=/apps/openldap
SSH_TTY=/dev/pts/2
USER=root
LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.8/lib======================================================
最后,进行openldap的安装
1、[root@mylinux openldap-2.4.23]# ./configure
….
Makingservers/slapd/overlays/statover.c
Addsyncprov…
Pleaserun“makedepend”tobuilddependencies
看到“Pleaserun“makedepend”tobuilddependencies”说明configure完毕。
2、[[email protected]]#makedepend
Makingdependin/opt/openldap/openldap-2.4.23
Enteringsubdirectoryinclude
make[1]:Enteringdirectory`/opt/openldap/openldap-2.4.23/include’
Makingldap_config.h
make[1]:Leavingdirectory`/opt/openldap/openldap-2.4.23/include’
….
Enteringsubdirectoryman5
make[3]:Enteringdirectory`/opt/openldap/openldap-2.4.23/doc/man/man5′
make[3]:Nothingtobedonefor`depend’.
make[3]:Leavingdirectory`/opt/openldap/openldap-2.4.23/doc/man/man5′
Enteringsubdirectoryman8
make[3]:Enteringdirectory`/opt/openldap/openldap-2.4.23/doc/man/man8′
make[3]:Nothingtobedonefor`depend’.
make[3]:Leavingdirectory`/opt/openldap/openldap-2.4.23/doc/man/man8′
make[2]:Leavingdirectory`/opt/openldap/openldap-2.4.23/doc/man’
make[1]: Leaving directory `/opt/openldap/openldap-2.4.23/doc’3、[root@mylinux openldap-2.4.23]# make
……………………….
done
make[3]:Leavingdirectory`/opt/openldap/openldap-2.4.23/doc/man/man8′
make[2]:Leavingdirectory`/opt/openldap/openldap-2.4.23/doc/man’
make[1]:Leavingdirectory`/opt/openldap/openldap-2.4.23/doc’
4、[[email protected]]#maketest
5、[[email protected]]#makeinstall
安装完成。配置文件的路径在:/usr/local/etc/openldap
最后启动服务:到路径/usr/local/libexec下
[root@mylinux libexec]# ./slapd
[root@mylinux libexec]# ps -ef|grep slapd |grep -v grep