1.IP地址设置
root@server:~#cd /etc/network
root@server:/etc/network#cp interfaces interfaces_bak
vi interfaces
#auto ens33
#Iface ens33 inet dhcp
auto ens33
iface ens33 inet static
address 192.168.137.137
netmask 255.255.255.0
gateway 192.168.137.1
2.允许root远程登陆
root@server:~#cd /etc/ssh
root@server:~#cp sshd_config sshd_config_bak
root@server:~#vi sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes
3.修改更新源
root@server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
root@server:~#cd /etc/apt
root@server:/etc/apt#sudo mv sources.list sources.list_bak
root@server:/etc/apt#sudo vi sources.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main multiverse restricted universe
4.修改DNS
root@server:~#cd /etc
root@server:/etc#mv resolv.conf resolv.conf_bak
root@server:/etc#vi resolv.conf
nameserver 192.168.137.1