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. 配置源码时支持的环境变量
Variable Description
CC Specify alternative C Compiler
CFLAGS Specify additional compiler flags
CPPFLAGS Specify C Preprocessor flags
LDFLAGS Specify linker flags
LIBS Specify additional libraries

相关文章
|
Ruby
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.错误解决办法
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.错误解决办法
2500 0
|
Ubuntu 关系型数据库 MySQL
How to Install and Configure Icinga2 Monitoring Tool on Ubuntu 16.04
In this tutorial, we will explore how to install Docker on Alibaba Cloud and learn some important Docker commands to help you deploy and manage your container services.
3005 0
How to Install and Configure Icinga2 Monitoring Tool on Ubuntu 16.04
|
MySQL 关系型数据库 Linux
|
网络协议 网络安全 PHP
|
Linux 数据安全/隐私保护 网络安全
|
关系型数据库 MySQL 数据安全/隐私保护
|
监控 网络协议 关系型数据库