本文教你如何在 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 for how to upgrade to
# newer versions of the distribution.
deb xenial main restricted
# deb-src xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb xenial-updates main restricted
# deb-src 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 xenial universe
# deb-src xenial universe
deb xenial-updates universe
# deb-src 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 that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb xenial multiverse
# deb-src xenial multiverse
deb xenial-updates multiverse
# deb-src xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb xenial-backports main restricted universe multiverse
# deb-src xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb xenial partner
# deb-src xenial partner
deb xenial-security main restricted
# deb-src xenial-security main restricted
deb xenial-security universe
# deb-src xenial-security universe
deb xenial-security multiverse
# deb-src xenial-security multiverse
然后运行:
apt-get update
更新apt软件包和数据库:
apt-get upgrade
安装最新的更新(如果有的话)。如果你看到一个新的内核被安装作为更新的一部分,重新引导系统:
reboot
3.更改默认的shell
dpkg-reconfigure dash
Use dash as the default system shell (/bin/sh)?
如果你不这样做,ISPConfig安装会失败。
--------------------------------------分割线 --------------------------------------
Ubuntu 16.04 LTS正式发布下载,长达5年技术支持
Ubuntu 16.04 LTS 今日发布 Canonical公布系统新特性
Ubuntu 16.04 需要你的帮助,让 GNOME Software 更美观
--------------------------------------分割线 --------------------------------------
4.禁用 AppArmor