1.配置IP和DNS(修改/etc/network/interfaces文件)
autolo
ifaceloinetloopback
#description:staticip
autoeth0
ifaceeth0inetstatic
address192.168.1.119
netmask255.255.255.0
gateway192.168.1.1
dns-nameservers192.168.1.11
#description:dynamicip
#autolo
#ifaceloinetloopback
#autoeth0
#ifaceeth0inetdhcp
#dns-nameservers192.168.1.11
2.也可以在/etc/resolv.conf中配饰dns
nameserver202.106.195.68
nameserver202.106.46.151
3.使配置生效:/etc/init.d/networking/restart
4.修改主机名称
在./etc/hostname的文件中可以修改主机名称,在重新启动后,可生效。
Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络Debian 配置网络
阅读(969) | 评论(0) | 转发(0) |