Changing the computer hostname in Ubuntu

October 14th, 2009

To see what the computer’s hostname is currently, you can issue the command:

$> hostname

To see the hostname with it’s domain, you can use:

$> hostname -fqd

To temporarily edit the hostname (resets on the next reboot), you can use:

$> hostname <newhostname>

To permanently change the hostname, you need to edit the /etc/hostname file:

$> sudo vi /etc/hostname

Creating Virtual Servers on my Ubuntu server using VirtualBox

October 4th, 2009

Ok, so having built my new server, I want to start installing things on it.  Rather than installing everything on the servers base OS (which is running Ubuntu), I am going to make use of virtualisation.  Virtualisation effectively allows you to run a computer within a computer.  I have used it in the past on my desktop (running Windows) to allow me to experiment with other Operating Systems, including Linux, using a variety of virtualisation packages including; Microsoft Virtual PC, VMWare and of course VirtualBox.

The main benefits to me of using virtual servers on my new server rather than setting everything up on the base OS are as follows:

  1. Isolation, since each virtual machine is isolated from the others, any mistakes I make while playing around with the configuration for one will not affect any of my other services running on the other machines. This isolation also helps me to group together similar groups of services and allow me to “turn off” individual servers when they are not required, allowing the others to perform better.
  2. Backup, running things on virtual machines gives me the opportunity to benefit from several backup options.  This stems from the fact that the whole virtual machine is effectively just a file on disk.  Since my base server has RAID 5 setup on parts of the filesystem, these files are kept very safely, if my base OS breaks down (for whatever reason), it should be very quick for me to recover and be up and running – simply reinstall the base OS and virtualisation software and everything will be back up and running as normal (rather than having to spend hours/days re-configuring everything).  Secondly I can create daily or weekly backups of the virtual machines, meaning that should one of them become messed up beyond repair, I can simply revert the virtual machine to a previous state
  3. Flexibility, ok, so flexibility’s not really of so much use to me as I only have one physical server and am unlikely to “need” any more (it’s arguable as to whether I “need” one), however in companies with two or more physical servers in use, virtualisation can bring a great deal of flexibility to their setup.  Firstly, it is possible to balance the virtual servers that are run on each physical server to bring the best performance (a virtual server can simply be stopped on one physical server and started on the other).  Should one find that the whole setup is underpowered, another physical server can be added and the virtual machines re-distributed to improve performance.  Finally should one of the physical servers die, the virtual machines that were being run on that server can simply be started on the other servers allowing very quick recovery.
  4. Security, by running lots of server programs on one computer, there is a lot of potential for security holes to exist – each service potentially introduces new holes and keeping on top of all the security flaws associated with them is a huge job.  As previously mentioned however, virtual machines appear as a seperate physical machine to the rest of the network, by seperating out services and grouping them onto virtual machines, I can restrict access to the internet to just those virtual machines that require it.  This reduces the possibility for attacks and should a machine be compromised, it limits the scope of what an attacker has access to.  Additionally, due to the simpler setup on each machine, because it is far less cluttered with services, configurations and scripts, it should be easier to check that they are setup securely.
  5. Learning, finally, it provides an opportunity for me to learn and play around, not only with the concept of server virtualisation, but also with various operating systems, system administration and networking, since whenever I wish to experiment, I can simply create a new virtual machine, play around with and when done, delete it.

Setting up VirtualBox in Ubuntu:

<To Be Completed>

My New Website

August 8th, 2009

So I’m having another go at my own website.  This time round though I’m using WordPress rather than writing my own platform.  My main reason for this is my lack of time to write many of the advanced features that WordPress offers (it’ll probably take me long enough just to modify the theme).  Instead of spending time duplicating the features that other packages (like WordPress) already offer, I would rather spend my time on my other projects and hobbies, on writing things up on my website and relaxing.  Much of the content that will appear on this site will be in the way of notes and observations as I go  about my work, hobbies and interests, and will therefore be largely about electronics, technology, computers and programming, with maybe the odd post about other topics.