安装openLDAP,./configure时提示
configure: error: BDB/HDB: BerkeleyDB not available
因此需要安装BerkeleyDB。
openLDAP版本:2.4.44
BerkeleyDB版本不能过高,否则会出现不兼容的情况。官方文档中说:
Berkeley DB version 6.0.20 and later uses a software license that is incompatible with LDAP technology and should not be used with OpenLDAP.
所以选用5.3.28的版本。
安装过程如下:
下载并解压db-5.3.28.NC.tar.gz
cd build_unix
../dist/configure
make && make install
echo /usr/local/BerkeleyDB.5.3/lib >> /etc/ld.so.conf #配置系统动态链接库
ldconfig #使5的配置生效
配置变量:
LD_LIBRARY_PATH="/usr/lib:/usr/local/lib:/usr/local/BerkeleyDB.5.3/lib"LDFLAGS="-L/usr/local/lib -L/usr/local/BerkeleyDB.5.3/lib"CPPFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB.5.3/include"export LD_LIBRARY_PATH LDFLAGS CPPFLAGS
完成之后执行openLDAP的configure就成功了。