#配置文件地址:/etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 #添加对应关系 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 xxx.xx.xxx.xx www.mycentos6.com # 然后就可以在本机用 www.mycentos6.com 地址访问到xxx.xx.xxx.xx机器