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
posted @   CodeMan-k23  阅读(78)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· NetPad:一个.NET开源、跨平台的C#编辑器
· 面试官:你是如何进行SQL调优的?
点击右上角即可分享
微信分享提示