Update networking settings
This commit is contained in:
parent
d1b5210555
commit
235d2edbf1
34
README.md
34
README.md
|
@ -494,10 +494,42 @@ esac
|
||||||
```
|
```
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
# 附註 rc.local1
|
# 附註 rc.local
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
sudo mongod --config /etc/mongod.conf &
|
sudo mongod --config /etc/mongod.conf &
|
||||||
exit 0
|
exit 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### 五、網路設定
|
||||||
|
```sh
|
||||||
|
# 開機網站自動起始
|
||||||
|
$ sudo vim /etc/netplan/50-cloud-init.yaml # 內容見附註 50-cloud-init.yaml 18.04開始設定改這
|
||||||
|
#
|
||||||
|
```
|
||||||
|
|
||||||
|
```txt
|
||||||
|
# 50-cloud-init.yaml
|
||||||
|
# 本範例有兩塊網卡,第一塊是DHCP,第二塊是固定IP
|
||||||
|
# 其中因為子網路遮罩為255.255.255.0 ,所以是 /24
|
||||||
|
# This file is generated from information provided by the datasource. Changes
|
||||||
|
# to it will not persist across an instance reboot. To disable cloud-init's
|
||||||
|
# network configuration capabilities, write a file
|
||||||
|
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
|
||||||
|
# network: {config: disabled}
|
||||||
|
network:
|
||||||
|
ethernets:
|
||||||
|
enp0s29u1u1u5:
|
||||||
|
dhcp4: true
|
||||||
|
enp6s0:
|
||||||
|
addresses:
|
||||||
|
- 192.168.1.142/24
|
||||||
|
gateway4: 192.168.1.1
|
||||||
|
nameservers:
|
||||||
|
addresses:
|
||||||
|
- 8.8.8.8
|
||||||
|
search:
|
||||||
|
- rulingcom.com
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue