本篇使用VMware安装CentOS 7 主要是给新手看的,很详细,但不免有些啰嗦,会安装的请自行跳过。

1、下载并安装虚拟机,自行百度吧,有很多虚拟机可以下载,我这里使用的是VMware 12。

2、下载CentOS 7,也自行百度吧,也有很多下载地址,我选用的是阿里的镜像站,下载也很快,下载的是一个ISO文件,我这里使用的是CentOS-7-x86_64-DVD-1908.iso。

3、在安装好的VMware 找到 vmware.exe ,双击打开

centos搭建nps服务 centos搭建nat服务器_VMware

 

4、下面为打开后的页面,点击文件 “新建虚拟机”。

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_02

 

 

5、选择 自定义 高级 ,并点击下一步

centos搭建nps服务 centos搭建nat服务器_CentOS_03

 

 

6、默认下一步

centos搭建nps服务 centos搭建nat服务器_创建用户_04

 

 

7、选择要安装的ISO文件,点击下一步

 

centos搭建nps服务 centos搭建nat服务器_CentOS_05

 

 

8、编辑虚拟机的名称,选择虚拟机安装位置。

centos搭建nps服务 centos搭建nat服务器_VMware_06

 

 

9、选择处理器的数量。

centos搭建nps服务 centos搭建nat服务器_创建用户_07

 

 

10、选择虚拟内存的大小,这里选择推荐就可以。

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_08

 

 

11、选择网络连接的类型,这里选择 NAT 型。

centos搭建nps服务 centos搭建nat服务器_创建用户_09

 

 

12、选择 I/O 控制器类型,这里选择推荐即可。

centos搭建nps服务 centos搭建nat服务器_CentOS_10

 

 

13、选择磁盘类型,同样选择默认推荐即可。

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_11

 

 

14、创建虚拟磁盘,默认即可。

centos搭建nps服务 centos搭建nat服务器_CentOS_12

 

 

15、设置磁盘大小和磁盘分配类型,自己可以调整。

centos搭建nps服务 centos搭建nat服务器_VMware_13

 

 

16、虚拟磁盘的名称和存储地址,默认即可

centos搭建nps服务 centos搭建nat服务器_CentOS_14

 

 

17、完成创建虚拟机。点击完成,开始安装。

centos搭建nps服务 centos搭建nat服务器_VMware_15

 

 

18、使用键盘选择 第一个 Install CentOS 7 ,点击回车进行安装。

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_16

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_17

 

 

19、选择安装语言,简体中文

 

 

20、设置系统主要信息,大多数都需要设置。

centos搭建nps服务 centos搭建nat服务器_VMware_18

 

 

 

centos搭建nps服务 centos搭建nat服务器_VMware_19

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_20

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_21

 

21、设置网络,这里重点说一下,设置完成之后就不用再进系统进行设置了。手动设置IP 、网关、子网掩码、DNS,这里对应的设置同样在后面对应了虚拟机的网络设置。

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_22

 

 

centos搭建nps服务 centos搭建nat服务器_CentOS_23

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_24

 

 

centos搭建nps服务 centos搭建nat服务器_VMware_25

 

22、在虚拟网络编辑器中,也需要设置连接为 NAT模式,同时设置网关和子网掩码,因为我设定的是手动IP,所以不需要选择本地DHCP。

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_26

 

 

centos搭建nps服务 centos搭建nat服务器_VMware_27

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_28

 

23、设置完成网络之后,可以设置ROOT密码,ROOT密码过于简单的情况下,点击两次之后就可以设置,这里我们先不创建用户,后面重启后,配置系统时候还可以设置用户。

 

centos搭建nps服务 centos搭建nat服务器_VMware_29

 

 

centos搭建nps服务 centos搭建nat服务器_创建用户_30

 

 24、重启后设置许可证、网络主机和创建用户。

centos搭建nps服务 centos搭建nat服务器_CentOS_31

 

 

centos搭建nps服务 centos搭建nat服务器_CentOS_32

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_33

 

 这里开启以太网之后,可以显示之前设置的网络信息。

centos搭建nps服务 centos搭建nat服务器_CentOS_34

 

 创建用户,并设置用户密码,这里密码不可以设置简单密码。

centos搭建nps服务 centos搭建nat服务器_VMware_35

 

 

centos搭建nps服务 centos搭建nat服务器_创建用户_36

 

 25、设置完成之后,通过用户进行登录。

centos搭建nps服务 centos搭建nat服务器_创建用户_37

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_38

 

 系统自动安装了FireFox浏览器,在/usr/share/applications 目录下可以找到,双击打开之后可以联网。前提是网络设置要准确。

centos搭建nps服务 centos搭建nat服务器_CentOS_39

 

 

centos搭建nps服务 centos搭建nat服务器_创建用户_40

 

 这里我展示了系统的 ifcfg-ens33 网络配置信息,如果前面没有设置对的,还可以在网络配置中进行修改。

centos搭建nps服务 centos搭建nat服务器_创建用户_41

 

(网页可以打开,说明网络已经链接成功,但Ping www.baidu.com的时候却怎么也ping不通)真是不知道是什么问题,有哪位知道的麻烦给指导一下。

centos搭建nps服务 centos搭建nat服务器_创建用户_42

 

 yum 命令已经可以使用,网络正常。

centos搭建nps服务 centos搭建nat服务器_创建用户_43

 

 

centos搭建nps服务 centos搭建nat服务器_centos搭建nps服务_44

 

 26、下面展示 VMware Network Adapter VMnet8 和 本地连接的 设置详细信息,本地连接需要共享给VMnet8 网络,这样才能让虚拟机联网。

centos搭建nps服务 centos搭建nat服务器_VMware_45

 

 

centos搭建nps服务 centos搭建nat服务器_CentOS_46

 

 至此,CentOS7 的安装和网络配置已经完成,有问题的留言进行交流吧。