文章目录

  • 在VMware中创建虚拟机
  • 创建虚拟机,安装centons 7
  • 难点:网络配置

在VMware中创建虚拟机

创建虚拟机,安装centons 7

本文以centos 7 64位为例,各位需要下载centos 7的iso文件

下载地址:https://mirrors.aliyun.com/centos/7/isos/x86_64/

阿里云镜像下载还是很快的!!!

虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络


虚拟机centos检查网络 centos 虚拟机联网_linux_02


虚拟机centos检查网络 centos 虚拟机联网_运维_03


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_04


虚拟机centos检查网络 centos 虚拟机联网_运维_05


虚拟机centos检查网络 centos 虚拟机联网_IPV6_06


虚拟机centos检查网络 centos 虚拟机联网_运维_07


虚拟机centos检查网络 centos 虚拟机联网_centos_08


虚拟机centos检查网络 centos 虚拟机联网_IPV6_09


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_10


虚拟机centos检查网络 centos 虚拟机联网_IPV6_11


虚拟机centos检查网络 centos 虚拟机联网_linux_12


虚拟机centos检查网络 centos 虚拟机联网_linux_13


虚拟机centos检查网络 centos 虚拟机联网_linux_14


虚拟机centos检查网络 centos 虚拟机联网_linux_15


确认完以后点击完成

虚拟机centos检查网络 centos 虚拟机联网_centos_16


虚拟机centos检查网络 centos 虚拟机联网_linux_17

虚拟机centos检查网络 centos 虚拟机联网_运维_18



虚拟机centos检查网络 centos 虚拟机联网_linux_19



虚拟机centos检查网络 centos 虚拟机联网_IPV6_20


虚拟机centos检查网络 centos 虚拟机联网_linux_21

虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_22


虚拟机centos检查网络 centos 虚拟机联网_IPV6_23


点击完成,进入分区配置!

虚拟机centos检查网络 centos 虚拟机联网_IPV6_24


虚拟机centos检查网络 centos 虚拟机联网_linux_25


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_26


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_27


虚拟机centos检查网络 centos 虚拟机联网_centos_28


虚拟机centos检查网络 centos 虚拟机联网_linux_29


虚拟机centos检查网络 centos 虚拟机联网_centos_30


虚拟机centos检查网络 centos 虚拟机联网_IPV6_31


虚拟机centos检查网络 centos 虚拟机联网_IPV6_32


虚拟机centos检查网络 centos 虚拟机联网_linux_33


虚拟机centos检查网络 centos 虚拟机联网_IPV6_34


点击开始安装

虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_35


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_36


等待安装

虚拟机centos检查网络 centos 虚拟机联网_运维_37


虚拟机centos检查网络 centos 虚拟机联网_centos_38


虚拟机centos检查网络 centos 虚拟机联网_linux_39


虚拟机centos检查网络 centos 虚拟机联网_运维_40


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_41



虚拟机centos检查网络 centos 虚拟机联网_linux_42

虚拟机centos检查网络 centos 虚拟机联网_运维_43


虚拟机centos检查网络 centos 虚拟机联网_linux_44


这里的密码,以前不需要设置这么难,但也只是用户密码,基本使用都是管理员root,随意随便设一下。

虚拟机centos检查网络 centos 虚拟机联网_linux_45


虚拟机centos检查网络 centos 虚拟机联网_IPV6_46


虚拟机centos检查网络 centos 虚拟机联网_IPV6_47


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_48


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_49


虚拟机centos检查网络 centos 虚拟机联网_IPV6_50


开始配置虚拟机网络

难点:网络配置

虚拟机centos检查网络 centos 虚拟机联网_linux_51


虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_52

虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_53


这个子网IP只需要将默认值的第三位改成10即可,比如我的:192.168.10.0
其他地方不需要改

虚拟机centos检查网络 centos 虚拟机联网_IPV6_54


虚拟机centos检查网络 centos 虚拟机联网_linux_55


虚拟机centos检查网络 centos 虚拟机联网_IPV6_56

虚拟机centos检查网络 centos 虚拟机联网_运维_57

这里大家按照我的将自己IP子网前三个值填在10和254前面就好了

一定要点击保存!!!

进入虚拟机

虚拟机centos检查网络 centos 虚拟机联网_运维_58


在终端中输入命令

ifconfig
注意linux右键点粘贴,或者手打(推荐)

虚拟机centos检查网络 centos 虚拟机联网_虚拟机centos检查网络_59

cd /etc/sysconfig/network-scripts      
输入这个命令进入该文件
ls
遍历出该文件夹下的文件

虚拟机centos检查网络 centos 虚拟机联网_linux_60

vim ifcfg-ens33
进入编辑该文件,如果该文件下是空白,进错了  ESC    +   :q!

虚拟机centos检查网络 centos 虚拟机联网_centos_61


配置文件改为你的ip即可,在删除时,记得将自己的UUID复制一下。

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO="static"
IPADDR=  #本机地址  在虚拟机网络配置处我们填的10到254 前三位相同,最后一位在10到254选一个
GATEWAY= #默认网关  在虚拟网络配置处我们填的3   前三位与上面相同,最后一位直接填3
NETMASK=255.255.255.0 #子网掩码
DNS1= # 配置的网关IP 和默认网关的一样
DNS2=8.8.8.8
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=ens33        # 如果你的是ens33就不用管,不是记得改一下
UUID=                    # 此处可以填自己的UUID
DEVICE=ens33
ONBOOT=yes      # 如果你的是ens33就不用管,不是记得改一下

配置完以后,我们重启一下网络服务,然后ping一下外网试试

systemctl restart network

ping www.baidu.com

虚拟机centos检查网络 centos 虚拟机联网_linux_62


虚拟机的配置完成!!!

如果遇到问题,在评论区里打出,我看见会第一时间回复的!