For all the examples we are assuming you are changing the address from 192.168.1.2
to 192.168.2.2
Change /etc/network/interfaces/
Change the Address and Gateway in /etc/network/interfaces/
Example
Before:
address 192.168.1.2/24
gateway 192.168.1.1
After
address 192.168.2.2/24
gateway 192.168.2.1
Change /etc/hosts
Change the Address in hosts
file
Before:
192.168.1.2 pve.localhost pve
After
192.168.2.2 pve.localhost pve
Change /etc/resolv.conf
for new name server
Do this if you also changed the address for nameserver
Before:
search localhost
nameserver 192.168.1.1
After:
search localhost
nameserver 192.168.2.1
Loading New Network Config
reboot and your server should have the new ip address