This is a server. Use a static IP.
To do this, open up
/etc/network/interfaces and add this:
iface eth0 inet static
Of course, set the IPs to the proper values.
address --> IP Address you want the server to have
netmask --> Your system's NetMask (usually
gateway --> Your router's IP address
Remove this line if it exists:
iface eth0 inet dynamic
Now, you have IP addresses assigned. You need a DNS server to use hostnames on the Internet. Do this by opening
/etc/resolv.conf and removing all
nameserver lines. Then, add these:
Replace above IPs with whatever nameserver/DNS server you want to use.
Finally, reboot (Will almost always work) or run the below command to apply the changes.
sudo ifdown eth0 && sudo ifup eth0