CentOS5.3+Nginx0.7.57+Postfix+Extmail邮件系统安装配置说明:关于邮件配置这几篇文章,主要参考的是作者sery博客,里边还有一些作者的内容.本篇配置,大部分软件版本与原作者的都不相同.同时,里边更新了一些新的内容,如WEBServer采用nginx,系统版本采用CentOS5.3.这几篇命名为原创不是作者的本意,为了避免误解,现更改为转载.但,整篇配置确是作者一步步配置.在原作者的配置上也发现了一些新的问题.本人会继续开源软件的研究和实践.系统平台:CentOS5.31.nginx……………………………………………webserver2.Mysql……………………………………………用数据库存储用户信息3.Php………………………………………………php(fastcgi)4.Authlib…………………………………………与sasl一起做验证5.Sasl……………………………………………验证方法6.Postfix………………………………………smtp邮件发送服务主程序7.Courier-imap…………………………………pop3邮件接收主程序8.Pcre……………………………………………安装Imap需要perl正则表达式9.Maildrop…………………………………………邮件投递代理,邮件转发到用户邮箱10.clamav……………………………………………杀毒软件11.amavisd-new………………………………………邮件病毒扫描12.Mail-SpamAssassin………………………………防垃圾邮件CentOS5.3系统安装包,一定要选的6个包。1、systemtools2、administrationtools3、developmenttools4、developmentlibraries5、networkservers(5.1为networkservices)6.base(5.1没有单独列出)相关软件下载地址:://asg3.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.22.tar.gz://://nchc.dl.sourceforge.net/sourceforge/courier/courier-imap-4.4.1.tar.bz2://fontconfig.org/release/fontconfig-2.6.0.tar.gz以下是具体安装步骤:一.PHP(FastCGI)环境一.PHP(FastCGI)环境1.MySQL安装@版本:mysql-5.0.41.tar.gz安装过程:……………………………安装开始………………………………………………#groupaddmysql#useradd-gmysqlmysql#./configure--prefix=/usr/local/mysql--with-extra-charsets=gb2312,gbk--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock--with-mysqld-ldflags=-all-static--with-client-ldflags=-all-static--sysconfdir=/etc--enable-assembler#make&&makeinstall#scripts/mysql_install_db--user=mysql//数据库安装#bin/mysqld_safe--user=mysql&//起动mysqld…………………………安装结束……………………………………………echo/usr/local/mysql/lib/mysql/etc/ld.so.conf//postfix编译里会用到基本操作:1.起动/关闭MySQL/usr/local/mysql/bin/mysqld_safe&/usr/local/mysql/bin/mysqladmin-uroot–pshutdown2.设置密码mysqladmin-urootpassword'new-password'3.添加/usr/local/webserver/mysql5/bin到环境变量vi/etc/profileexportPATH=$PATH:/usr/local/mysql/bin2.GD相关安装1.@版本libpng-1.2.29.tar.gz###################################################shelltarzxvflibpng-1.2.29.tar.gzshellcdlibpng-1.2.29shell./configureshellmakeshellmakeinstall###################################################2.版本jpegsrc.v6b.tar.gz#############################################################shelltarzxvfjpegsrc.v6b.tar.gzshellcdjpeg-6b/*****由于jpeg的安装脚本中,没有创建文件夹,因此我们得手动给他创建好文件夹**/Shellmkdir–p/usr/local/jpeg/binShellmkdir/usr/local/jpeg/libShellmkdir/usr/local/jpeg/includeShellmkdir/usr/local/jpeg/manShellmkdir/usr/local/jpeg/man1Shellmkdir/usr/local/jpeg/man/man1/*生成共享*/Shell./configure--prefix=/usr/local/jpeg--enable-shared--enable-staticShellmake&&makeinstall#################################################3.@版本freetype-2.3.7.tar.gz#############################################shelltarzxvffreetype-2.3.7.tar.gzshellcdfreetype-2.3.7shell./configure//不指定目录,方便以下RRDTool安装shellmake&&makeinstall##############################################4.@版本fontconfig-2.6.0.tar.gz#################################################Shelltarzxvffontconfig-2.6.0.tar.gz&&cdfont*Shell./configure--prefix=/usr/local/fontconfig--with-freetype-config=/usr/local/bin/freetype-configShellmake&&makeinstall##################################################5.@版本gd-2.0.35.tar.gzGD库安装以前先把以上几个安装上,这个安装是有一定顺序的。###############################################Shelltarzxvfgd-2.0.35.tar.gzShellcdgd-2.0.35Shell./configure--prefix=/usr/local/gd--with-png--with-jpeg=/usr/local/jpeg--with-freetype--with-fontconfig=/usr/local/fontconfigShellmake&&makeinstall###############################################**Configurationsummaryforgd2.0.34:SupportforPNGlibrary:yesSupportforJPEGlibrary:yesSupportforFreetype2.xlibrary:yesSupportforFontconfiglibrary:yesSupportforXpmlibrary:noSupportforpthreads:yesfaq:1cd.&&/bin/sh/usr/local/src/gd-2.0.35/config/missing--runaclocal-1.9-Iconfigaclocal:configure.ac:64:warning:macro`AM_ICONV'notfoundinlibrarycd.&&/bin/sh/usr/local/src/gd-2.0.35/config/missing--runautomake-1.9--foreigncd.&&/bin/sh/usr/local/src/gd-2.0.35/config/missing--runautoconfconfigure.ac:64:error:possiblyundefinedmacro:AM_ICONVIfthistokenandothersarelegitimate,pleaseusem4_pattern_allow.SeetheAutoconfdocumentation.make:***[configure]Error1解决:重新make一下,如果不行,可以安装下边的包安装gettext包安装方式:shellyuminstallgettext或通过手动下载gettext包3.PHP(FastCGI)模式安装@php版本:5.2.6#gzip-cdphp-5.2.9-fpm-0.5.10.diff.gz|patch-dphp-5.2.9-p1步骤:############################################################./configure--prefix=/usr/local/phpcgi--with-config-file-path=/usr/local/phpcgi/etc--with-mysql=/usr/local/mysql--with-gd=/usr/local/gd--with-jpeg-dir=/usr/local/jpeg--with-png-dir=/usr/local/lib--with-freetype-dir=/usr/local/lib--enable-mbstring--enable-mbregex--enable-bcmath--enable-sockets--with-xsl--with-curl--with-curlwrappers--enable-fastcgi--enabl