tomcat配置动、静态双IP

tomcat配置动、静态双IP

1. 切换目录

cd /etc/netplan

2.删除 00-installer-config.yaml 文件

3.新建 static.yaml (静态IP配置)

 # This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
      addresses: [192.168.21.85/24]
      gateway4: 192.168.21.1
      nameservers:
        addresses: [192.168.21.1,114.114.114.114]      
  version: 2

4.新建 dhcp.yaml(动态IP配置)

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
      dhcp4: true
  version: 2    

5.检查

sudo netplan apply --debug

6.查看

ip a
上一篇:k8s——yaml资源清单


下一篇:SpringBoot 框架