|
发表于 2020-9-22 09:15:16
|
显示全部楼层
首先:修改root/etc/network/inte**ces文件,修改内容如下:
# Wired or wireless inte**ces
auto eth0
iface eth0 inet static
address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.2.1
broadcast 192.168.2.255
然后,设置静态IP为192.168.2.100
在/etc/rc.local文件里加入/etc/init.d/networking restart
修改后内容如下:
echo 30000 >  /proc/sys/vm/min_free_kbytes
/etc/init.d/networking restart
exit 0
重新启动后,静态IP设置完成。 |
|