配置网络
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
service network restart
ifconfig
BOOTPROTO=static
IPADDR=192.168.0.X
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
service network restart
(7)配置hosts
vi /etc/hosts
配置本机的hostname到ip地址的映射
issues:
1. 关闭windows 的防火墙
2. 增加dns的解析
[root@localhost ~]# vi /etc/resolv.conf
里面文件为空,则新添加一条DNS到该文件中:
search localdomain
nameserver 119.29.29.29
网友评论