VMware下,保姆级安装Centos7

  • 1、VMware新建虚拟机
  • 2、CentOS7的安装
  • 3、CentOS7系统配置


1、VMware新建虚拟机

  1. 在VMware中新建虚拟机
  2. centos7最小化安装vim centos7最小化安装教程_linux

  3. 选择自定义,下一步
  4. centos7最小化安装vim centos7最小化安装教程_服务器_02

  5. 不用改变,下一步
  6. centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_03

  7. 选择稍后安装操作系统,下一步。
  8. centos7最小化安装vim centos7最小化安装教程_centos_04

  9. 选择客户机的操作系统及版本信息,下一步。
  10. centos7最小化安装vim centos7最小化安装教程_服务器_05

  11. 设置好名称和路径,下一步。
  12. centos7最小化安装vim centos7最小化安装教程_linux_06

  13. 根据配置情况,自己决定分配多少资源。
  14. centos7最小化安装vim centos7最小化安装教程_centos_07

    centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_08

  15. 网络类型选择NAT!!!
  16. centos7最小化安装vim centos7最小化安装教程_服务器_09

  17. 下一步至选择磁盘,选择创建新虚拟磁盘。
  18. centos7最小化安装vim centos7最小化安装教程_服务器_10

  19. 自行决定磁盘分配空间。
  20. centos7最小化安装vim centos7最小化安装教程_centos_11

  21. 下一步到此界面,选择自定义硬件。
  22. centos7最小化安装vim centos7最小化安装教程_windows_12

  23. 移除不需要的设备。
  24. centos7最小化安装vim centos7最小化安装教程_windows_13

  25. 添加镜像文件。
  26. centos7最小化安装vim centos7最小化安装教程_服务器_14

  27. 点击完成安装。

2、CentOS7的安装

  1. 点击运行刚刚设置好的虚拟机。
  2. centos7最小化安装vim centos7最小化安装教程_linux_15

  3. 选择第一项启动。
  4. centos7最小化安装vim centos7最小化安装教程_centos_16

  5. 等待进入安装界面,Continue
  6. centos7最小化安装vim centos7最小化安装教程_centos_17

  7. 时区设置。
  8. centos7最小化安装vim centos7最小化安装教程_centos_18


  9. 硬盘选择。
  10. centos7最小化安装vim centos7最小化安装教程_centos_19

  11. 勾选硬盘,Done
  12. centos7最小化安装vim centos7最小化安装教程_centos_20

  13. 开启网卡。
  14. centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_21

  15. 开启网卡,Done
  16. centos7最小化安装vim centos7最小化安装教程_linux_22

  17. 开始安装。
  18. centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_23

  19. 设置root账号
  20. centos7最小化安装vim centos7最小化安装教程_服务器_24


  21. centos7最小化安装vim centos7最小化安装教程_windows_25

  22. 设置普通用户。
  23. centos7最小化安装vim centos7最小化安装教程_windows_26

  24. 安装完成重启
  25. centos7最小化安装vim centos7最小化安装教程_linux_27

3、CentOS7系统配置

  1. 使用root账户登录
  2. centos7最小化安装vim centos7最小化安装教程_服务器_28

  3. 查看&修改主机名。
#查看
hostname
#修改						 |——>这里设置成你想要的名字
hostnamectl set-hostname wan

centos7最小化安装vim centos7最小化安装教程_linux_29

  1. 关闭&禁用防火墙。
#查看防火墙状态
systemctl status firewalld
#关闭防火墙
systemctl stop firewalld
#禁用防火墙
systemctl disable firewalld

centos7最小化安装vim centos7最小化安装教程_服务器_30

  1. 关闭&禁用网络管理服务
#查看用网络管理服务
systemctl status NetworkManager
#关闭网络管理服务
systemctl stop NetworkManager
##禁用网络管理服务
systemctl disable NetworkManager

centos7最小化安装vim centos7最小化安装教程_linux_31

  1. 配置network。
    进入配置文件
vi /etc/sysconfig/network-scripts/ifcfg-ens33

centos7最小化安装vim centos7最小化安装教程_linux_32

修改配置文件。

centos7最小化安装vim centos7最小化安装教程_服务器_33

使用命令,替换掉双引号

:1,$s/\"//g

centos7最小化安装vim centos7最小化安装教程_linux_34


centos7最小化安装vim centos7最小化安装教程_服务器_35

按下I键,方向键移动,修改配置文件。

修改1条添加5条数据。

centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_36

IPADDR=自己的
NETMASK=255.255.255.0
GATEWAY=自己的
DNS1=8.8.8.8
DNS2=114.114.114.114

IP和网关的查看

centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_37

网关地址:

centos7最小化安装vim centos7最小化安装教程_服务器_38

IP地址段,选择在地址范围内的

centos7最小化安装vim centos7最小化安装教程_linux_39

#################################################

修改好后。按下ESC切换回命令行,使用shift+按两下Z保存

#################################################

  1. 重启网络服务。
systemctl restart network

centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_40

  1. 测试网络连通性。
    PING www.baidu.com
  2. centos7最小化安装vim centos7最小化安装教程_服务器_41

  3. PING本地主机IP,本地主机IP使用win+R->cmd->ipconfig查看
  4. centos7最小化安装vim centos7最小化安装教程_centos7最小化安装vim_42

  5. 本地PING虚拟机。
  6. centos7最小化安装vim centos7最小化安装教程_centos_43

  7. 都可以PING通,则说明配置成功!