Home Desktop / Server

 v 0.33
18 Jun 12

My aim here is to document a computing project I think may be of benefit to people.  I don't claim to be an expert, and you must remember that this is a learning process for me.

I'll write about different aspects in the regular blog, and keep this page a work in progress.

Aim

The aim of our project is to produce a family computing system that can be used as both a Desktop system and a Server.  It is intended that it will be kept running all the time and be economical to purchase and run.

Many home computers that can be purchased these days are way more powerful than super-computers of only a decade or so ago.  The urge is to buy a cpu that is close to the top of the range and a graphics card that causes the neighbourhood to suffer a "brown-out" every time the machine is switched on.

If you don't need to run a demanding game or Flight Simulator, then this is a waste - after all, high end graphics cards (such as needed to run IL2 - Cliffs of Dover) draw well in excess of 350 watt by themselves.

Hardware

 I already had a Chimei 22" LCD screen and keyboard and mouse, so I won't go into these - I simply determined some specifications and had the local computer shop build my machine.  Should you do something like this, you may find something slightly different suits your purpose - all I know is that I'm really pleased with what I put together and that it is going nicely at the moment.

So here is what I have:
  • Case              - Casecom CM431 MicroATX Case
  • Motherboard  - ASUS P8H61-M LX B3 Revision
  • CPU              - Intel i3 2120
  • Memory        - 8 GB
  • HDD             - Western Digital Caviar Green 2TB
  • DVD             - Standard DVD RW etc
Describing things a bit more:
  • The case was just one my "builder" had available, however it looks good with plenty of ventilation and has 2 x USB and Audio and Mic jacks on the front panel.  It came with a 550 w power supply, which was rather an overkill, however .... The only question I have is that it may burn a bit more power than necessary just because of its capacity.
  • I saw the Motherboard quoted in another local build, and when I looked at it, I found it was moderately priced (about $60) and had sufficient memory and ports on it.  It had a parallel port for older printers (of which I still have one) and PS/2 connectors for older keyboards and a mouse.  It comes with a standard VGA connector (no HDMI).  It has 4 USB 2.0 ports and even a Serial port if you need it for older peripherals.  What I really liked about it was the BIOS setting that allows you to specify maximum performance, or low noise and economy.  It has enough of what most people would want and no more.  For me, it was a comfortable choice.
  • The i3-2120 CPU is a 2-core, 64 bit processor with on-board Intel HD 2000 Graphics.  Putting it in perspective, the power and graphics on this chip are significantly greater than even a few years ago.  I have a Pentium 4 3.0 G computer and this i3 is nearly 10 times more powerful.  The graphics are smooth whereas for the same program on the previous machine, they are about 1 frame per second.  Power consumption is significantly less than the Pentium 4 I mentioned.
  • I chose 8 GB of memory, partially because it was cheap, but mainly because it allows a number of Virtual Machines to be run simultaneously on the machine in the background.  The CPU is rarely taxed, so it is quite capable of running a desktop in the foreground and a server or two in the background.
  • There are a couple of choices for HDD, however the main point is to obtain one which is low power.  One large drive uses less power than two smaller drives.
How much less power?  One review I read of a similar system to this had its power consumption at between 40 and 100 watts depending on load.  Compared with many choices you could make, this system would pay for itself in electricity savings in a year.

What do I think of it?  Very pleased.  I have it set on the low power mode and it is very, very unobtrusive.  Almost silent.  Since this box will probably sit under a desk or whatever, I've thought of using the packing box as further sound-proofing, with appropriate cutouts for ventilation etc.  With low power and the extra sound-deadening, it should work well - though at this point I don't know whether it will be practical to do this.

Finally, how much did this cost?  A$400.  If you want to add a screen and keyboard and add Windows, then you would probably be looking at another A$250.  I don't claim this to be the cheapest you could get the same machine, however, that is what it cost me.

Software

Software on a desktop computer (let alone a server) can easily cost one or two thousand dollars if you aren't careful (especially with Windows).  However just like Baldrick, I have a "cunning plan".

