方法
修改dhcpcd.conf
操作
使用SSH登录到服务器
root@raspbian:~# vi /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.8.4/24
static routers=192.168.8.1
static domain_name_servers=202.102.152.3 114.114.114.114
保存退出后,重启
root@raspbian:~# reboot