Added on May 18th, 2012 and marked as config install server

Update packages

Login to the server:

ssh root@{SERVER-IP}

Update the package index:

apt-get update

Upgrade the packages (optional):

apt-get upgrade

Get a list of installed packages:

dpkg --list

Install some useful utilities (nano, telnet, git, lynx, DNSutils (for dig, host, nslookup), mailutils (for mailx), apache2-utils (for ab), finger and multitail):

apt-get install nano
apt-get install telnet
apt-get install git
apt-get install lynx
apt-get install dnsutils
apt-get install mailutils
apt-get install apache2-utils
apt-get install finger
apt-get install multitail

Setting the server’s hostname

Change the hostname:

hostname {HOSTNAME}

(or nano /etc/hostname to make it permanent).

In /etc/resolv.conf it is possible to specify the default domain that is used to generate a fully qualified domain name (FQDN):

search {DOMAIN.TLD}
nameserver {IP-DNS-1}
nameserver {IP-DNS-n}

It is possible to add as many nameserver records as you want/need. It is possible to use the default DNS-servers of the ISP, or you could use the DNS provided by Google:

Check the hostname with:

hostname -f

Add the hostname to the HOSTS-file (/etc/hosts):


Make sure to add a PTR-record for the IP-address of the server (especially important if you want to use the server as a mailserver). Use one of the following commands to check that the IP resolves to the correct hostname:

dig PTR {IP_D-block}.{IP_C-block}.{IP_B-block}.{IP_A-block}

Background information