VMware installation, configuration and configuration under Linux CentOS7 network environment (especially the latest version of the whole)

This article will elaborate on VMware installation, configuration CentOS7 and configure the network environment under linux.

If you do not know where, we welcome private letter to me, this is my own personal practice recently to explore out, really, really full up!

A, VMware download and install

1. I downloaded the latest version of the current VMware15.5.1, Here is the download link:

https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html

2. The normal installation on it, and, after installation To enter license number, a lot of this number online, we will be able to find a just, add permission, you can see the following information.

Second, the configuration CentOS7

1. First, open the official website to download the appropriate version of CentOS, I was under the latest version of CentOS7.4

http://vault.centos.org/

Because the file is too large, inconvenient to download, you can download the BT seed file ( select CentOS-7-x86_64-DVD- 1708.torrent download ), then the seed file in the Thunder download.

2.CentOS7.4 installation

(1) Click to create a new virtual machine

(2) selection as shown: Click Typical (recommended), then click Next

                                

(3) Select FIG: Tap later install the operating system, then the next step

                                

(4) Select FIG: Tap Linux, and selects the corresponding version, where I selected CentOS7 64 bits. Then the next step

                                

(5) Choose an installation location, here suggest that you put a disk other than the C drive, because the disk is the system disk on your Linux system, then the next step

                                

(6) FIG selection: a virtual machine disk storage as a single file, then the next step

                               

(7) Select Figure: Click Finish

                                

(8) Select Figure: Edit virtual machine settings

(9) Select Figure: CD / DVD (IDE) automatically detected - file CentOS7.4 use ISO image files, and then find your download

(10) FIG selection: The network adapter - Custom: a particular virtual network --VMnet8 (NAT mode)

(11) FIG selection: USB Controller - removed

(12)选择如图:声卡——移除

(13)选择如图:打印机——移除,然后点击确定。

(14)然后点击开启虚拟机

(15)开启虚拟机,鼠标移入到虚拟机中,并按下“↑”键,选择Install CentOS 7,最后按下“Enter 键”,鼠标放在虚拟机中是看不见光标的。

                          

再次按Enter键,然后就是等待安装。    

                        

(16)在这里,接下来的安装过程我选择了中文,点击继续

         

(17)首先,先配置时间,如图所示

         

设置完成后,点“完成”返回上一页

         

(18)点击“软件选择”

         

勾选如下图所示,然后点击“完成”返回

        

(19)然后点击“安装位置”

         

点击“我要配置分区”,点击“完成”,跳转另一个页面

         

(20)更改模式,选择“标准分区”,然后点击“+”添加分区

        

选择"/boot" 大小选择300M,然后点击“添加挂载点”

          

再次点击“+”,添加“swap”,大小为512M,然后点击“添加挂载点”

          

再次点击“+”,增加根分区,不填写大小,即默认剩余的空间都给根分区,然后点击“添加挂载点”,然后点击“完成”返回

         

(21)然后点击“接受更改”

        

(22)然后点击右下角的“开始安装”

      

(23)安装过程中,设置管理员密码,点击“ROOT密码”

     

设置完成后,点击“完成”返回,等待安装成功。

      

      

安装完成后,点击重启,准备配置网络环境

      

三、CentOS7.4的网络配置

1.首先,先检查一下本机的网络配置,进入cmd,输入ifconfig即可查看。

记住windows配置下的以太网适配器VMware Network Adapter VMnet8的相关属性:

            

2.然后,看一下虚拟机的设置。点击:编辑->虚拟机网络编辑器下VMnet8中NAT设置里的网关和DHCP设置里的起始/结束ip地址,这里尤其要记住ip地址范围!

          

                      

                                

3.查看一下ip,用ifconfig命令可以查看到虚拟机的ip地址,网关等信息,ifcfg开头的文件有2个,如图所示,一个是ifcfg-lo,另一个是ifcfg-ens32(该文件即为网关配置文件,我们要对 该文件进行修改)

                        

4.使用命令:cd /etc/sysconfig/network-scripts/ (cd后一定要有一个空格),该命令是进入网络配置文件目录。然后编辑配置文件:vi ifcfg-ens32(我这个是ens32,不同的电脑可能不同,所以才要先用ifconfig寻找)

要将文件中内容改成如下所示即可:

                                            

其中:

IPADDR=192.168.219.130(#此处的ip地址要在之前看到起始/结束ip地址范围内) 

GATEWAY=192.168.219.2(#网关按之前看的配置配)

NETMASK=255.255.255.0

BOOTPROTO=static(这个也可以,或者等于none)

5.重启网络 service network restart后就能ping通外网了!我们可以试试ping 8.8.8.8或者

ping www.baidu.com,如果成功,则如下图所示:

       

 

发布了32 篇原创文章 · 获赞 17 · 访问量 4901

Guess you like

Origin blog.csdn.net/mango_ZZY/article/details/103997782