Please note, I'm not entirely great at writing "how-to's", etc...
But I'll explain things as best as a can, and others can easily point out my mistakes to make it better
Also, you MUST be logged in as the "root" user to do any of this.
[Instructrions for Mandrake, adapt to your own distro]
Note: This assumes bind is already installed on your system.
/etc/named.conf :
Make sure you have somethin like...
Code:
key "key" {
<b><u>This spot has random stuff that you don't want others to have</u></b>
}
Right under this:
Code:
zone "." {
type hint;
file "named.ca";
};
Add the following:
zone "xeraweb.com" {
type master;
file "named.xeraweb";
};replace "xeraweb.com" below with your domain. the
file "named.xeraweb" should be changed to whatever you want,
preferrably "named.yourdomainwithoutthedotcom", make note of
what you put, it's important.now, do a "cd /var/named"
create / edit the file you put in your domain's zone (in this instance, it's "named.xeraweb".
You should now be editting a completely blank file.
Here's an example one with a breakdown (italics are what YOU need to change)
Code:
$TTL 3d
@ IN SOA <i>xeraweb.com</i>. <i>griswald.xeraweb.com</i>. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
NS <i>dns1.xeraweb.com</i>.
NS <i>dns2.xeraweb.com</i>.
NS <i>dns3.xeraweb.com</i>.
MX <i>mail.xeraweb.com</i>. ; Mail-Exchanger
<i>dns1.xeraweb.com</i>. A <i>64.62.190.178</i>
<i>dns2.xeraweb.com</i>. A <i>64.62.190.178</i>
<i>dns3.xeraweb.com</i>. A <i>64.62.190.178</i>
<i>xeraweb.com</i>. A <i>64.62.190.178</i>
<i>www.xeraweb.com</i>. A <i>64.62.190.178</i>
<i>ffxtreme.xeraweb.com</i>. A <i>64.62.190.178</i>
<i>mail.xeraweb.com</i>. A <i>64.62.190.178</i>
Now, to explain....
the first line, you replace "xeraweb.com" with your own personal domain (can be .org, .net, etc). The "griswald.homelinux.com" is admin purposes, just change it to "adminname.yourdomain.com" replacing it as you like.
The "NS" lines stand for "Name-server", in my case, since I use GoDaddy, I created my nameservers through them (DNS1, DNS2, DNS3), and pointed my domain to those nameservers. Instructions to do that will not be posted, but make sure you change these to your nameservers (You usually need ATLEAST two, even if they point to the same domain, and if you DO only have two nameservers, make sure there are only two NS lines).
The "MX" line stands for "Mail-eXchanger" (the M and X capitalized purposely), and tells the system where to send incoming mail too. I forward my mail to a friends comp since he does my mail services (IP is shown as the same as the other ip's in this instance)
You can set the "MX" line to point to a subdomain you want, or to a specific IP, it's up to you.
The "A" lines are the majorly important stuff after you got the main stuff down. These are the actual DNS records (
www.xeraweb.com, mail.xeraweb.com, etc). MAKE SURE you have an "A" line for your nameservers if they are on your domain, and also make sure you have all subdomains listed in an "A" line. All you really need to do is change/add the subdomain/DNS and the IP, and it should be good and done. Remember that the periods (.) that appear in ALL above examples MUST be there for bind to work properly.
With each domain, you must do the above over and over.
When done with your configuring, type "cd /etc/init.d", then type "./named restart".
You should see somethin like....
Quote:
Stopping named: [OK]
Starting named: [OK]
Now, from within your shell, type "ping
www.yourdomain.com" to see if it works!
-- Griswald