安裝openLDAP,./configure時提示shell
configure: error: BDB/HDB: BerkeleyDB not availableui
所以須要安裝BerkeleyDB。unix
openLDAP版本:2.4.44code
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.it
因此選用5.3.28的版本。io
安裝過程以下:class
下載並解壓db-5.3.28.NC.tar.gz變量
cd build_unixsed
../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就成功了。