As you will have guessed, my plan involves installing a GNU/Linux Distribution for the desktop.  I intend using this to host several Virtual Machine Servers.  It is interesting that whilst GNU/Linux has made significant inroads to the Server market, it remains at low levels of penetration on the Desktop.  I'd say that the reason for this discrepancy is that  the incentive to use a superior solution in the server world provides the push for people to make the effort, whereas people using a desktop computer are more than happy to just bumble along with what they buy from whatever mass-market place they walk into.

Interestingly, an interview I heard given by RMS on the GNU/Linux Action Show resonated.  Whilst his views are somewhat "out there", in this he is correct.  People really are surrendering their freedom by just blindly accepting mass-market computing products.  As he pointed out in the interview ... "Freedom means no-one has power over you, not that you can do what you like".  If you want to be free, you have to put the effort in.

Enough philosophy.

Given that GNU/Linux is going to be installed on our machine, which flavour?  Which Linux Distro is secure, well supported, complete, has a rigorous social policy, is easy to maintain and has significant following?  Well, as it turns out, Debian meets all those requirements.  It is a major player in Server installations, and is straight forward and of high quality.  A comment on RMS and Debian.  Whilst to most of us, Debian represents all the views of RMS, he does not endorse it because it has repositories that enable the installation of "non-free" software.  If you only enable the "main" repositories, you have an RMS type install, but "contrib and non-free" .....

Before I continue, a word about a couple of alternatives some people may be inclined to follow.  I am also highly enthusiastic about Slackware.  Whilst I no longer use it, simply because I find Debian suits me better, Slackware is just one fantastic implementation of GNU/Linux.  If you are of a curious nature ... give it a go.  The other alternative that I'm sure people would look towards is Ubuntu.  I have never really .. er .. been comfortable with Ubuntu for a number of reasons.  Ubuntu is probably a more gentle introduction to GNU/Linux, however one saying I read about Ubuntu and Debian pretty much says it all.

"I started on Ubuntu but then I got onto the Hard Stuff" ....

Desktop

I have installed Debian "Wheezy" on my machine as the host system.  At present, "Wheezy" is the "Testing" branch of Debian - it is the prototype of their next "Stable" release.  At present, Wheezy is due to go into a freeze in a month or so - no new packages will be added other than security or other bug fixes.  Based on that, I expect Wheezy to be declared Stable about September this year.  In order for you to receive predictable updates, it is important that you tell Debian's update system (apt) what repository line you are tracking.  Make sure (unless you know otherwise) that your " /etc/apt/sources.list " file repositories point to "wheezy" and not "testing".

I ended up installing twice, Xfce the first time, and Gnome 3 (the default) the second, owing to my Xfce desktop becoming scrambled because of a crash.  Don't let that put you off, though.  Xfce is one of the many fine desktop/window managers available. To install Xfce as your only desktop, use the Debian "Testing" Netinstall iso (burnt to CD) to install the Xfce desktop via the "advanced" choice.

Here is a Summary:

download iso image and burn to CD - I went to this page:
http://www.debian.org/devel/debian-installer/

and download the AMD64 netinstall iso (I almost downloaded the ia64 disk, however this is for a different Intel chip).
http://cdimage.debian.org/cdimage/wheezy_di_alpha1/amd64/iso-cd/debian-wheezy-DI-a1-amd64-netinst.iso


download firmware and unpack to folder on USB drive
http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/testing/current/
(I downloaded the zip file and extracted the debs within it to a folder called "firmware" on a usb stick.)

Installation

There is a fine tutorial on installing Debian Squeeze onto a machine, and this is almost identical to that for Wheezy.
http://www.howtoforge.com/the-perfect-desktop-debian-squeeze

If you want to install Gnome, just accept defaults otherwise for an alternative desktop, after booting the netinstall CD.  Select:
  • Advanced Options
  • Alternative Desktop
  • Xfce
  • Install

Then go through the standard install options.  It did stop at one point and ask me to connect the USB stick with the non-free firmware on it as it detected  firmware was needed - rtl_nic/rt18168e-3.fw  This would be the only "non-free" part of the installation needed.

Using the Debian Partitioner, I selected:
  • 15 GB Ext4  mount point /
  • 485 GB Ext4 mount point /var
  • 17 GB Swap
  • 1.5 TB Ext4 mount point /home
