日期:2014-05-16  浏览次数:20794 次

Openldap安装配置详细记录(Linux )
#安装zlib
# tar xvfz zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure --shared
# make
# make install
----------------------
#升级安装Openssl  不要卸载系统自带的Openssl,否则很多服务都起不来.
# tar xzvf openssl-0.9.8k.tar.gz
# cd openssl-0.9.8k
# ./config shared  #注意这里是用./config 会安装到/usr/local/ssl
# make
# make install
#配置库文件搜索路径
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig -v
-------------------------------------------------------
#升级安装Openssh
# 首先卸载系统自带的Openssh
# rpm -e --nodeps openssh-3.9p1-8.RHEL4.24
# 升级openssh
# tar xzvf openssh-5.2p1.tar.gz
# rm -rf /etc/ssh/*
# cd openssh-5.2p1
# ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/ssl --with-zlib  
# make
# make install
-------------------------------------------------------
#安装cyrus-sasl
# tar xzvf cyrus-sasl-2.1.23.tar.gz
# cd cyrus-sasl-2.1.23
# ./configure --prefix=/usr/local/sasl2 --enable-login --with-openssl=/usr/local/ssl
# make
# make install
#把原有的sasl库文件改名或删除,并将相关符号链接指向新安装SASL的库文件
# cd /usr/lib
# mv libsasl2.so.2.0.19 libsasl2.so.2.0.19.OFF
# mv libsasl2.so.2 libsasl2.so.2.OFF
# rm -rf /usr/lib/sasl2/*
# ln -s /usr/local/sasl2/lib/sasl2/*  /usr/lib/sasl2/
# ln -s /usr/local/sasl2/lib/libsasl2.so.2.0.23  /usr/lib/libsasl2.so.2
# ln -s /usr/local/sasl2/lib/libsasl2.so  /usr/lib/libsasl2.so
#配置库文件搜索路径
# echo "/usr/local/sasl2/lib" >> /etc/ld.so.conf
# echo "/usr/local/sasl2/lib/sasl2" >> /etc/ld.so.conf
# ldconfig -v
#创建运行时需要的目录并调试启动
# mkdir -pv /var/state/saslauthd     
#启动并测试验正
# /usr/local/sasl2/sbin/saslauthd -a  shadow
# /usr/local/sasl2/sbin/testsaslauthd -u root -p root的密码
0: OK "Success."
-----------------------------------
#安装BerkeleyDB 不建议安装Berkeley DB 4.7.25 经测试,会出现莫名其妙的错误
# tar xzvf db-4.6.21.tar.gz
# cd db-4.6.21/build_unix
# ../dist/configure --prefix=/data/BerkeleyDB --sysconfdir=/etc
# make
# make install
#配置库文件搜索路径
# echo "/data/BerkeleyDB/lib" >> /etc/ld.so.conf
# ldconfig -v
-----------------------------------
#安装openldap
# tar xzvf openldap-stable-20090411.tgz
# cd openldap-2.4.16
# env CPPFLAGS="-I/data/BerkeleyDB/include -I/usr/local/sasl2/include" LDFLAGS="-L/data/BerkeleyDB/lib -L/usr/local/sasl2/lib -L/usr/local/sasl2/lib/sasl2" ./configure --prefix=/usr/local/openldap --sysconfdir=/etc --enable-passwd --enable-wrappers  --enable-spasswd --enable-crypt --enable-modules --enable-ldap --enable-accesslog
# make depend
# make
# make test #这一步时间会很长
# make install
# cp /usr/local/openldap/var/openldap-data/DB_CONFIG.example  /usr/local/openldap/var/openldap-data/DB_CONFIG
#配置库文件搜索路径
# echo "/usr/local/openldap/lib" >> /etc/ld.so.conf
# ldconfig -v
# chmod 700 /usr/local/openldap/var/openldap-data
# mkdir -p /usr/local/openldap/var/accesslog
==============安装apache软件=============================================================
------------------------------------------------------
# tar zxvf httpd-2.2.11.tar.gz
# cd httpd-2.2.11
# ./configure --prefix=/data/apache --enable-mods-shared=all --enable-so
# make
# make install
# cp /data/apache/bin/apachectl /etc/init.d/httpd
# chmod +x /etc/init.d/httpd
# vi /etc/rc.d/rc.local
#在rc.local上加入一行/data/apache/bin/apachectl –k start  系统启动时自动启动Apache服务
------------------------------------------------------
# tar xzvf gettext-0.17.tar.gz
# cd gettext-0.17
# ./configure --prefix=/usr/local/gettex
# make
# make install
#配置库文件搜索路径
# echo "/usr/local/gettex/lib" >> /etc/ld.so.conf