虚拟机-linux

文章目录

  • 网络不通

网络不通

Ifconfig enp0s3 192.168.0.101【与网关的前三位相同即可】

vim /etc/sysconfig/network-scripts/ifcfg-enp0s3

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp0s3"
UUID="4cac1b28-af92-4a39-ba95-0fbe548abe7d"
DEVICE="enp0s3"
ONBOOT="yes"

vim /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.30.253.112 github.com
151.101.88.249 github.global.ssl.fastly.net

vim /etc/resolv.conf

; generated by /usr/sbin/dhclient-script
nameserver 221.13.30.242
nameserver 221.13.28.234

service network restart
【备注:多虚拟机最好关闭一个,虚拟机关闭异常,最好重启虚拟机。source 文件】

你可能感兴趣的:(分布式)