OpenLDAP installation

最简单的安装方法rpm安装
 
  

# rpm -qa|grep openldap
openldap-debuginfo-2.4.23-32.el6_4.1.x86_64
openldap-2.4.23-32.el6_4.1.x86_64
compat-openldap-2.3.43-2.el6.x86_64
openldap-clients-2.4.23-32.el6_4.1.x86_64
openldap-servers-sql-2.4.23-32.el6_4.1.x86_64
openldap-servers-2.4.23-32.el6_4.1.x86_64
openldap-devel-2.4.23-32.el6_4.1.x86_64


以下是源码安装.
下载OpenLDAP的稳定版
 
  

# wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.39.tgz


安装依赖软件
为了全面兼容LDAPv3, 需要安装依赖软件, 这些软件的版本建议
1. TLS(Transport Layer Security) service 依赖包, OpenLDAP客户端和服务端都需要安装.
 
  

OpenSSL, GnuTLS, or MozNSS(三选一)
OpenSSL is available from http://www.openssl.org/
GnuTLS is available from http://www.gnu.org/software/gnutls/
Mozilla NSS is available from http://developer.mozilla.org/en/NSS.
安装openssl
# tar -zxvf openssl-1.0.1g.tar.gz
# cd openssl-1.0.1g
阅读INSTALL和README
# ./config --prefix=/usr/local --openssldir=/usr/local/ssl
# make
# make install


2. SASL(Simple Authentication and Security Layer) service  依赖包, OpenLDAP客户端和服务端都需要安装.
 
  

Cyrus SASL
安装sasl
# wget ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.25.tar.gz
# tar -zxvf cyrus-sasl-2.1.25.tar.gz
# cd cyrus-sasl-2.1.25
阅读INSTALL和README
# ./configure
# make
# make install
********************************************************
* WARNING:
* Plugins are being installed into /usr/local/lib/sasl2,
* but the library will look for them in /usr/lib/sasl2.
* You need to make sure that the plugins will eventually
* be in /usr/lib/sasl2 -- the easiest way is to make a
* symbolic link from /usr/lib/sasl2 to /usr/local/lib/sasl2,
* but this may not be appropriate for your site, so this
* installation procedure won't do it for you.
*
* If you don't want to do this for some reason, you can
* set the location where the library will look for plugins
* by setting the environment variable SASL_PATH to the path
* the library should use.
********************************************************
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/opt/soft_bak/cyrus-sasl-2.1.25'
make[1]: Leaving directory `/opt/soft_bak/cyrus-sasl-2.1.25'
[root@db-172-16-3-150 cyrus-sasl-2.1.25]# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2

sasl版本不对可能导致slapd启动失败, 见/var/log/messages
 
   

slapd[15107]: auxpropfunc error version mismatch with plug-in


3. Kerberos Authentication Service
 
  

Heimdal or MIT Kerberos V libraries(二选一)
Heimdal Kerberos is available from http://www.pdc.kth.se/heimdal/
MIT Kerberos is available from http://web.mit.edu/kerberos/www/.
安装MIT Kerberos V Libraries
# tar -xvf krb5-1.12.1-signed.tar 
# tar -zxvf krb5-1.12.1.tar.gz
# cd krb5-1.12.1
# cd src
# ./configure
# make
# make install


4. Database Software
 
  

OpenLDAP's slapd BDB and HDB primary database backends require Oracle Corporation Berkeley DB
下载
安装
# tar -zxvf db-6.0.30.tar.gz
# cd db-6.0.30
# cd dist/buildpkg
# cd build_unix
# ../dist/configure --prefix=/opt/bdb6 --enable-sql
# make
# make install


5. Threads
OpenLDAP supports POSIX pthreads, Mach CThreads, and a number of other varieties.

6. TCP Wrappers
slapd supports TCP Wrappers (IP level access control filters) if preinstalled.

7. 配置ld.so.conf
 
  

# vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
/usr/lib/sasl2
/opt/bdb6/lib
# ldconfig 


安装openldap
 
  

# tar -zxvf openldap-2.4.39.tgz
# cd openldap-2.4.39
# ./configure --help
# ./configure --prefix=/opt/openldap-2.4.39 --with-threads --with-tls --with-cyrus-sasl
# make depend
# make
# make install
# export MANPATH=/opt/openldap-2.4.39/share/man:$MANPATH
# export MANPATH=/opt/openldap-2.4.39/bin:/opt/openldap-2.4.39/sbin:$PATH


[参考]
1.  http://www.openldap.org/doc/admin24/index.html
14. 配置源码时支持的环境变量
VariableDescription
CCSpecify alternative C Compiler
CFLAGSSpecify additional compiler flags
CPPFLAGSSpecify C Preprocessor flags
LDFLAGSSpecify linker flags
LIBSSpecify additional libraries

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值