This is a premium alert message you can set from Layout! Get Now!

How to setup Domain Name System (DNS) on Solaris 10

Anup
1
We will use Perl script called “h2n” that creates the appropriate files for a DNS server.


Download h2n Scripts---Click Here


Step 1:- Edit /etc/hosts file


  • The new domain server will be on system 192.168.137.25 which is called SCAN.
  • The following /etc/host file has been edit to contain all the DNS entries that are required:
192.168.137.25  scan.indiandba.com      scan
  • Assume domain name is to be indiandba.com
  • Assume network is 192.168.137
  • Create a domain run directory to contain the Named services files called /var/named.


Step 2:- Create named directory and copy h2n script
$ mkdir -p /var/named
$ cp /h2n /var/named


Step 3:- Run the h2n script file as follows:
$cd /var/named
$
./h2n -d indiandba.com -n 192.168.137 -u oracle@indinadba.com


Step 4:- Download “named.root” file, rename the file to db.cache and copy to the /var/named directory.


Step 5:- Copy named.conf file to /etc directory
    $ cp /var/named/named.conf /etc


Step 6:- Edit the file /etc/nsswitch.conf and add the entry dns to the host entry as follows:
====================================================================
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd:     files
group:      files
 
hosts:      files    dns 
networks:   files
protocols:  files
:          :          :          :          :          :
:          :          :          :          :          :
=====================================================================


Step 7:- Create or edit a file called /etc/defaultdomain and add the single entry:


$vi /etc/defaultdomain
indiandba.com


Step 8:- Execute the domainname command to set the domain as follows:


$domainname ‘cat /etc/defaultdomain’


Step 9:- Edit /etc/resolv.conf file


$vi /etc/resolv.conf
domain indiandba.com
nameserver      192.168.137.25


Step 10:- Start Named Services
$/usr/sbin/in.named &


Step 11:- To enabled the respository use


$svcs -a | grep dns

disabled         10:15:21 svc:/network/dns/server:default
disabled         10:15:22 svc:/network/dns/client:default

$svcadm enable /network/dns/server

$svcs -a | grep dns
online           10:15:21 svc:/network/dns/server:default 
online           10:15:22 svc:/network/dns/client:default 

Note:---- /network/dns/server must be online for DNS to run properly and initiate if the DNS server is rebooted.

Step 12:- Configurating Clients to use DNS To use DNS, clients need to modify the /etc/resolv.conf, and /etc/nsswitch.conf as above. The /etc/defaultdomain file must also be created and establsihed as above.




Tags

Post a Comment

1 Comments

Please Select Embedded Mode To show the Comment System.*

Join the conversation(1)
To Top