杏彩平台搭建与Debian

1:在win这边获取本机的IP地址,子网掩码,默认网关和DNS服务器信息。记录好。[企俄:2152876294] 网址diguaym.com

2:到Debian下,

 a):给网络配置文件做备份

 cp  /etc/network/interfaces  /etc/network/interfaces

 设置 eth0 网卡信息 

 vim   /etc/network/interfaces

 # The loopback network interface

 auto lo

 auto eth0     #开机自动连接网络

 iface lo inet loopback

 allow-hotplug eth0

 iface eth0 inet static     #static表示使用固定ip,dhcp表述使用动态ip

 address 192.168.0.211       #设置ip地址

 netmask 255.255.255.0      #设置子网掩码

 gateway 192.168.0.1      #设置网关

注:写进配置文件中的时候需要把 # 的注释信息删除掉,这里只是做解释用。

b): 编辑/etc/resolv.conf配置dns,注意备份文件

  # Generated by NetworkManager

nameserver 210.22.84.3 #设置首选dns

nameserver 210.22.70.3 #设置备用dns

c): 最后重启网络

猜你喜欢

转载自blog.51cto.com/13930862/2161864