This site functions as an archive of Conner's Blog, which was a blog from 2006-2014 located at http://connermccall.com. Images and links are likely to be broken.

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.


Comments