Not Quite Loving Technology

Well, it’s back! It took me a bit but I managed to resurrect this site from the demons of technology. Turns out that my power supply went bad, frying my motherboard and/or CPU. Luckily it appears to have left my hard drive functioning so after purchasing new parts and putting things back together, spending two days troubleshooting what I thought was a bad hard drive, and finally fixing the problem, I have my server back. It’s also lower power in comparison, running a 35W Celeron as opposed to the 65W amd processor I was using before.

Other technology things that have me pulling my hair out.

  • My main desktop PC is acting up, nothing I can’t fix but still annoying
  • I dropped my iPhone and broke the screen, thankfully  it still works
  • My wireless router that is my backup to my server is worthless when being used as a router. Luckily I was able to borrow a router from my neighbor so I wasn’t without the internet for a week.

On the positive side I have a Macbook Pro on the way. Nothing quite like a new toy to make me giddy.

Anyway, thanks for sticking with me while I was offline for a week. I’ll be writing a bit more now that I have things working again.

Be the first to comment

Issues

Lot’s of issues today with my server.  Ended up building a whole new image and importing posts.  I lost Friday’s post and a couple of comments.  I’m hoping I can get them back in the next couple of days.  First though I want to see if this solution works or not.  The site is probably going to run a bit slow for the next few days.  But at least it will be working.  Thanks for your patience.

Be the first to comment

The Perfect Linux Server Part 1

Designing the perfect Linux Server isn’t difficult, it can be time consuming but with a plan, you should be able to get everything running quickly.  This post will lay out the groundwork of what services the server should provide and how we divide it up among our virtual machines.

The main services that I want the server to provide are web, ssh, mail transport, dns-caching, and file serving. Some additional, but non-essential tasks could be bittorrent, ftp, streaming media, and VPN.  Of course their are a ton of things you could add to this list, but these are the services I feel are the most useful.

The next step is to list the applications that we will need to run to accomplish these tasks.

  • Web Server
    • Apache
    • Mysql or other database is usually necessary
    • PHP
  • SSH Access
    • open-ssh
  • Mail Transport
    • I use Qmail, but there are many options
  • Dns Caching
    • I prefer Tiny-DNS, Bind is also a good choice
  • File Server
    • Samba
  • Bittorrent
    • rtorrent
  • FTP
    • I use SSH for file transfers and you should to
  • Streaming Media
    • Lots of options, ampache and Jinzora are who popular ones.
  • VPN
    • OpenVPN

Some other services that I install to keep an eye on things

  • Munin
  • Nagios

So how do we divide these systems up.  The choice is yours, but for this tutorial I am going to use the following setup.

  • Zeus: Domain0.  This is the top level system that all other servers run on top of
    • Xen
    • Qmail-send
    • Munin-node
    • SSH
  • Pegasus: Web Server
    • Apache
    • PHP5
    • Mysql-Server
    • Qmail-send
    • Munin-node
    • SSH
  • Hades: File Server
    • Samba
    • rtorrent – This makes the most sense here as we will want to access the files downloaded from other systems
    • Qmail-send
    • Munin-node
    • SSH
  • Athena: Monitoring and support services
    • Tiny-DNS
    • Apache – To allow for remote viewing of system status
    • Munin
    • Munin-node
    • Nagios
    • Qmail-send
    • OpenVPN

A few things that I need to point out in regards to this list.  First, I actually installed Samba on Pegasus(Web Server) so I can edit my development files dirctly.  You could host things on Hades and just mount the share under your web root if you wished.  It also would make sense to do all development on a seperate server, I don’t due to the limitations of having one IP address.

A few other points, I don’t actually run an SMTP server on any of my servers.  I use Google apps to receive and store my mail.  Qmail is only installed to send mail from the servers.  It is trivial to install qmail-smtp to allow you to receive mail.  Another change that I would make if I had better hardware would be to seperate the system running apache from the system running MySQL.  This is mainly a security enhancement but is not extremely important.

6 comments

An Ultimate Linux Server Introduction

This site is run out of a server that sits in my basement.  I used to host my websites on a shared web host like GoDaddy, but after spending almost $100 a year and having very little control over my hosting service, I decided that I could run most of my sites from my home.  Of course I don’t get a lot of traffic so this is possible.

Recently however I started to attract some extra traffic here and there.  Nothing major, maybe an extra 25-50 hits a day, but it got me thinking about what would happen if I happened to claw my way to the front page of Digg .  A massive spike in traffic would most likely result in my site crashing.  I can protect myself from this the best I can; tune apache, setup opt-caching, setup caching on WordPress, and other modifications.  Unfortunately, these can only help so much though when my server has a Sempron 2800+ with less than a GB  of memory.

So I decided that something had to be done, I considered a few alternatives, but as I looked over the software and hardware landscape, I decided to focus on virtualization.  I decided to purchase some additional memory and setup a Xen hypervisor.  There are several benefits to this.

  1. If my server was brought to it’s knees, I am be able to ssh into my system and hard reboot remotely.
  2. Improved security as I currently run numerous services on my server.  I can isolate my internal services from the external services.
  3. I can setup monitoring, and receive alerts if a service or host fails.  Without Xen, if my host failed I wouldn’t receive alerts as the monitoring system was down.
  4. A great learning opportunity and a chance to write about it.
  5. It makes sense financially. I spent $50 on memory, which is cheaper than most hosting programs.

For those of you who don’t know, Xen is a virtualization technology that allows you to host “Guest” operating systems on a single piece of hardware.  You have your initial OS that you boot into as you normally would, then you can boot additional systems on top of the original system that independently.  These systems are fully operational and can do pretty much anything a non Guest OS can do.  The systems share the available hardware resources but the performance hit is minimal.

Throughout the next few weeks I will be putting up a series of posts that will describe the steps it takes to create what in my opinion is the ultimate Linux server.

Be the first to comment

This work by Conner McCall is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License