Wednesday, October 2, 2013

[RAC 11g R2] How to add DNS server and change domain name on HP-UX Itanium

It's been a while... 

So..... recently, I was installing a Oracle RAC 11gR2, for this version you need to configure on the DNS Server  3 IP Addresses for the SCAN (Single Client Access Name). You will need to configure the DNS address and the domain name on you server, and that's the mission of this post.

First you will need to log in with root user, then...

1. From the prompt execute the next command:

# sam

Once you execute the command above, you will see a menu like the following, 
Select n (Networking and Communications)






2.  Select s - Network Services Configuration



3. Selec d - DNS (BIND)




3. Then.. r - DNS Resolver



4. Use your  tab key to move to the menu, and go to Actions > Specify Name Servers... 

5. It will display this screen, and you have to type the DNS IP Address.


Once you edit your DNS server, a file named resolv.conf will be created in /etc (in other terminal, verify that, it should contain the domain and the nameserver [DNS server]).

To exit this screen go to File > Exit

6. You can also specify the Default Domain name for your HP-UX server, go to the same Action menu: Actions > Specify Name Servers... 



After you apply this change, it should warn you about that the "resolve.conf" have been modified.

7.  With esc  return to the d - DNS (BIND) screen  (step 3) and select the l - DNS Local Name Server to Start the DNS Name Server from the Action menu.

After all this configuration, you should ping the SCAN and it "should" respond.... "it should", happens that in HP-UX there is no /etc/nsswitch.conf created, not yet. 

There is another file /etc/nsswitch.files that you will need to copy and named it nsswitch.conf:

# cp -p /etc/nsswitch.files /etc/nsswitch.conf

This file will contain the following:

#
# /etc/nsswitch.files:
#
# @(#)
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd:       files
group:        files
hosts:        files
ipnodes:      files
services:     files
networks:     files
protocols:    files
rpc:          files
publickey:    files
netgroup:     files
automount:    files
aliases:      files


you need to go to the hosts line and add dns, like this:

#
# /etc/nsswitch.files:
#
# @(#)
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd:       files
group:        files
hosts:        files dns
ipnodes:      files
services:     files
networks:     files
protocols:    files
rpc:          files
publickey:    files
netgroup:     files
automount:    files
aliases:      files


After this you will be able to ping your SCAN and your installation should go smooth till the end...

Enjoy!

Thanks to +Hiroshi Komatsu