当前位置:   article > 正文

linux通过修改/etc/hosts文件 添加IP地址与域名的映射_linux 域名映射 host能代码修改嘛

linux 域名映射 host能代码修改嘛

修改/etc/hosts文件指令

sudo vim /etc/hosts

I插入,插入完成后按ESC退出插入,输入:wq!保存退出,如下图所示

  1. 192.168.171.xxx orderer0.example.com
  2. 192.168.171.xxx orderer1.example.com
  3. 192.168.171.xxx orderer2.example.com
  4. 192.168.171.xxx peer0.org1.example.com
  5. 192.168.171.xxx peer1.org1.example.com
  6. 192.168.171.xxx peer0.org2.example.com

 

 重启一下网络
Ubuntu

sudo /etc/init.d/networking restart

CentOS: 

sudo /etc/init.d/network restart

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/211238
推荐阅读
相关标签
  

闽ICP备14008679号