Original works, allow reprint, reprint, please be sure to hyperlink form to indicate the original source of the article, author information and this statement. Otherwise, legal liability will be held. http://xtony.blog.51cto.com/3964396/891140
Enterprise-Class Open source mail system to build the whole process:
This process is to build the enterprise's mail system, in the enterprise mail this kind of communication is inevitable. Of course, you can choose Microsoft Exchange, but now most of the enterprise online running system is open source, so the implementation of this open source system of the mail system is inevitable.
Benefits:
1. Open source is meant to be free
2. Freedom is the ability to use components to achieve the desired function.
3. Convenient, is casually find a machine to install an open source Linux is deployed
4. Maintenance requires specialized personnel (this is a minor drawback, unlike the purchase of Microsoft Exchange, you can buy services)
Implementing the Required components: Postfix+dovecot+cyrus Sasl+squirrelmail
First, platform construction
The first is the Lamp platform deployment, in fact, apart from MySQL is necessary, such as Apache if you do not need to webmail, PHP is also to support the Web page, but this is to build a meet the needs of most enterprises, so all installed. The following are the source mode of installation, can also be directly yum installed.
1.1 Apache Installation:
#tar-zxf httpd-2.2.9.tar.gz-c/usr/local/src #cd/usr/local/src/httpd-2.2.9 #./configure--prefix=/usr/local/apache2 --enable-so--enable-rewrite #make #make Install
1.2 MySQL Installation:
First install software: #useradd -M -s /sbin/nologin mysql #tar zxf mysql-5.0.56.tar.gz -c /usr/local/src #cd /usr/local/src/mysql-5.0.56 #./configure --prefix=/usr/local/mysql #make #make install post-installation configuration: #cd /usr/local/src/ mysql-5.0.56 #cp support-files/my-medium.cnf /etc/my.cnf #复制主配文件 (Medium database size) #/usr/local/mysql/bin/mysql_install_db --user=mysql #初始化 #chown -R root:mysql /usr/local/mysql #chown -r mysql /usr/local/mysql/var #echo "/usr/local/mysql/lib/mysql" >> / etc/ld.so.conf #添加库文件路径 #ldconfig #刷新库文件搜索路径 startup #/usr/local/ mysql/bin/mysqld_safe --user=mysql & #后台安全启动 #cd /usr/local/src/mysql-5.0.56 #cp support-files/mysql.server /etc/init.d/mysqld #复制启动脚本 #chmod +x /etc/init.d/mysqld #chkconfig --add mysqld #添加到系统自启动服务中 #chkconfig mysqld on #echo "path= $PATH:/usr/local/mysql/bin" >> /etc/profile # Set the system Global environment variable PATH value to facilitate the use of Mysql database commands
1.3 PHP Software
Install software: #tar jxf php-5.2.6.tar.bz2 -C /usr/local/src #cd /usr/local/src/ php-5.2.6 #./configure --prefix=/usr/local/php5 --enable-mbstring \ --WITH-APXS2=/USR /local/apache2/bin/apxs --with-mysql=/usr/local/mysql \ --WITH-CONFIG-FILE-PATH=/USR/LOCAL/PHP5 #make #make test #make install installation: #cd /usr/local/src/php-5.2.6 #cp php.ini-dist /usr/local/php5/php.ini #复制配置文件 #vi /usr/local/apache2/ conf/httpd.conf #修改 Apache Service main configuration file loadmodule php5_module modules/ libphp5.so confirm the existence of this line (otherwise recompile install Apache) addtype application/x-httpd-php .php #添加这行记录 directoryindex index.php index.html # Add a home page about php format in this line
1.4 Test
Apache Test
#vi/usr/local/apache2/htdocs/test.php
<?php phpinfo (); ?>
In IE browser input URL http://ip/test.php
See the page for PHP environment information means that the integration with the Apache service success ...
Mysql Test
#vi/usr/local/apache2/htdocs/testdb.php
<?php $link =mysql_connect (' locahost ', ' Test ', '); if (! $link) echo "Fail!!!" ; else echo "Success!!!" ; Mysql_close ();?>
In IE browser input URL http://ip/testdb.php
See "Success!!!" The word indicates successful integration with Mysql service ...
Second, Postfix Software installation
The following is a formal installation of the components of the messaging system:
2.Postfix (core components, providing letters)
2.1 Stop the system from SendMail software
#service sendmail stop
#chkconfig--level sendmail off
2.2 Compiling and installing the Postfix software