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
- Mysql or other database is usually necessary
- SSH Access
- Mail Transport
- I use Qmail, but there are many options
- Dns Caching
- I prefer Tiny-DNS, Bind is also a good choice
- File Server
- I use SSH for file transfers and you should to
- Streaming Media
- Lots of options, ampache and Jinzora are who popular ones.
Some other services that I install to keep an eye on things
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
- Pegasus: Web Server
- Hades: File Server
- rtorrent - This makes the most sense here as we will want to access the files downloaded from other systems
- Athena: Monitoring and support services
- Apache - To allow for remote viewing of system status
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.