sudo nano /etc/network/interfaces
then modify the file.For example my IP is 192.168.1.102,like:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.102
netmask 255.255.255.0
gateway 192.168.1.1
##below is the wireless setting.If you don't need it,can delete~
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
at last restart the network:
sudo /etc/init.d/network restart