$ sudo nano /etc/network/interfaces
Change:
iface eth0 inet dhcp
to
iface eth0 inet static
Below this line enter the following, replacing x where necessary for your network config.
address 192.168.x.x
netmask 255.255.255.0
network 192.168.x.0
broadcast 192.168.x.255
gateway 192.168.x.x