平时使用centos比较多,django项目客户方要求用ubuntu ,本文就介绍一下如何配置静态文件
生成一下文件
$ sudo netplan generate
创建个文件
$ sudo vim /etc/netplan/01-netcfg.yaml
文件内容
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: yes
enp0s8:
dhcp4: no
dhcp6: no
addresses: [192.168.56.110/24, ]
gateway4: 192.168.56.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
生效文件
$ sudo netplan apply