Ubuntu安裝OpenLDAP(附錯誤的詳細解決辦法)

來源:互聯網
上載者:User

Ubuntu安裝OpenLDAP(附錯誤的詳細解決辦法)

Ubuntu安裝OpenLDAP(附錯誤的詳細解決辦法)

1 下載OpenLDAP源碼

http://www.openldap.org/software/download/

或者

ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz

2 解壓到本地

 # gunzip-c openldap-VERSION.tgz | tar xf -

# cd openldap-2.4.44

# ./configure

 configure: error: BDB/HDB: BerkeleyDB notavailable

提示本地沒有安裝BerkeleyDB資料庫

3 安裝BerkeleyDB

 去Oracle官網下載:

 http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html

解壓到本地

切換到build_unix 目錄

# cd build_unix

# ../dist/configure

# make

# make install

root@cloudsoar-virtual-machine:/home/cloudsoar/db-6.2.23/build_unix#make install

Installing DB include files:/usr/local/BerkeleyDB.6.2/include ...

Installing DB library:/usr/local/BerkeleyDB.6.2/lib ...

libtool: install: cp -p .libs/libdb-6.2.so/usr/local/BerkeleyDB.6.2/lib/libdb-6.2.so

libtool: install: cp -p .libs/db_upgrade/usr/local/BerkeleyDB.6.2/bin/db_upgrade

libtool: install: cp -p .libs/db_verify/usr/local/BerkeleyDB.6.2/bin/db_verify

Installing documentation:/usr/local/BerkeleyDB.6.2/docs ...

4 查看安裝

5 設定到系統變數

不設定的話,等下安裝OpenLDAP時候執行./configure檢查時候還會報同樣的錯

# vim /etc/ld.so.conf

添加一行:/usr/local/BerkeleyDB.6.2/lib/

儲存退出。

執行生效:# ldconfig –v

6 繼續安裝openldap-2.4.44

切換到openldap的源碼目錄下,重新執行configure檔案

# ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.6.2/include-D_GNU_SOURCE" LDFLAGS="-L/usr/local/BerkeleyDB.6.2/lib"

執行後報錯

error: BerkeleyDB version incompatible withBDB/HDB backends

這裡找不到原因,後來查看openladp-2.4.44,目錄的README檔案發現如下內容:

鬱悶,原來openldap-2.4.44要求用Oracle Berkeley 4.4-4.8或者5.0-5.1版本的,而我用的是db-6.2.23.tar.gz版本的。

沒辦法,只有重新去Oracle官網下載一個db-5.1.29.tar.gz版本的。

按照安裝Berkeley 6.2的方法再次安裝Berkeley DB 5.1。

# cd build_unix

# ../dist/configure

# make

# make install

# vim /etc/ld.so.conf

添加一行:/usr/local/BerkeleyDB.5.1/lib/

儲存退出。

執行生效:ldconfig –v

 

8 安裝openldap         

切換到openldap-2.4.44目錄

# ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.5.1/include-D_GNU_SOURCE" LDFLAGS="-L/usr/local/BerkeleyDB.5.1/lib"

執行完畢可以看到提示我執行make depand了

9 編譯軟體

根據http://www.openldap.org/doc/admin24/install.html的安裝步驟繼續執行

執行命令:# make depend

執行命令:# make

10 測試軟體

根據官方文檔說明:Once the software has been properly configured and successfullymade, you should run the test suite to verify the build.

我們也需要測試一下安裝是否成功,執行命令:# make test

說明安裝環境是沒問題了。

11 安裝openldap到系統

根據官方文檔說明:By default OpenLDAP Software is installed in /usr/local. If youchanged this setting with the --prefix configure option, it will be installedin the location you provided.

我們可以加–prefix 參數來指定我們自己想要安裝的位置。預設是安裝到 /usr/local目錄下。

執行命令:# su root -c 'make install'

到這裡openldap-2.4.44已經成功的安裝到我的系統當中。預設的設定檔在 /usr/local/etc/openldap 下。

下一篇 Ubuntu安裝OpenLDAP之配置LDAP 

Liferay Portal 配置使用Oracle和OpenLDAP

在CentOS 6.5上安裝OpenLDAP並配置LDAP方式使用者登入 

RHEL7中OpenLDAP的安裝與配置 

Ubuntu下OpenLDAP伺服器的部署步驟   

Axigen+OpenLDAP+BerkeleyDB+ejabberd多域+JWchat詳細配置

CentOS部署OpenLDAP認證

CentOS Linux安裝OpenLDAP伺服器 

OpenLDAP 的詳細介紹:請點這裡
OpenLDAP 的:請點這裡

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.