1. Edit interfaces file
sudo gedit /etc/network/interfaces
iface eth0 inet static
If there is a line like:
iface eth0 inet dhcp
need to add # before the line to comment it.
2. Edit file /etc/resolv.conf
sudo gedit /etc/resolv.conf
These are DNS, that might be different for different ISP
If you do only step 1, not step 2, you can only visite web site by using number IP not domain name.
3. Restart network
sudo /etc/init.d/networking restart
You should see the static IP you setup.
Note: the graphic thing (for net work configure) on the top bar is not working even I set up everything there.