Wednesday, September 26, 2007

How-to-Setup-your-own-primary-and-secondary-name-servers

Simple Steps in creating your own name servers on redhat-release box.
STEP 1
Requirements:
Server with additional free virtual IP address.
Make sure that you have your domain and the associated name servers registered through your registrar such as enom, networksolutions, etc. Also make sure that the name servers reolves to your server.
First we need to get the following bind packages, Which can be installed using "yum install " command or using the command "up2date -i ".
After the install process is complete, you can check if the packages are installed using the command below. The below command shows that the packages are installed on the severs.
# rpm -qa|grep bind
bind-devel-9.2.1-16
bind-utils-9.2.1-16
bind-9.2.1-16
redhat-config-bind-1.9.0-13
STEP 2
After the above packages are installed we need to open/edit the file /etc/named.conf and then create a entry for our primary and secondary name servers.


Let's Assume our Primary and Secondary name Servers as follows.
Primary NameServer : ns0.armia8dns.com 192.168.0.8
Secondary Name Server : ns1.armia8dns.com 192.168.0.9
Now add the name servers ns0.armiadns.com and ns1.armiadns.com...
[~]# vi /etc/named.conf


zone "ns0.armia8dns.com" {
type master;
file "/var/named/ns0.armia8dns.com.db";
};
STEP 3
The 3rd step is to create the db file for the above dns in /var/named/
[~]# vi /var/named/ns0.armia8dns.com.db



$ORIGIN .
$TTL    86400
ns0.armia8dns.com     IN SOA  ns0.armia8dns.com.    root.armia8.com. (
42              ; serial (d. adams)
3H              ; refresh
15M             ; retry
1W              ; expiry
1D )            ; minimum

IN   NS           ns0.armia8dns.com.
IN   NS           ns1.armia8dns.com.
IN   A            192.168.0.8
IN   MX         0 ns0.armia8.com.
$ORIGIN ns0.armia8dns.com.
localhost                 A            127.0.0.1
STEP 3 A
Now again for ns1.armia8dns.com add the entry in /etc/named.conf as shown below
zone "ns1.armia8dns.com" {
type master;
file "/var/named/ns1.armia8dns.com.db";
};
STEP 3 B
Again create a file named /var/named/ns1.armia8dns.com.db

[~]# vi /var/named/ns1.armia8dns.com.db



$ORIGIN .
$TTL    86400
ns1.armia8dns.com   IN SOA  ns0.armia8dns.com.       root.armia8.com. (
42              ; serial (d. adams)
3H              ; refresh
15M             ; retry
1W              ; expiry
1D )            ; minimum

IN   NS           ns0.armia8dns.com.
IN   NS           ns1.armia8dns.com.
IN   A            192.168.0.9
IN   MX         0 ns1.armia8.com.
$ORIGIN ns1.armia8dns.com.
localhost                   A            127.0.0.1
STEP 4
Now we can start named on the server and see if armia8dns works fine or not, we can use the dig command or the command such as ping to test this.
#dig ns0.armia8dns.com   and dig ns1.armia8dns.com
ADDING A DOMAIN TO THE DNS FILE AND TO /var/named
STEP 5
The 4th step is to add a new domain "terminal.org" to the dns.
STEP 6
Open the file /etc/named.conf and add the following line to the file named.conf
[~]# vi /etc/named.conf




zone "terminal.org" {
type master;
file "/var/named/terminal.org";
};
STEP 7...
The 7th step is to create the db file for the above domain "terminal.org" dns in /var/named/
[~]# vi /var/named/terminal.org.db



$TTL    86400
@          IN SOA  ns0.armia8dns.com.               root.armia8.com. (
42              ; serial (d. adams)
3H              ; refresh
15M             ; retry
1W              ; expiry
1D )            ; minimum

terminal.org.                  IN         NS           ns0.armia8dns.com.
terminal.org.                  IN         NS           ns1.armia8dns.com.
terminal.org.                  IN         A            192.168.0.8
localhost.terminal.org.        IN         A            127.0.0.1
terminal.org.                  IN         MX 0          terminal.org.
www                          IN         CNAME           terminal.org.
mail                         IN         CNAME           terminal.org.
STEP 8
Restart the dns server and then try to check the domain terminal.org
STARTING BIND SERVER
/etc/init.d/named restart
service named restart
rndc reload
STEP 9
Now if you would like to add subdomain entries...do use the following entries in the file /etc/named/terminal.org.db
admin                        IN      A  192.168.0.8
www.admin                    IN      A  192.168.0.8
ads                          IN      A  192.168.0.8
www.ads                      IN      A  192.168.0.8
check to see if /etc/resolv.conf are setup correctly for DNS .
Name Server not Working : Check /var/log/messages for error logs, most of the problems are resolved by checking the error log files.

1 comment:

Anonymous said...

If the goal for your music is charting you will need to make sure that all of the radio stations you submit to, report to the same charts.

Adult Education - 1984 - a second single from the greatest hits album, "Rock And Soul, Pt. You should narrow down your potential list of schools based on your criteria, but you should still plan on visiting more than one to give you a sense of comparison.

Check out my web blog: Free Download Top 20 Music