本文教你如何在 Ubuntu 16.04 上安装 Apache、PHP、MySQL、PureFTPD、BIND、Postfix、Dovecot 和 ISPConfig 3.1 搭建一个网站、邮件、邮件列表、DNS和FTP服务器。ISPConfig 3是一个虚拟主机控制面板,使您可以通过网络浏览器配置以下服务:Apache 或 nginx web 服务器,Postfix 电子邮件服务,Courier 或 Dovecot IMAP/POP3 服务,MySQL,BIND 或 MyDNS 域名服务,PureFTPd,SpamAssassin,ClamAV,等等和更多的服务。
注意:本教程中使用的ISPConfig 3.1版目前正处于测试状态下,ISPConfig 3.1 最终将在2016年6月发布,旧的 ISPConfig old stable 3.0.5p9 无法在 Ubuntu 16.04 中使用,而且不兼容PHP 7。
1.初步说明
在本教程中,使用的IP地址为192.168.1.100和网关192.168.1.1主机名server1.example.com。这些设置可能与你的不同,所以你必须根据你的情况更换。进一步讨论之前,你需要有一个基本的最小安装。
2. 编辑 /etc/apt/sources.list 并更新 Linux。
编辑/etc/apt/sources.list。注释掉或从文件中删除安装光盘,并确保库启用。应该是这样设置:
nano /etc/apt/sources.list
内容如下:
#
# deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ – Release amd64 (20160420)]/ xenial main restricted
#deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ – Release amd64 (20160420)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note th