第一步:centos虚拟机------设置------网络配置器

选择NAT模式

centos7 设置静态ip

第二步:centos虚拟机------虚拟网络编辑器

centos7 设置静态ip                   centos7 设置静态ip

第三步:虚拟机设置

1、ifconfig,查看当前网卡名称为eth0

centos7 设置静态ip

2、配置环境时,切换为系统用户root,$ su root

命令 cd /etc/sysconfig/networtk-scripts/

centos7 设置静态ip

3、命令 vim /ifcfg-eth0  进行网络环境配置

centos7 设置静态ip

4、配置后通过 esc+:wq退出。

通过命令  # service network restart 重启网络,网络配置结束。

通过命令 # ping www.baidu.com 检测,如下图所示。

Ctrl+C可强制停止Ping

 

centos7 设置静态ip

 

相关文章:

  • 2021-07-30
  • 2021-08-20
  • 2021-12-30
  • 2021-07-31
  • 2021-11-09
猜你喜欢
  • 2021-07-17
  • 2021-06-27
  • 2021-10-22
  • 2021-06-01
  • 2021-11-29
相关资源
相似解决方案