There is a new version of this tutorial available for Ubuntu 24.04 (Noble Numbat).

Ubuntu 15.04 (Vivid Vervet) Minimal Server Installation Tutorial - Page 2

Please check if the installer detected your time zone correctly. If so, select Yes, otherwise No:

Now you have to partition your hard disk. For simplicity's sake I select Guided - use entire disk and set up LVM - this will create one volume group with two logical volumes, one for the / file system and another one for swap (of course, the partitioning is totally up to you - if you know what you're doing, you can also set up your partitions manually).

Select the disk that you want to partition:

When you're asked Write the changes to disks and configure LVM?, select Yes:

If you have selected Guided - use entire disk and set up LVM, the partitioner will create one big volume group that uses all the disk space. You can now specify how much of that disk space should be used by the logical volumes for / and swap. It makes sense to leave some space unused so that you can later on expand your existing logical volumes or create new ones - this gives you more flexibility.

When you're finished, hit Yes when you're asked Write the changes to disks?:

Afterwards, your new partitions are being created and formatted.

Then the base system is being installed:

Now the package manager "apt" gets configured. Leave the HTTP proxy line empty unless you're using a proxy server to connect to the Internet:

I like to update my servers automatically, therefore I select Install Security Updates automatically.
Of course, it's up to you what you select here:

The only item I select here is OpenSSH server so that I can immediately connect to the system with an SSH client such as PuTTY after the installation has finished:

The installation continues:

 

Select Yes when you are asked Install the GRUB boot loader to the master boot record?:

The base system installation is now finished. Remove the installation CD from the CD drive and hit Continue to reboot the system:

 

The base installation is finished now. In the next chapter I will explain the configuration of the static network address and install a shell based text editor for editing configuration files.

 

4. Get root Privileges

After the reboot you can login with your previously created username (e.g. administrator). Because we must run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing:

sudo -s

(You can as well enable the root login by running)

sudo passwd root

and giving root a password. You can then directly log in as root, but this is frowned upon by the Ubuntu developers and community for various reasons. See https://help.ubuntu.com/community/RootSudo.)

 

5. Install The SSH Server (Optional)

If you did not select to install the OpenSSH server during the system installation above, you can do it now:

apt-get install ssh openssh-server

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Ubuntu 15.04 (Vivid Vervet) server.

 

6. Install an shell based editor (Optional)

Here we will install two text based editors. The Nano editor is easier to use for newbies while others prefer the traditional vi/vim editor. The default vi program has some strange behavior on Ubuntu and Debian; to fix this, we install vim-nox:

apt-get install nano vim-nox

 

7. Configure The Network

Because the Ubuntu installer has configured our system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. If you want to keep the dhcp based network configuration, then skip this chapter. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address 192.168.1.100 and the DNS servers 8.8.4.4, 8.8.8.8 starting with Ubuntu 12.04, you cannot edit /etc/resolv.conf directly anymore, but have to specify your nameservers in your network configuration - see for more details):

man resolvconf

Open the network configuration file with nano:

nano /etc/network/interfaces

The server is using DHCP right after the install, the interfaces file will look like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

To use a static IP address 192.168.1.100, I will change the file so thatit looks like this afterwards:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 8.8.8.8 8.8.4.4

Then restart your network to apply the changes:

service networking restart

Then edit /etc/hosts. Make it look like this:

vi /etc/hosts
127.0.0.1       localhost
192.168.1.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Now  we will change the hostname of our machine as follows:

echo server1 > /etc/hostname 
service hostname start

Afterwards, run:

hostname 
hostname -f

The first command returns the short hostname while the second command shows the fully qualified domain name (fqdn):

root@server1:/home/administrator# hostname
server1
root@server1:/home/administrator# hostname -f
server1.example.com
root@server1:/home/administrator#


Congratulations! Now we have a basic Ubuntu 15.04 server setup which provides a solid basis for all kind of Ubuntu Server setups.

Ubuntu : http://www.ubuntu.com/

Share this page:

1 Comment(s)