monitor@openstack-computer:~$ sudo view /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
monitor@openstack-computer:~$ sudo service ssh restart 设置root的密码
monitor@openstack-computer:~$ sudo su - root
root@openstack-computer:~# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully 2.配置ip和dns
root@openstack-computer:~# view /etc/network/interfaces
# 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
auto ens160
iface ens160 inet static
address 172.27.34.38
netmask 255.255.255.0
network 172.27.34.0
broadcast 172.27.34.255
gateway 172.27.34.1
dns-nameserver 218.104.111.122
dns-search foo.org.bar.co
root@openstack-computer:~# service networking restart dns-nameserver请根据实际情况填写,配置后重启网络服务 3.配置apt源
root@openstack-computer:~# view /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
root@openstack-computer:~# apt update 将源设置为阿里源并更新 4.修改时区
查看当前时区
root@openstack-computer:~# date -R
Thu, 29 Nov 2018 03:53:49 -0500 修改时区
root@openstack-computer:~# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 验证
root@openstack-computer:~# date -R
Thu, 29 Nov 2018 16:58:15 +0800 时区修改完成
至此完成Ubuntu16.04.5操作系统安装