进行此操作时需要将Linux 中的防火墙关闭...........
下面操作出现错误时internet连接共享访问被启用时出现错误解决方法
虚拟网络编辑器设置,其相当于是一个路由器
QQ截图20170412162612.png QQ截图20170503210908.png NAT设置.pngcentos7 网络配置如下
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=2255047d-19fb-459b-b3ea-abc57c9772d9
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.137.110
NETMASK=255.255.255.0
GATEWAY=192.168.137.1
DNS1=8.8.8.8
NDS2=192.168.137.1
QQ截图20170412162806.png
QQ截图20170412162948.png
QQ截图20170412163008.png
至此虚拟机上的虚拟系统网络的配置都已经OK了
桥接模式的配置
image.png进入cd /etc/sysconfig/network-scripts/
目录修改ifcfg-eth0
如下,其他三个节点均作出修改,并service network restart
重启网卡成功后,修改三个节点的etc下hosts目录。具体ip要根据自己电脑所属网段进行相应修改即可,填写固定IP时要先ping一下要设置的ip地址小心地址冲突。
yum install 出现无法解析主机地址的错误,需要修改一下DNS的配置
[root@cdh1 etc]# yum install lrzsz
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
http://mirrors.163.com/centos/7.4.1708/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.163.com; Unknown error"
解决办法
[root@cdh2 ~]# vim /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.137.1
网友评论