简体   繁体   English

openLdap BerkleyDB编译问题

[英]openLdap BerkleyDB compiling problems

I tried to compile openLDAP with BerkleyDB, but i got every time this message: 我试图用BerkleyDB编译openLDAP,但每次收到此消息时,我都会得到:

Version: 版:

BerleyDB: db-6.1.23 BerleyDB:db-6.1.23

openLDAP: openldap-2.4.40 openLDAP:openldap-2.4.40

1.) First Compiling BerkleyDB 1.)首先编译BerkleyDB

../dist/configure --prefix=/products/db-6.1.23 ../dist/configure --prefix = / products / db-6.1.23

Symlink: 符号链接:

BerkleyDB -> db-6.1.23 BerkleyDB-> db-6.1.23

2.) Want do compile openLDAP 2.)要编译openLDAP

First setting PATH: 首先设置PATH:

CPPFLAGS="-I/products/BerkleyDB/include" LDFLAGS="-L/products/BerkleyDB/lib -L/products/BerkleyDB/lib -R/products/BerkleyDB/lib" LD_LIBRARY_PATH="/products/BerkleyDB/lib" export CPPFLAGS LD_LIBRARY_PATH LDFLAGS CPPFLAGS =“-I / products / BerkleyDB / include” LDFLAGS =“-L / products / BerkleyDB / lib -L ​​/ products / BerkleyDB / lib -R / products / BerkleyDB / lib” LD_LIBRARY_PATH =“ / products / BerkleyDB / lib”导出CPPFLAGS LD_LIBRARY_PATH LDFLAGS

Then: 然后:

./configure --prefix=/products/openldap-2.4.40 ./configure --prefix = /产品/openldap-2.4.40

..... checking if Berkeley DB version supported by BDB/HDB backends... no configure: error: BerkeleyDB version incompatible with BDB/HDB backends .....检查BDB / HDB后端是否支持Berkeley DB版本...否配置:错误:BerkeleyDB版本与BDB / HDB后端不兼容

Any Ideas?! 有任何想法吗?!

Error: BerkeleyDB version incompatible with BDB/HDB backends

This means that you need to upgrade your Berkeley Database because OpenLDAP support database version >= 4.4. 这意味着您需要升级Berkeley数据库,因为OpenLDAP支持数据库版本> = 4.4。

http://thompsonng.blogspot.com/2014/06/ldap-installing-openldap.html http://thompsonng.blogspot.com/2014/06/ldap-installing-openldap.html

Due to a licence change in 6.0.20 from BSD to AGPL. 由于6.0.20中的许可证从BSD更改为AGPL。 Search for "Berkeley DB licence change" to find some articles covering this (I can only post 2 links, and the ones below are more informative). 搜索“ Berkeley DB许可证更改”以找到有关此内容的文章(我只能发布2个链接,下面的链接提供的信息更多)。

Howard Chu has stated that this change makes it a violation of the Berkeley DB licence to run an LDAP server using Berkeley DB 6.0 or later without a commercial licence: http://www.openldap.org/lists/openldap-technical/201309/msg00116.html 霍华德·朱(Howard Chu)表示,此更改违反了伯克利(Berkeley DB)许可,使用伯克利(Berkeley)DB 6.0或更高版本在没有商业许可的情况下运行LDAP服务器: http : //www.openldap.org/lists/openldap-technical/201309/ msg00116.html

In that message, Howard notes that using 6.0 or later is no better than using 5.3. Howard在该消息中指出,使用6.0或更高版本并不比使用5.3更好。

As a result, the OpenLDAP developers have intentionally added a check for DB 6.0.20 or later: http://www.openldap.org/its/index.cgi/Build?id=7890;selectid=7890 结果,OpenLDAP开发人员有意添加了对DB 6.0.20或更高版本的检查: http : //www.openldap.org/its/index.cgi/Build?id= 7890;selectid=7890

Of course, the OpenLDAP developers have been expecting changes to the Berkeley DB licensing for some time, and developed their own database engine, LMDB, which has been adopted by many open-source projects that previously used Berkeley DB. 当然,一段时间以来,OpenLDAP开发人员一直期望对Berkeley DB许可进行更改,并开发了自己的数据库引擎LMDB,该引擎已被以前使用Berkeley DB的许多开源项目所采用。 Naturally, OpenLDAP has a backend for this database engine, back_mdb. 自然,OpenLDAP具有此数据库引擎的后端back_mdb。

So: 所以:

  • If you have existing OpenLDAP databases using back_bdb or back_hdb (both use Berkeley DB as the database library), compile with Berkeley DB 5.3, and plan to migrate to back_mdb in future 如果您已有使用back_bdb或back_hdb(都使用Berkeley DB作为数据库库)的OpenLDAP数据库,请使用Berkeley DB 5.3进行编译,并计划将来迁移到back_mdb

  • If you are shipping OpenLDAP in a commercial product and you require Berkeley DB 6.x with (back_bdb, back_hdb), get a commercial licence from Oracle or ship DB 5.3 (and plan to migrate). 如果您要在商业产品中交付OpenLDAP,并且要求Berkeley DB 6.x带有(back_bdb,back_hdb),请从Oracle获得商业许可或交付DB 5.3(并计划进行迁移)。

  • If you are just looking for the most reliable and performant local storage backend for OpenLDAP, you should probably use back_mdb 如果您只是在寻找最可靠,性能最佳的OpenLDAP本地存储后端,则应该使用back_mdb

(BTW., many linux distributions still ship 5.3 and will not ship 6.x because of the licence change) (顺便说一句,由于许可证更改,许多linux发行版仍交付5.3,而不会交付6.x)

sed -i '/6.0.20/ a\\t__db_version_compat' configure

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM