Chinaunix首页 | 论坛 | 博客
  • 博客访问: 90412
  • 博文数量: 30
  • 博客积分: 2061
  • 博客等级: 大尉
  • 技术积分: 310
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-23 21:42
文章分类
文章存档

2010年(3)

2009年(17)

2008年(10)

我的朋友

分类:

2009-08-03 18:48:35

PCRE_VER=7.9
curl -R -C - -O
rm -Rf pcre-${PCRE_VER}
tar -xjvf pcre-${PCRE_VER}.tar.bz2
cd pcre-${PCRE_VER}
./configure --prefix=/usr/local/pcre-${PCRE_VER} --disable-dependency-tracking --enable-shared=no --enable-static=yes --disable-cpp --enable-utf8 --enable-unicode-properties
make
make install
cd ..

OPENSSL_VER=0.9.8k
curl -R -C - -O
rm -Rf openssl-${OPENSSL_VER}
tar -xzvf openssl-${OPENSSL_VER}.tar.gz
cd openssl-${OPENSSL_VER}
./config no-shared --prefix=/usr/local/openssl-${OPENSSL_VER}
perl -pi -e 's/^CFLAG\s*\=\s*/CFLAG= \$(CFLAGS) /' Makefile
perl -pi -e 's/^install\:\s+all\s+install_docs/install: all/' Makefile
make
make install
cd ..

DOVECOT_VER=1.2.2
MANAGESIEVE_VER=0.11.7
SIEVE_VER=0.1.9
curl -R -C - -O
curl -R -C - -O
curl -R -C - -O
curl -R -C - -O
rm -Rf dovecot-${DOVECOT_VER} dovecot-1.2-sieve-${SIEVE_VER} dovecot-1.2-managesieve-${MANAGESIEVE_VER}
tar -xzvf dovecot-${DOVECOT_VER}.tar.gz
tar -xzvf dovecot-1.2-sieve-${SIEVE_VER}.tar.gz
tar -xzvf dovecot-1.2-managesieve-${MANAGESIEVE_VER}.tar.gz
cd dovecot-${DOVECOT_VER}
gzip -dc ../dovecot-${DOVECOT_VER}-managesieve-${MANAGESIEVE_VER}.diff.gz | patch -p1
./configure --prefix=/usr/local/dovecot --enable-header-install --disable-static --with-ioloop=epoll --with-notify=dnotify --without-passwd --without-nss --without-passwd-file --without-shadow --without-pam --without-checkpassword --with-mysql --with-pic
make
make install-strip
cd ../dovecot-1.2-sieve-${SIEVE_VER}
./configure --prefix=/usr/local/dovecot --disable-shared --with-dovecot=../dovecot-${DOVECOT_VER} --with-unfinished-features
make
make install-strip
cd ../dovecot-1.2-managesieve-${MANAGESIEVE_VER}
./configure --prefix=/usr/local/dovecot --with-dovecot=../dovecot-${DOVECOT_VER} --with-dovecot-sieve=../dovecot-1.2-sieve-${SIEVE_VER}
make
make install-strip

POSTFIX_VER=2.6.3
curl -R -C - -O
rm -Rf postfix-${POSTFIX_VER}
tar -xzvf postfix-${POSTFIX_VER}.tar.gz
cd postfix-${POSTFIX_VER}
CCARGS="-fPIC -DHAS_PCRE -I/usr/local/pcre-${PCRE_VER}/include -DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\" -DUSE_TLS -I/usr/local/openssl-${OPENSSL_VER}/include/openssl -DDEF_CONFIG_DIR=\\\"/usr/local/postfix/etc\\\" -DDEF_COMMAND_DIR=\\\"/usr/local/postfix/sbin\\\" -DDEF_DAEMON_DIR=\\\"/usr/local/postfix/libexec\\\" -DDEF_MAILQ_PATH=\\\"/usr/local/postfix/bin/mailq.postfix\\\" -DDEF_MANPAGE_DIR=\\\"/usr/local/postfix/share/man\\\" -DDEF_NEWALIAS_PATH=\\\"/usr/local/postfix/bin/newaliases.postfix\\\" -DDEF_README_DIR=\\\"/usr/local/postfix/share/doc/postfix-${POSTFIX_VER}/README_FILES\\\" -DDEF_SENDMAIL_PATH=\\\"/usr/local/postfix/sbin/sendmail.postfix\\\""
AUXLIBS="-L/usr/local/pcre-${PCRE_VER}/lib -lpcre -L/usr/local/mysql/lib/mysql -lmysqlclient -lm -L/usr/local/openssl-${OPENSSL_VER}/lib -lssl -lcrypto -pie -Wl,-z,relro"
make -f Makefile.init makefiles CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="${CFLAGS} -Wno-comment"
make
sh postfix-install -non-interactive install_root=/ data_directory=/var/lib/postfix mail_owner=postfix queue_directory=/var/spool/postfix setgid_group=postdrop
install -c auxiliary/rmail/rmail /usr/local/postfix/bin/rmail.postfix
install -c -m 755 bin/smtp-sink /usr/local/postfix/sbin
install -c -m 755 bin/smtp-source /usr/local/postfix/sbin
install -c auxiliary/qshape/qshape.pl /usr/local/postfix/sbin/qshape
mkdir -p /usr/local/postfix/lib
pushd /usr/local/postfix/lib
ln -sf ../sbin/sendmail.postfix .
popd
touch /var/lib/misc/postfix.aliasesdb-stamp
以后继续完善
阅读(1013) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~