系统选用的是[Ubuntu Server 16.04.2 LTS](下载地址:https://www.ubuntu.com/download/server)。


1.在第一步访问上面的链接并下载最新版本的Ubuntu服务器ISO映像的计算机上。
一旦图像下载完成后,将其刻录到CD或创建一个使用Unbootin(对于BIOS的机器),或一个可启动的U盘。
2.将可启动媒体介绍相应的驱动器,启动机器,指示BIOS / UEFI通过按一个特殊的功能键(F2,F11,F12)启动时从插入的USB / CD驱动器。
几秒钟后,你会与Ubuntu的安装程序的第一个屏幕。选择您的语言来执行安装,打回车键移动到下一个屏幕。

选择的Ubuntu 16.04服务器安装语言,因为是服务器版本没有桌面,语言选择英语,否则会出现乱码,当然也可以先选择中文,后面修改默认语言为英文来解决乱码的问题。
3.在下一屏系列然后从列表中提出你的物理位置。如果您的位置比第一个屏幕上提供的那些不同,选择其他并按下回车键,然后选择根据您所在的大洲和国家的位置。这个位置也将用于由时区系统变量。使用下面截图作为指导。
选择Ubuntu 16.04的服务器位置 我选择的是Hong Kong

选择国家地区 Asia

选择区位

4.为你的系统指定区域设置和键盘设置,如下图所示,并打回车继续安装设置。
本地配置

配置键盘布局

5.接下来是网络配置,系统会自动把侦测出的网卡显示出来,让你选择配置哪个,选择后系统会自动配置,如果有无线网卡的也可以配置,最下面选择手动配置。
设置的Ubuntu 16.04主机名

配置网络

设置主机名和域名(没有必要要求的)。这一步结束的网络设置。

6.在这一步,安装程序会提示您设置一个用户名和为您的系统密码。该用户名将会通过与系统被授予sudo的权力,因此,在技术上,该用户将是至高无上的管理员根帐户(默认情况下禁用)。
选择不加密你的home目录,然后按Enter键,以进一步继续。
设置用户和密码

7.配置系统时钟

8.磁盘分区
对于一般用途的服务器,你可以使用LVM引导方法如下图所示,它会自动为您制作的分区

选择用来安装程序的分区。

磁盘分区大小

确认磁盘分区的变化

再次确认磁盘分区的变化

9.开始安装Ubuntu 16.04服务器

设置上网代理,没有直接下一步

10.完成了安装任务后,屏幕上会出现问你如何管理升级过程。选择不自动更新(手动选择更新),并打回车键继续。

11.这一步会被要求选择要安装的软件。从上而下依次是软件包管理、DNS服务器、web服务器LAMP环境包、邮箱服务器、数据库服务器(兼容MySQL据说阿里云就是用的这个)、samba不同系统文件交换、标准系统实用程序、虚拟机和OpenSSH远程访问服务器,用空格选择,然后下一步。

12.安装grub引导加载程序并选择安装介质(可以是U盘),如果是想硬盘启动就选择硬盘。

13.安装完成,提示取出安装介质,点下一步后重启,至此系统安装完成,下面是重启后的系统更新。

14.登陆输入密码,然后获取权限
sudo -s -H # H要大写
sudo apt-get update # 获取最新资源包
sudo apt-get upgrade # 本机软件全部更新
sudo apt-get dist-upgrade # 本机系统软件更新
systemctl status apache2 # 检查是否开启apache2服务