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

相關文章
相關標籤/搜索