时间:2023-06-25 10:06:01 | 来源:网站运营
时间:2023-06-25 10:06:01 来源:网站运营
VMWare CentOS虚拟机的安装:1.下载并安装VMWare Workstationip a
显示:1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:7b:7d:e9 brd ff:ff:ff:ff:ff:ff inet 192.168.43.113/24 brd 192.168.43.255 scope global noprefixroute dynamic ens33 valid_lft 3310sec preferred_lft 3310sec inet6 fe80::5711:55f2:bf3e:5ff8/64 scope link noprefixroute valid_lft forever preferred_lft forever3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:7b:7d:f3 brd ff:ff:ff:ff:ff:ff inet 192.168.183.236/24 brd 192.168.183.255 scope global noprefixroute ens37 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe7b:7df3/64 scope link valid_lft forever preferred_lft forever
其中:ens33是桥接模式虚拟网卡,ens37是仅主机模式虚拟网卡。不同的虚拟机操作系统和版本可能不同。cd /etc/sysconfig/network-scriptsls
显示:ifcfg-ens33 、ifcfg-ens37
其中ifcfg-ens37 可能不存在,如果不存在则直接vi添加TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=dhcpDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens33UUID=5e5be9aa-52c3-4e4d-bf23-ec0f00a087d7DEVICE=ens33ONBOOT=yes
ifcfg-ens37修改为静态IP地址,修改如下:OXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticIPADDR=192.168.183.236NETMASK=255.255.255.0HWADDR=00:0c:29:7b:7d:f3DEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=noIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens37DEVICE=ens37ONBOOT=yes
修改后使其生效:service network restart
或重启虚拟机使其生效。关键词:安装,虚拟