admin管理员组

文章数量:1529452

准备:1)setenforce 0 #修改当前运行模式

           2)systemctl  stop   firewalld  #关闭防火墙

1.为虚拟机配置IP地址

步骤:三种设置永久IP方式用其中一种;后续更新其他俩种

1)# vim   /etc/default/grub      #grub内核引导程序  进入配置文件修

2:配置文件添加:net.ifnames=0 biosdevname=0

          

3) grub2-mkconfig  -o  /boot/grub2/grub.cfg  #重新生成网卡命名的规则

4) reboot         #必须重启操作系统才能完全生效4

5)ifconfig   |   head   -2

6)nmcli connection  add  type  ethernet      ifname  eth0    con-name   eth0

解析: nmcli connection 添加   类型   以太网设备   网卡设备名为eth0    nmcli命令的命名为eth0(重新命名可以是eth1此位置)

7)nmcli connection modify  eth0    ipv4.method    manual  ipv4.addresses   192.168.2.5/24       ipv4.gateway   192.168.2.200        connection.autoconnect    yes

注释:IP为192.168.2.5/24  ; 网关192.168.2.200

8)nmcli connection up eth0 #激活

9) nmcli   connection   show  查看

如下:

10)查看IP地址# ip address show( ip a s)

2:配置VMware

1)

2)

 3)

以上边可以连接外网

以下为MobaXterm  与 虚拟机SSH 远程连接测试

3.配置物理主机

1)

 

2)

4. 打开MobaXterm 软件

1)

2)### 输入root 密码进入   ping www.baidu

3) VMware 虚拟机火狐浏览器 访问 

 

vmware 虚拟机上外网 配置好需要: systemctl restart network

报错信息为:Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

本文标签: 虚拟机物理系统VMware