|
1.修改网络配置
- vi /etc/netplan/50-cloud-init.yaml
复制代码- # 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:
- enp1s0:
- addresses:
- - 192.168.1.20/24
- nameservers:
- addresses:
- - 222.74.1.200
- search:
- - 222.74.126.230
- routes:
- - to: default
- via: 192.168.1.1
- version: 2
- wifis: {}
复制代码 2.使之生效
|
|