配置DNS 和网关
# ifconfig hme0 unplumb --停止网卡
# ifconfig hme0 plumb --起用网卡
# ifconfig hme0 inet 192.168.1.1 netmask 255.255.255.0 up --添加ip、子网掩码
# vi /etc/defaultrouter ---添加网关
# echo "myhost" > /etc/nodename --- 添加主机名
#echo "domain domain.com" > /etc/resolv.conf ---设置域名,可免
#echo "nameserver 218.218.218.218" >> /etc/resolv.conf ---DNS的IP
# vi /etc/nsswitch.conf 更改 hosts:file dns ----设置查询方式
赞 (0)