A Server With X Appeal!

When building a server, my preference is to install Debian Stable and leave it at that.

However, for contingency’s sake, it is sometimes nice to have a graphical environment; I’ll explain why later on.

The following article is to detail how I build the base server using Debian Linux.

I don’t intend it to be a comprehensive quide to installing a Linux server – it’s just an explanation of how I choose to do it.

If you feel that I’m doing something wrong (or missing out something that might help me), please free to let me know.

Hardware

I have tested the installation of Debian on a number of machines ranging from a 600Mhz Celeron with 256Mb of Ram and a 9Gb IDE hard drive upto a 2.8Ghz Xeon with 2Gb of Ram and a 72Gb SCSI hard drive.

The only vital component of the installation machine is that it has a working network card/interface and a CD Drive. You will need a keyboard and screen for the installation process but, once the machine is up and running, these are not required.




Installation

(1). You need to start off by getting a Debian netinst CD. This can be downloaded from here… debian – 5.0 – netinst-  this image is 150MB and will work on all Intel or AMD machines. For other versions you will have to visit www.debian.org

Once you have burnt a copy of the CD, pop it into the installation machine and reboot that machine. Once the machine has booted up from the CD it will display this screen – I suggest that you choose the default option of Install – the non-graphical installer really isn’t that frightening and getting used to a non-windowed environment be good practise anyway.

(2). Then choose your language. For obvious reasons, I choose English.

(3). When it comes to localisation details, I choose United Kingdom (I should really chose France as that’s where I now live but, France is not on the initial menu and thus, it doesn’t get my vote – how lazy is that?)

(4). Choose the keyboard layout that matches your keyboard.

(5). The PC will whirl away for a few moments whilst the hardware is being scanned.

The network card will be found and if you have a DHCP server (an ADSL modem generally works as a DHCP server), will assign an IP address to it.

(6). And then you will be asked for the hostname (the name that you are going to give the machine.)

At this point we need to go back a stage as we really don’t want a DHCP assigned IP address for this machine. Tab twice and press Enter.

(7). Choose to Configure Network Manually (it should be the default) and press Enter.

(8). Now we are going to enter the IP address manually. All the ADSL modems that I have seen (LiveBox, DLink, NetGear & Linksys) use a default internal IP address of 192.168.1.1 – thus we are going to take the next available address – 192.168.1.2

If your ADSL modem/router uses a different IP address or 192.168.1.2 is already taken, you will need to specify a different IP address here. The important thing is that we need a fixed IP address in the same range as the one that your ADSL modem uses (i.e. for a modem using 192.168.1.1 we should use a fixed IP address between 192.168.1.2 and 192.168.1.254)

Type this into the space provided and press Enter.

(9). The installation program will work out the best network mask for you so just press Enter here.

(10). The installation program will guess that the Network Gatway has an IP address of 192.168.1.1 (the address of your ADSL modem – effectively your Gateway to the internet) so, if this is right, just press Enter here.

(11). Like above, the installation program guesses that your Gateway is either your Name server or has the address of it so, if this is right, just press Enter.

(12). Now we can name the machine. I am naming my machine server01.

You can name your machine whatever you like.

(13). Now you should enter the domain name.

Unless you are building a machine to insert in an existing domain you may use any name.

It probably makes sense to name the domain something like mydomain as I do.

(14). The machine will chug away for a little bit.

(15). As this machine is going to be a dedicated server, I am going to use the whole hard disk.

(16). There’s only one disk in the machine so I select it.

(17). I’m going to allow the disk to be partitioned with all files in one partition.

For this machine there really isn’t much point in doing otherwise.

(18). The installation program decides to create an 8.2Gb root partition and a 419 Mb swap partition.

This is fine so I just press Enter to allow the system to Finish Partitioning and Write Changes to Disk.

(19). Backspace to choose Yes if you’re are really sure.

(20). The installation process now creates the partitions on your hard drive.

(21). And starts installing packages from the CD Rom.

(22). When it has done this you will be asked for a password for the system administrative account.

(23). And you will be asked to repeat it.

(24). You will now be asked for the name of a user.

As this machine is going to be a server without any regular user, I am going to create a user called administrator.

(25). Whatever name you have typed in, it may get altered – in this case it didn’t.

Press Enter to accept the new user account name.

(26). You will be asked for a password for the new account.

(27). And asked to repeat it.

(28). Once again, you will be asked where you are.

(29). And you’ll be asked to choose a Debian Archive Mirror.

(30). And finally, you’ll be asked if you are behind a HTTP proxy and if so, what the addresss of it is.

Leave this blank unless you are sure you are behind a HTTP proxy and press Enter.

(31). This part of the installation takes about 20 minutes for me.

It may be quicker for you (or longer, even), depending on the speed of your internet connection and the specification of your machine.

(32). There are some points where it looks as if it has got stuck.

But, if you leave it alone, eventually it will carry on.

(33). You will be asked if you wish to Participate in a popularity contest? I generally answer no.

(34). You will be asked to Choose software to install

Deselect all, highlight Continue and press Enter

(35). Next, the installation process asks if we want toInstall Grub to Master Boot Record – Yes, we most certainly do.

(36). The installation chugs away a little bit longer.

(37). And then the CD gets ejected and the machine will reboot.

Type su and press Enter.

Supply the root password when prompted and then type apt-get install openssh-server – and answer yes when prompted.

Don’t forget to log yourself out of the machine by typing exit (twice)

A Graphical Interface

I install xfce once I have finished my standard server install of… Debian (with no options) and SSH.

The XFCE install is fairly trivial.

su

apt-get install xorg

apt-get install xfce4

apt-get install xfce4-goodies

Why a Graphical Interface?

Now, putting a desktop on two of my servers might make me a bit of a wimp but there are good reasons for it.

Firstly, if I am out and about on my Computer Repair business - www.KeithEckstein.com and I need something done on one of the servers, I could phone home and talk Jill through doing it if they have an environment that she is used to.

I hate to think how painful it would be trying to explain all the command line stuff when, to be honest, I need to type man for help at least once a day!

Also,  the server acts as a backup data server for the network.

If any machine on the network goes down, it is quite trivial to install ThunderBird or Firefox and thus, continue working without interruption.

The edict that “Thou shalt not have X Windows on a server” is all very well for older (or more stressed) kit or, outside of a home network (for security reasons).

The three things that have occurred to me during the process are….
1). Backups are one thing – Business Continuity is far more important!
2). A minimal XFCE install over Debian Server makes for a very fast machine and…
3). A combination of Webmin and SSH means that we can switch off those monitors, save space and save electricity as well!

A machine of the same sort of specification as, with a screen, would cost me about 100 euros from a local PC refurbisher.

About what a 500GB USB hard drive would cost. Now my server only has an 72GB hard drive but, she is a machine in her own right – perhaps we should start thinking less about backing up our data and more about continuing to use that data when things go wrong?

Perhaps we should all have a server like mine chugging away under our desks, being backed up to every night and just waiting for the day when our main machine decides to go wrong – at least that way, we could get onto the web and email an order in for kit to replace what has died?

All the best

Reddit Digg Stumble Bookmark

Comments are closed.