Proxmox Virtual Environment(PVE)修改IP、网关、DNS
装PVE时,默认把 DHCP 服务器分配的网络配置信息配成固定IP了,今天切换了网络,需要重新配置IP和DNS,故做如下笔记,其实大体上与绝大多数 Linux 都一样。
建议在命令界面下使用nano命令
1、修改IP、网关,文件名为 /etc/network/interfaces
auto lo iface lo inet loopback iface ens33 inet manual auto vmbr0 iface vmbr0 inet static address 192.168.100.3/24 gateway 192.168.100.2 bridge-ports ens33 bridge-stp off bridge-fd 0
2、修改DNS服务器,文件名为 /etc/resolv.conf
search localdomain nameserver 192.168.100.2
3、修改主机名解析的IP,文件名为 /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.100.3 pve.localdomain pve # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
4、修改开机界面提示的URL内容,文件名为:/etc/issue ,其实改不改都不影响使用的。
------------------------------------------------------------------------------
Welcome to the Proxmox Virtual Environment. Please use your web browser to
configure this server - connect to:
https://192.168.100.3:8006/
------------------------------------------------------------------------------
就是这个开机画面