Linux安装BerkeleyDB 5.3

安装openLDAP,./configure时提示shell

  1. 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

  1. 下载并解压db-5.3.28.NC.tar.gz变量

  2. cd build_unixsed

  3. ../dist/configure

  4. make && make install

  5. echo /usr/local/BerkeleyDB.5.3/lib >> /etc/ld.so.conf  #配置系统动态连接库

  6. ldconfig  #使5的配置生效

  7. 配置变量:

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就成功了。

相关文章
相关标签/搜索