用UltraISO将其刻录到一个 U 盘上,然后在服务器上安装就可以了(原谅一笔带过,因为安装的时候没拍摄安装过程)。
0x02 配置网络
实验室的服务器是静态独立 IP,需要另加配置才能上网
1
root@ubuntu:~# vi /etc/network/interfaces
配置网卡信息如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface # This is an autoconfigured IPv6 interface auto enp3s0 iface enp3s0 inet static # static为静态模式,DHCP为自动获取 address *静态IP地址* # 服务器静态IP地址 netmask 255.255.255.0 # 子网掩码 gateway *网关* # 网关 dns-nameservers 114.114.114.114 # DNS服务器
上述代码中星号包围的地方请自行咨询实验室负责人
重启网络服务
1
/etc/init.d/networking restart
接下来为了解决我天朝众所周知的网络原因,修改 apt 源地址
1
vi /etc/apt/sources.list
修改为(阿里云的源):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
然后更新源
1
apt-get update
0x03 安装 docker
使用以下命令安装 docker:
1 2
apt-get install docker.io service docker restart # 害怕没自动启动服务,所以装完总要重启一遍服务,我有强迫症