I’m going to set a static IP address on my Ubuntu LTS server.
Login into the server’s console and edit the settings for your primary network interface in /etc/network/interfaces:
sudo nano /etc/network/interfaces
# The primary network interface
iface eth0 inet static
# dns-* options are implemented by the resolvconf package, if installed
Save the file and then restart your network services:
sudo /etc/init.d/networking restart