Skip to main content Help Control Panel

Rod Morison Software —  Technotes

Home «   Linux «   Sysadmin «  

The Internet Server Project - Part IV - DNS, WWW, Mail & Other Projects


Ok, you're on the net! You're just as accessible as Yahoo and Google...well, not exactly, you need to tie your domain name to your static IP address. Then, email service for that domain, and your domain really will be on the net.

DNS

Get past those numeric IPs. You should have the BIND software installed from your initial OS setup. There are two really good graphical interfaces to BIND, Yast (built into Suse, run "yast2" as root) and webmin

In spite of those interfaces, first time out, use the text config files. Understand them. BIND and these files are a core internet technology. You'll need a text editor and have have to learn a little vi, emacs or whatever you come to prefer. Make sure you've read or know most of the first 5 chapters of the class tome on DNS, DNS & BIND. With that reference you should be able to follow the default BIND config (and following the references) in /etc/named.conf. Be sure to "point" your domain and www.yourdomain.com to your static IP. Also, set the MX to yourdomain.com. I also recommend you reverse map your static IP to yourdomain.com. Having this can keep you out of trouble with certain spam sensitive mail servers, like AOL's. Your ISP controls the reverse DNS, but good ISPs like www.speakeasy.net will map it for you.

When you can run
dig +trace @localhost yourdomain.com  #substitute your domain here.
from your DNS server and watch it go to the root nameservers, then back to your server to fulfill the request...well I was pretty jazzed when I saw that for the first time, but maybe that's just me.

Apache Web Server

If you succeeded previously, you should have been able to browse your server by IP address. With the DNS setup done, try http://www.yourdomain.com. If that doesn't work, time to brush off those debugging skills.

If everything is working you can start putting your own html into /srv/www/htdocs, starting with the index.html file. (Fedora and others put the default webdir in other places.)

Next step with Apache is to learn some config. Start with a browse through the current Apache docs (2.2 at the time of this writing.) I always end up here, in spite of having used a few texts on Apache.

A great exercise is to start at the root config file, /etc/apache2/httpd.conf, and look up the docs for the directives (on http://httpd.apache.org/docs). Be sure to follow the includes through the config tree. You'll learn a lot, and probably get ideas for how you can use your web server.

Here are some experiments to try with Apache. Most of them are straightforward if you've traced through the default httpd.conf...many are just a matter of uncommenting a few lines:

Email Setup

To setup email is beyond the time & scope of this article. I'll eventually writeup my Postfix, Cyrus IMAP/POP, SpamAssassin, Horde setup. These websites (and a bit of googling) have reasonable documentation. The hard part is stitching it all together and locking it down.

Each of these pieces can be built from source or installed via the Suse package manager, yast2. My older setup builds everything from source. Shortly, I'll be attempting a build from the Suse packages.

Finally, my selection of email programs is far from authoritative. Qmail + exim is an increasingly popular imap/pop solution, purportedly easier to configure than Cyrus. Courier IMAP is another option which I'm going to take a close look at for my next mail server build.

For server spam scanning, SpamAssassin is hard to beat. With Razor, Pyzor and DCC, along with RBLs setup in Postfix identifies spam better than most ISP systems.

There are many webmail systems out there. I use Horde because it was the best available 7 years ago. Squirrelmail is a great, easy to install & use, mail-only webapp. Zimbra is one of the slickest AJAX webmail's out there. (I haven't yet installed Horde's AJAX interface, dimp, which is in alpha now, and likely in beta or production by the time you read this text.

A Recommended Reference

As I was completing the final edits to these articles, I came across an outstanding, step by step guide The Perfect Server - Suse 10.3 (Suse 10.2 version). Though I haven't tried or read the build in detail, it looks like an excellent source of information, and is very step by step.

This reference may be especially helpful for mail server setup.

The Fun Never Ends...

Here are a bunch of additional projects you can partake in, depending on your interests.

Software Development


-  Setup a Subversion or Perforce SCM server. (Subversion is always free, while Perforce has a free version for 1-2 users and is one of the best SCM's in the biz. See SCM - My Quick Take for my opinion on that subject.)
-  Setup a Trac project management, wiki & issue tracking site. If you've got Perforce going, use the Trac Perforce Plugin for source browsing. Then, add a script that connects perforce changes (jobids) to Trac defects for in wiki changeset browsing: It's called PerforceJobScript.
-  Install the Firebug add-on into your Firefox browser Firefox (or the ID Dev Toolbar for IE and learn css & javascript writing a cool, interactive webpage.
-  If you're into Java webdev, get Tomcat up and proxy it with your Apache.

Content Publishing, i.e., Wikis & Blogging


-  Install YACS , the CMS that runs this website. Alternatively, try one or more other wiki/blog/content sites: http://en.wikipedia.org/wiki/Blog_hosting_service. I like Wordpress as an easy to use & config, personal blog package.)

Media Streaming


-  Bring up the open source version of Apple's quicktime streaming server. Or, try going for a Real or Adobe's Flash server.
-  If you can stream flash (.flv) files (YACS does quite nicely!), try deploying a neat open source flash player, like Xspf Jukebox To produce .flv's from .mov's (or whatever), try Riva, which is a truly free encoder, with some power commercial upgrades.

The End

I hope you've found this interesting, helpful and/or inspiring. Comments are welcome.

Previous Page

Stay tuned
recent comments
podcasted files
AddThis.com