1、设置静态IP地址、网关
nano /etc/network/interfaces #编辑网卡配置文件
注:auto eth0 #开机自动连接网络
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip address 192.168.21.166 #设置ip地址 netmask 255.255.255.0 #设置子网掩码 gateway 192.168.21.2 #设置网关
启动ip网卡: /etc/init.d/networking restart
设置DNS步骤
nano /etc/resolv.conf #编辑配置文件
nameserver 202.96.209.133
注: nameserver:设置dns第一个为首选,第二个备用dns
service networking restart # 重启网络
加群入久伴博客官方微信群
加入久伴官方微信群有啥优势?
1.文章内部资源由于时间久远可能失效,加群,群内可以第一时间反馈
2.网站中教程不一定适用任何人,加群可以第一时间咨询并解决您得疑惑
3.你游荡于互联网,也需要群体,加群一起互动交流,畅所欲言
扫描下方二维码即可加入交流讨论
