This is part one to setting up a basic, all-in-one server under Mac OS X. We’re going to investigate how the Mac stacks up as a server in setup and customization. For the most part, I’m going to assume you’ve either heard about or tinkered with these tools in some other *nix before.
( Skip to Quick Setup Guide! )
Let’s use an example setup. You have one computer, a mac, that you want to run apache and maybe some other services on. You also want to host your own domain. You’re probably going to want to decide how the domain is going to be organized ahead of time. This makes things a lot easier when you go to setup the actual domain structure in BIND. But lets get down to some basics about DNS first.
About DNS
In order for networked computers to translate between a shortcut name, like google.com, and a real IP address, they have to contact a Domain Name Server. DNS servers keep a list of what computer names are associated with what address. There is a lot (a lot!) more to know about DNS than this, so I refer you to the info list at the bottom for more. Ok, so how do we do this?
What you need
- a domain name which has been registered for you to an IP you are using on your server.
- a mac
- know what hosts you need. Hosts come in front of the domain, like www or mail.
Putting it together, an example
Our example is an all-in-one web, mail, and dns server. We’re going to call it kiwimod.com. OS X comes with the DNS server application, Bind, already installed and ready. (Bind and Named, pronounced name-d, are two names for one service.) We just have to add some information to the configure files to be off and running. Take a look at /etc/named.conf
Named.conf has the information about what domains your site is running and what files contain the configuration settings. In this file what you have to do is add a zone for each domain and each IP address your going to setup. Let’s use our example domain, kiwimod.com.
Continue to the DNS setup guide…
Running the daemon
Once you’re satisfied with your setup you want to make sure Bind starts up whenever your computer does. To do this, you need to add a startup script to your mac’s startup items. We’ll cover that in another guide. See you next time!