Browse Source

Update README.md

master
yuan1am 6 years ago
committed by GitHub
parent
commit
abec6dfef4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      README.md

24
README.md

@ -5,14 +5,15 @@
## 系统:Debian 10.3 (其他任何Linux系统都可以,或者更好) ## 系统:Debian 10.3 (其他任何Linux系统都可以,或者更好)
官网下载的ISO镜像,Proxmox新建虚拟机安装,安装过程就不累述了,网上大把教程。新建一个普通用户,以下用本人惯用的yuanlam为例 官网下载的ISO镜像,Proxmox新建虚拟机安装,安装过程就不累述了,网上大把教程。新建一个普通用户,以下用本人惯用的yuanlam为例
## 一.修改Debian IP获取方式为静态IP ## 一.修改Debian IP获取方式为静态IP(root用户)
*因为Debian新系统IP获取方式默认是DHCP,这里得修改为静态,这样才能用SSH进行后续操作* *因为Debian新系统IP获取方式默认是DHCP,这里得修改为静态,这样才能用SSH进行后续操作*
root用户登录,如果没法直接用root用户登录的话,就用yuanlam登录,然后用su - root输入密码切换。 root用户登录,如果没法直接用root用户登录的话,就用yuanlam登录,然后用su - root输入密码切换。
1.打开文件,用nano用vim都可以,看个人习惯
nano /etc/network/interfaces #打开文件 ```
nano /etc/network/interfaces
参照以下内容根据实际情况修改: ```
2.参照以下内容根据实际情况修改:
``` ```
auto lo auto lo
auto eth0 #eth0为网卡,根据实际情况修改 auto eth0 #eth0为网卡,根据实际情况修改
@ -20,9 +21,18 @@ iface lo inet loopback
iface eth0 inet static #static为静态,dhcp为动态 iface eth0 inet static #static为静态,dhcp为动态
address 10.10.10.97 #本机IP address 10.10.10.97 #本机IP
netmask 255.255.255.0 #子网掩码 netmask 255.255.255.0 #子网掩码
gateway 10.10.10.77 #科学上网的IP,我的科学上网方式是openwrt旁路由用的openclash, gateway 10.10.10.77 #网关(科学上网的IP)
dns-nameservers 198.18.0.1 #DNS dns-nameservers 198.18.0.1 #DNS,我的科学上网方式是openwrt旁路由用的openclash,用的fake-ip,所以这里填的是198.18.0.1
mtu 1492 #MTU mtu 1492 #MTU
mss 1452 #MSS mss 1452 #MSS
``` ```
3.重启网络
```
/etc/init.d/networking restart
```
4.重启系统
```
reboot
```
二.

Loading…
Cancel
Save