环境:
系统:CentOS 6.8
安装Berkeley DB数据库:https://www.jianshu.com/p/cd21a5e964b4
编译安装:
下载源码包:
地址:http://www.openldap.org/software/download/
安装:
# tar -zxvf openldap-2.4.45.tgz -C /usr/local/src/
# cd /usr/local/src/openldap-2.4.45/
# ./configure --prefix=/usr/local/openldap2.4
# make && make test &> /dev/null && make install
如有报错:error: BDB/HDB: BerkeleyDB not available
cd /usr/local/src/openldap-2.4.45/
export CPPFLAGS="-I/usr/local/BDB/include"
export LDFLAGS="-L/usr/local/lib -L/usr/local/BDB/lib -R/usr/local/BDB/lib"
export LD_LIBRARY_PATH="/usr/local/BDB/lib"
添加库文件
# vim /etc/ld.so.conf.d/ldap.conf
/usr/local/openldap2.4/lib/
# ldconfig -v
添加头文件
# ln -sv /usr/local/openldap2.4/include /usr/local/ldap2.4
网友评论