修改IP地址

进入shell

可以通过页面进入shell控制台,也可以远程shell工具连接

执行修改命令

  1. 执行vi /etc/network/interfaces

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    auto lo
    iface lo inet loopback

    iface enp6s0 inet manual

    auto vmbr0
    iface vmbr0 inet static
    address 192.168.5.100/24
    gateway 192.168.5.1
    bridge-ports enp6s0
    bridge-stp off
    bridge-fd 0


    source /etc/network/interfaces.d/*

    编辑address地址

  2. 执行vi /etc/issue

    1
    2
    3
    4
    5
    6
    7
    8
    9

    ------------------------------------------------------------------------------

    Welcome to the Proxmox Virtual Environment. Please use your web browser to
    configure this server - connect to:

    https://192.168.5.100:8006/

    ------------------------------------------------------------------------------

    编辑访问地址

  3. 执行vi /etc/hosts

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    127.0.0.1 localhost.localdomain localhost
    192.168.5.100 pve2.kewen.com pve2

    # 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

    编辑host

  4. 重启

    reboot

执行完以上操作,就可以使用新的地址了

引用