配置WAS的standalone LDAP加密时,选择安装了openldap。
下载的openldap版本:openldap-2.4.23
问题:
在./configure时,报checking if Berkeley DB version supported by BDB/HDB backends… no
configure: 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后,需要添加一些环境变量,见以下粗体部分:
[root@mylinux openldap-2.4.23]# export CPPFLAGS=”-I/usr/local/BerkeleyDB.4.8/include”
[root@mylinux openldap-2.4.23]#export LDFLAGS=”-L/usr/local/lib -L/usr/local/BerkeleyDB.4.8/lib -R/usr/local/BerkeleyDB.4.8/lib”
[root@mylinux openldap-2.4.23]# export LD_LIBRARY_PATH=”/usr/local/BerkeleyDB.4.8/lib”
[root@mylinux openldap-2.4.23]# 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.10 3336 22
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
….
Making servers/slapd/overlays/statover.c
Add syncprov …
Please run “make depend” to build dependencies
[root@mylinux openldap-2.4.23]#
看到“Please run “make depend” to build dependencies”说明configure完毕。
2、[root@mylinux openldap-2.4.23]# make depend
Making depend in /opt/openldap/openldap-2.4.23
Entering subdirectory include
make[1]: Entering directory `/opt/openldap/openldap-2.4.23/include’
Making ldap_config.h
make[1]: Leaving directory `/opt/openldap/openldap-2.4.23/include’
….
Entering subdirectory man5
make[3]: Entering directory `/opt/openldap/openldap-2.4.23/doc/man/man5′
make[3]: Nothing to be done for `depend’.
make[3]: Leaving directory `/opt/openldap/openldap-2.4.23/doc/man/man5′
Entering subdirectory man8
make[3]: Entering directory `/opt/openldap/openldap-2.4.23/doc/man/man8′
make[3]: Nothing to be done for `depend’.
make[3]: Leaving directory `/opt/openldap/openldap-2.4.23/doc/man/man8′
make[2]: Leaving directory `/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]: Leaving directory `/opt/openldap/openldap-2.4.23/doc/man/man8′
make[2]: Leaving directory `/opt/openldap/openldap-2.4.23/doc/man’
make[1]: Leaving directory `/opt/openldap/openldap-2.4.23/doc’
4、[root@mylinux openldap-2.4.23]# make test
5、[root@mylinux openldap-2.4.23]# make install
安装完成。配置文件的路径在:/usr/local/etc/openldap
最后启动服务:
到路径/usr/local/libexec下
[root@mylinux libexec]# ./slapd
[root@mylinux libexec]# ps -ef|grep slapd |grep -v grep