[Untitled]‎ > ‎

Configuration of Static IP in Ubuntu Local Server

posted Jan 26, 2010 8:27 PM by J iNestdia   [ updated Jan 26, 2010 8:41 PM ]
468 X 60 Macbook

After Install LAMP Server Locally on Ubuntu 9.10(Karmic), I have to change to a static IP address because Ubuntu installer has configured my system network settings via DHCP. Edit /etc/network/interfaces as follows for example,

$ sudo nano /etc/network/interfaces

(nano is a simple terminal based editor, very easy to use)

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

then restart the network services,

$ sudo /etc/init.d/networking restart

Setup manually DNS servers in resolv.conf file when you are not using DHCP.

$ sudo nano /etc/resolv.conf

#search domain.com
nameserver 8.8.8.8
nameserver 8.8.4.4

By the way, 8.8.8.8 & 8.8.4.4 are the Google Public DNS Service IPs, you can use the DNS IPs at your choice, of cause.

Adidas Voucher MY Image Banner 300x250

suki b009 300x250

Phone Spy Image Banner 300 x 250

Scan B 007 300x250

Office Lady Scanner Image Banner 300 x 250

Sign in  |  Recent Site Activity  |  Terms  |  Report Abuse  |  Print page  |  Powered by Google Sites