1、 cd /etc/sysconfig/network-scripts切换到网络配置目录下。
Centos7配置静态IP
2、ls 找到网卡。
Centos7配置静态IP

3、vi ifcfg-ens33 修改对应网卡配置文件。
Centos7配置静态IP
将文件红色方框内信息修改如下。GATEWAY可以用过route -n 命令查看。
Centos7配置静态IP

4、vi /etc/resolv.conf 修改DNS。
Centos7配置静态IP
在文件内添加nameserver 114.114.114.114 。
5、service network restart 重启网络服务。
Centos7配置静态IP
6、ping 测试网络联通状态
Centos7配置静态IP

相关文章:

  • 2021-06-24
  • 2021-11-19
猜你喜欢
  • 2021-05-13
  • 2021-08-14
  • 2021-10-08
  • 2021-12-09
相关资源
相似解决方案