Ubuntu 16.04.1 Server 64bit 系统安装后的网络配置(Vmware Workstation 12.5 & Windows 10 X64 环境)

版权声明:本文为博主原创文章,未经博主允许可以随意转载。 https://blog.csdn.net/cfy_openvms/article/details/53045408
Ubuntu 16.04.1 Server 64bit 系统安装后的网络配置(Vmware Workstation 12.5 & Windows 10 X64 环境)

周末有点时间,想看看Docker相关的安装和环境搭建。在虚拟机上安装了Ubuntu 16.04.1 Server 64bit版本。

第一步是安装配置SSH,用于在Windows中使用Putty登录:

sudo apt-get install openssh-server

sudo service ssh restart

//*

开始按照网上的教程,使用“sudo vi /etc/ssh/sshd_config”命令修改“sshd_config”文件中的

“PermitRootLogin prohibit-password”为“PermitRootLogin yes”

但启动ssh服务时,报“code=255”错误。折腾很久也没解决。

后来干脆不改了,不用root账户登录就是了。

*//


然后是将网卡改为静态地址(因为是用作服务器测试,总不能用DHCP啊):

vi /etc/network/interfaces

扫描二维码关注公众号,回复: 3282715 查看本文章

auto ens33

iface ens33 inet static

address 192.168.1.201

netmask 255.255.255.0

gateway 192.168.1.1

dns-nameservers 114.114.114.114 8.8.4.4 219.150.32.132

//*

不知道什么原因,这一版的Ubuntu中的“/etc/resolv.conf”文件不能写入DNS Server地址,网上的文章都不太给力,后来还是去官方的文档网站才解决了问题,就是在“/etc/network/interfaces”文件中写入DNS Server地址,就是这一句:

dns-nameservers 114.114.114.114 8.8.4.4 219.150.32.132

*//


(参考链接:https://help.ubuntu.com/lts/serverguide/network-configuration.html)

猜你喜欢

转载自blog.csdn.net/cfy_openvms/article/details/53045408