2、安装 openssl
[root @ root] # tar zxvf openssl-0.9.8e.tar.gz
[root @ root] # cd openssl-0.9.8e
[root @ ] # ./config shared zlib
[root @ ] # make
[root @ ] # make test
[root @ ] # make install
[root @ ] # mv /usr/bin/openssl/usr/bin/openssl.OFF
[root @ ] # mv /usr/include/openssl/usr/include/openssl.OFF
[root @ ] # rm /usr/lib/libssl.so
[root @ ] # ln -s /usr/local/ssl/bin/openssl/usr/bin/openssl
[root @ ] #ln -s /usr/local/ssl/include/openssl/usr/include/openssl
[root @ ] # ln -sv/usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
配置库文件搜索路径
[root @ ] #echo "/usr/local/ssl/lib">> /etc/ld.so.conf
[root @ ] # lconfig
检查是否安装 openssl
[root @ ] # openssl version
OpenSSL 0.9.8e 23 Feb 2007
3、安装 cyrus-sasl
[root @ root] # tar cyrus-sasl-2.1.22.tar.gz
[root @ root] # cd cyrus-sasl-2.1.22
[root @ ] #./configure--prefix=/usr/local/sasl2 --disable-gssapi --disable-anon--disable-sample --disable-digest --enable-plain --enable-login--enable-sql --with-mysql=/usr/local/mysql--with-mysql-includes=/usr/local/mysql/include/mysql--with-mysql-libs=/usr/local/mysql/lib/mysql --with-authdaemond=/usr/local/courier-authlib/var/spool/authdaemon/socket
[root @ ] # make
[root @ ] # make install
关闭原有的 sasl
[root @ ] # mv/usr/lib/libsasl2.a /usr/lib/libsasl2.a.OFF
[root @ ] # mv/usr/lib/libsasl2.la /usr/lib/libsasl2.la.OFF(无)
[root @ ] # mv/usr/lib/libsasl2.so.2.0.19 /usr/lib/libsasl2.so.2.0.19.OFF
[root @ ] # mv/usr/lib/sasl2 /usr/lib/sasl2.OFF
[root @ ] # rm /usr/lib/libsasl2.so
[root @ ] # rm /usr/lib/libsasl2.so.2
[root @ ] # ln -s/usr/local/sasl2/lib/* /usr/lib
postfix2.3以后的版本会分别在/usr/local/lib和/usr/local/include中搜索sasl库文件及头文件,故还须将其链接至此目录中:
[root @ ] # ln -sv/usr/local/sasl2/lib/* /usr/local/lib
[root @ ] # ln -sv/usr/local/sasl2/include/sasl/* /usr/local/include
创建运行时需要的目录并调试启动
[root @ ] # mkdir -pv/var/state/saslauthd
[root @ ] #/usr/local/sasl2/sbin/saslauthd -a shadow pam -d
启动并测试
[root @ ] # /usr/local/sasl2/sbin/saslauthd-a shadow pam
[root @ ] #
配置库文件搜索路径
[root @ ] # echo "/usr/local/sasl2/lib">> /etc/ld.so.conf
[root @ ] # echo "/usr/local/sasl2/lib/sasl2">> /etc/ld.so.conf
[root @ ] # ldconfig
开机自动启动
[root @ ] # echo"/usr/local/sasl2/sbin/saslauthd -a shadowpam">>/etc/rc.local
4、安装 Berkeley-DB
[root @ root] # tar zxvf db-4.5.20.tar.gz
[root @ root] # cd db-4.5.20/build_unix
[root @ ] #../dist/configure--prefix=/usr/local/BerkeleyDB
[root @ ] #make
[root @ ] #make install
修改相应的头文件指向
[root @ ] #mv /usr/inculde/db4 /usr/inculde/db4.OFF
[root @ ] #rm /usr/inculde/db_cxx.h
[root @ ] #rm /usr/inculde/db.h
[root @ ] #rm /usr/inculde/db_185.h
[root @ ] # ln -sv/usr/local/BerkeleyDB/include /usr/include/db4
[root @ ] # ln -sv/usr/local/BerkeleyDB/include/db.h /usr/include/db.h
[root @ ] # ln -sv/usr/local/BerkeleyDB/include/db_cxx.h /usr/include/db_cxx.h
配置库文件搜索路径
[root @ ] # echo "/usr/local/BerkeleyDB/lib">> /etc/ld.so.conf
[root @ ] # ldconfig