Note:  Whilst I haven't done so yet, I've found mixing a server and desktop on the same setup to be .. er .. inconvenient.  I'm looking at reducing the size of the " /var " partition, and installing any servers on virtual machines (Virtualbox at the moment).

I'm sure I'll find a better system, however this will be satisfactory for the moment.  I took the recommendation of a primary partition for the first and logical partitions for the remainder.  One other interesting question I've never been asked before is that the system asked if I wanted to configure for DECnet.  This seems to be owing to support in the Linux Kernel for this, however I don't see that I need this, so I simply accepted the default and didn't do it.  They tell you how to install support for it at a later time if you wish.

With the system up and running, the first thing was to add some repositories to the "sources.list" file. 
The "howtoforge" tutorial tells you for Debian Multimedia.  I searched for a local repository and added that for "wheezy" and then installed the deb-multimedia-keyring as per the instructions.

Open a root terminal
# cd /etc/apt
# mouspad sources.list

(when finished, save and close mousepad)

# aptitude update     (you will have complaints about a repository that is untrusted)
# aptitude install deb-multimedia-keyring     (type Yes to the question otherwise it will abort)
# aptitude install synaptic

Packages to install:
  • ttf-mscorefonts-installer
  • dhelp  (type dhelp from the command line and it will organise the documentation for you - it will conflict with anything else using port 80 though)
  • flash-plugin-nonfree   (remove gnash)
  • debian-reference .. just search on doc or documentation .. there is a most impressive library of documentation.
  • gdebi - right-click installation convenience
  • remmina - outstanding remote desktop client - does remote windows desktop easily.
One thing to realise is that there is no problem with just re-starting an install.  As it turns out, that is one way you get to learn more about the system and get just what you want.  Probably the most complex part of the process is using the partitioner.  Practice. OR read the installation manual available from the Debian website, along with a heap of other Debian manuals.

User Switching
I have found that Xfce does not allow user switching.  In reality, this is related to the log-in manager.  There is a package " xfswitch-plugin " that installs gdm3 and dependencies (quite a large download) and once you install the "user switch" button on the Xfce panel, you can switch users, running one of them in the background.  Remember, during the configuration, you need to use gdm3 as your log-in manager. 


Gnome 3
If you understand vi, you will take to Gnome 3 like a duck to water.  Whilst I love Emacs, for straight text editing vi cannot be beaten - and the two modes of this editor have been reflected in the development of Gnome 3.  An "Overview" mode and a "Doing" mode.  Keyboard shortcuts are king in Gnome 3.
http://glassfloor.blogspot.com.au/2012/06/customising-gnome-3-making-it-work.html

Server

What I've found from the little playing around I've done with servers on my older desktop is that it is far easier to manage the process having on virtual machine dedicated to one or two server applications each.  That way there are no conflicts and they can be managed easier.

Virtualbox.

There is an excellent guide to installing Virtualbox from the Virtualbox repository in a headless environment at "HowtoForge".
http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-4.0-on-a-headless-debian-squeeze-server

When I did install everything as above, I became increasingly uneasy and the next time, I chose to install Virtualbox from the Debian repository.  You have the choice of Virtualbox OSE and Virtualbox.  Virtualbox OSE simply lacks the proprietary USB and Remote Desktop capabilities.

One thing I did find with the virtualbox repository install was that the CLI commands were different than advertised.  They were all lower case ... so it was vboxheadless and vboxmanage .

Running Virtualbox Server in the Background

There are a couple of init scripts that I found - one on the Virtualbox documentation forum that describe automatically starting a Virtualbox VM.  I elected to initially look at a more brute force approach related to the desktop - which also solved a problem I'd had with Xfce.

https://forums.virtualbox.org/viewtopic.php?f=7&t=32842

http://www.pclinuxos.com/forum/index.php?PHPSESSID=kggv9blo6sl595fb0jgfp5fef1&/topic,103651.html

This might also help you ...
http://vboxtool.sourceforge.net/

Alternative Virtualisation Solutions

Depending on what you want, you can use Xen (which requires a special install), or KVM / Qemu.  I chose Virtualbox purely because it is multi-platform, and will be the easiest to convince the sys-admin of my victim system to install.  I intend looking seriously at KVM/Qemu in the future, though.

No comments:

Post a Comment