Centos7 配置IP与域名映射

301 阅读1分钟

修改 /etc/hosts 配置 IP 和域名映射关系,命令如下:

  $ vim /etc/hosts

添加 IP 与域名对应关系,图示如下:

修改完成之后,重启网络生效,命令如下:

  $ /etc/init.d/network restart

 到此 Centos7 配置IP与域名映射介绍完成。