基于Linux和Postfix的郵件系統的web mail安裝手冊
添加時間:2010-11-15
添加:
admin
1.、安裝系統
安裝之前:因用戶數據都保存在/var目錄下,因此安裝系統時/var的空間應盡量大。系統的版本為最小化安裝,軟件包只安裝只裝開發包 (development)。在文檔中假設服務器的ip地址為192.168.0.2,域名為test.com,主機名為mail.test.com。所需的軟件包我都打包好了。
下載地址: http://www.toping.net/soft/src.tar.gz
請兄弟們仔細一些,注意空格和TAB。
祝兄弟們好運。本人水平有限。如果發現文章中有什么錯誤和不當的地方請發郵件:scyz at toping.net。我會在第一時間給予答復。
2.關閉selinux
[root@mail]# vi /etc/selinux/config
SELINUX=disable
[root@mail]# reboot
3、設置YUM
[root@mail yum.repos.d] vi CentOS-Base.repo
[base]
name=CentOS-4.2 - Base
baseurl=http://mirror.be10.com/centos/4.2/os/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-4.2 - Updates
baseurl=http://mirror.be10.com/centos/4.2/updates/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-4.2 - Addons
baseurl=http://mirror.be10.com/centos/4.2/addons/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-4.2 - Extras
baseurl=http://mirror.be10.com/centos/4.2/extras/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4.2 - Plus
baseurl=http://mirror.be10.com/centos/4.2/centosplus/  $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-4.2 - Contrib
baseurl=http://mirror.be10.com/centos/4.2/contrib/  $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages in testing
[testing]
name=CentOS-4.2 - Testing
baseurl=http://mirror.be10.com/centos/4.2/testing/  $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
[root@mail yum.repos.d]# vi dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el  $releasever/en/  $basearch/dag
gpgcheck=1
enabled=1
[root@mail yum.repos.d]# yum update
4、安裝mysql
[root@mail build]#yum install mysql-server
[root@mail build]#yum install mysql-devel
5、安裝apache
[root@mail build]#yum install httpd
6.安裝php
[root@mail build]#yum install php
[root@mail build]#yum install php-mysql
[root@mail build]#yum install php-gd
[root@mail build]#yum install php-imap
[root@mail build]#yum install vsftpd
[root@mail build]#yum install clamav
[root@mail build]#yum install spamassassin
[root@mail build]#/usr/bin/freshclam
設置apache
默認:
User apache
改為
User postfix
默認
Group apache
改為
Group postfix
默認
AddDefaultCharset UTF-8
改為
AddDefaultCharset gb2312
新加入:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
7、安裝phpMyAdmin
[root@mail build]#tar –zxf ../src/phpMyAdmin-2.8.0.1.tar.gz
[root@mail build]#mv phpMyAdmin-2.8.0.1 /var/www/html/dbadmin/
[root@mail build]#cp /var/www/html/dbadmin/libraries/config.default.php /var/www/html/dbadmin/dbadmin/libraries/config.inc.php (line 1.)
8、設置數據庫
[root@mail build]#mysql
Mysql> create datases postfix;
Mysql> use mysql;
Mysql> INSERT INTO us
安裝之前:因用戶數據都保存在/var目錄下,因此安裝系統時/var的空間應盡量大。系統的版本為最小化安裝,軟件包只安裝只裝開發包 (development)。在文檔中假設服務器的ip地址為192.168.0.2,域名為test.com,主機名為mail.test.com。所需的軟件包我都打包好了。
下載地址: http://www.toping.net/soft/src.tar.gz
請兄弟們仔細一些,注意空格和TAB。
祝兄弟們好運。本人水平有限。如果發現文章中有什么錯誤和不當的地方請發郵件:scyz at toping.net。我會在第一時間給予答復。
2.關閉selinux
[root@mail]# vi /etc/selinux/config
SELINUX=disable
[root@mail]# reboot
3、設置YUM
[root@mail yum.repos.d] vi CentOS-Base.repo
[base]
name=CentOS-4.2 - Base
baseurl=http://mirror.be10.com/centos/4.2/os/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-4.2 - Updates
baseurl=http://mirror.be10.com/centos/4.2/updates/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-4.2 - Addons
baseurl=http://mirror.be10.com/centos/4.2/addons/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-4.2 - Extras
baseurl=http://mirror.be10.com/centos/4.2/extras/  $basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4.2 - Plus
baseurl=http://mirror.be10.com/centos/4.2/centosplus/  $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-4.2 - Contrib
baseurl=http://mirror.be10.com/centos/4.2/contrib/  $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages in testing
[testing]
name=CentOS-4.2 - Testing
baseurl=http://mirror.be10.com/centos/4.2/testing/  $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
[root@mail yum.repos.d]# vi dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el  $releasever/en/  $basearch/dag
gpgcheck=1
enabled=1
[root@mail yum.repos.d]# yum update
4、安裝mysql
[root@mail build]#yum install mysql-server
[root@mail build]#yum install mysql-devel
5、安裝apache
[root@mail build]#yum install httpd
6.安裝php
[root@mail build]#yum install php
[root@mail build]#yum install php-mysql
[root@mail build]#yum install php-gd
[root@mail build]#yum install php-imap
[root@mail build]#yum install vsftpd
[root@mail build]#yum install clamav
[root@mail build]#yum install spamassassin
[root@mail build]#/usr/bin/freshclam
設置apache
默認:
User apache
改為
User postfix
默認
Group apache
改為
Group postfix
默認
AddDefaultCharset UTF-8
改為
AddDefaultCharset gb2312
新加入:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
7、安裝phpMyAdmin
[root@mail build]#tar –zxf ../src/phpMyAdmin-2.8.0.1.tar.gz
[root@mail build]#mv phpMyAdmin-2.8.0.1 /var/www/html/dbadmin/
[root@mail build]#cp /var/www/html/dbadmin/libraries/config.default.php /var/www/html/dbadmin/dbadmin/libraries/config.inc.php (line 1.)
8、設置數據庫
[root@mail build]#mysql
Mysql> create datases postfix;
Mysql> use mysql;
Mysql> INSERT INTO us
新文章:
- CentOS7下圖形配置網絡的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統后丟失windows啟動項
- CentOS單網卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網打印機IP講解
- CentOS7使用hostapd實現無AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網絡重啟出錯
- 解決Centos7雙系統后丟失windows啟動項
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統有什么不同呢
- Centos 6.6默認iptable規則詳解