Archive for the 'Ubuntu' Category

Ubuntu Media Server: DHCP To Static IP

In my last post, I wrote about a mini PC I bought. After the PC arrived, I installed Ubuntu Server 8.04 LTS but I can’t get the LAN to work. After few hours trying to fix it, I simply gave up. Then, I downloaded daily build of Ubuntu Server from http://cdimages.ubuntu.com, burn the image to CD and installed it. LAN worked like a charm this time. During the installation, don’t forget to tick OpenSSH Server when prompted. We’ll need this to administer the server from outside LAN network. OK, next is to give it a fixed IP. This is how I (and everybody else) did it. Type the command below

sudo nano /etc/network/interfaces

It will open a file and it will show something like this

1
2
3
4
5
6
7
8
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp

Replace the last line to

8
iface eth0 inet static

and include these underneath it

9
10
11
12
13
        address 192.168.1.5
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

Save and quit nano and then restart networking.

/etc/init.d/networking restart

Lastly, verify the IP by using

ifconfig

In the next post, I’ll show how to set up an FTP server.

 If you like this post, please buy me a coffee.