Friday, 18 April 2014

My Debian Server, the beginning

I'm going to rebuild my home server using Debian, this is a rolling release and never needs to be re-installed unless you completely break it. I've decided to use the XFCE desktop too as I may want to use it occasionally and it's also lightweight and I can use it with a VNC connection.

I'm going to run samba and nfs sharing  on it along with an ssh an vnc server, then it will also run Newznab, SabNZB, Sickbeard and OwnCloud.

It will have 3 x 3TB external USB drives connected, one for data, one for a backup of data and one to synchronise data from another server so I can be a remote backup. I will also be backing up my data to a remote server just in case things really go wrong.

Let's just start with the basics and get the OS installed

It's not a hard install process and I'm not going to document it that much, but I will document the changes I make to it. I'm not going for seperate partitions for my data as this will all be stored on the external drives.

On the software selection screen I'm going to pick Debian Desktop Environment, File Server, SSH Server and Standard System Utilities. Anything else can be installed later and I will need SQL and Apache amongst other things.

Once the install is completed, all other configuration will be done by ssh or a web browser, you need to be logged on as root to do this.

You need to edit the sources.list file to get some codecs and utilities installed as follows:

nano /etc/apt/sources.list

Add contrb non-free to the end of the lines as shown below.

deb wheezy main contrib non-free
deb-src wheezy main

deb wheezy/updates main contrib non-free
deb-src wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb wheezy-updates main contrib non-free
deb-src wheezy-updates main

Then do an apt-get update followed by apt-get upgrade, then install the following, mc or Midnight Commander is a marvelous utility for navigating the file system from a terminal session. Tight VNC Server is going on to make it easy to control the server remotely and we will also be installing webmin which is another really useful tool.

apt-get install nfs-common
apt-get install nfs-server
apt-get install mc
apt-get install rsync
apt-get install tightvncserver

and now for webmin:

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
cd /tmp
dpkg -i webmin_1.580_all.deb

You should then be able to access webmin from a browser from the url https://servername:10000