The steps for creating a DNS for scan IP of RAC 11Gr2

来源:互联网 发布:马尔可夫 知乎 编辑:程序博客网 时间:2024/06/13 18:49

# more /etc/hosts
::1 localhost
127.0.0.1 localhost
10.80.189.29 perf-5240-2 perf-5240-2.central.sun.com loghost
10.80.189.25 perf-5240-1 perf-5240-1.central.sun.com #PSR - perf-5240-1
10.80.189.26 perf1-vip vip1.central.sun.com #PSR RAC vIP
10.80.189.29 perf-5240-2 perf-5240-2.central.sun.com #PSR - perf-5240-2
10.80.189.30 perf2-vip vip2.central.sun.com #PSR RAC vIP
172.16.1.1 private1 private1.central.sun.com
172.16.1.2 private2 private2.central.sun.com
#scan IP's
10.80.189.175 psr-scan psr-scan.central.sun.com
10.80.189.176 psr-scan psr-scan.central.sun.com
10.80.189.177 psr-scan psr-scan.central.sun.com

Login as root user in a Terminal follow below steps:
Enable the dns/server service using svcadm command line utility.
root# svcadm enable dns/server
root# svcs -l dns/server #=> Check the status of DNS server
--Check DNS service----
# svcs -l dns/server
fmri svc:/network/dns/server:default
enabled true
state online
next_state none
state_time June 8, 2011 08:31:19 AM UTC
logfile /var/svc/log/network-dns-server:default.log
restarter svc:/system/svc/restarter:default
contract_id 1057
dependency require_all/none svc:/system/filesystem/local (online)
dependency require_any/error svc:/network/loopback (online)
dependency optional_all/error svc:/milestone/network (online)
Download h2n.tar.gz in the shared folder from ftp://ftp.hpl.hp.com/pub/h2n/h2n.tar.gz//// - Copy & extract h2n.tar.gz in /tmp
root #cp /hgfs/shared/h2n.tar.gz /tmp;cd /tmp;gunzip h2n.tar.gz;tar -xvf h2n.tar
- Create /var/named directory & copy h2n as root
root # mkdir -p /var/named
root # cp /tmp/h2n-2.56/h2n /var/named
- Create DNS configuration files on vmutil
root# cd /var/named
root# ./h2n -d central.sun.com -n 10.80.189 172.16.1 -u hostmaster.central.sun.com
Above command will generate the below files in /var/named directory
- Download "named.root" file from ftp://ftp.rs.internic.net/domain
root# cp named.root /var/named/db.cache
root# cp /var/named/named.conf /etc/
-- Edit /etc/nsswitch.files to add the entry dns to the host entry as
"hosts: files dns"
---log--
passwd: files
group: files
hosts: files dns
ipnodes: files
---log--
- Create or Edit a file called /etc/defaultdomain and add the single entry
root# echo "mydom.com" > /etc/defaultdomain
- Edit /etc/resolv.conf on vmutil
root# echo "domain mydom.com" >> /etc/resolv.conf
root# echo "nameserver 10.80.189.29" >> /etc/resolv.conf
- Restart the named service on vmutil.
root# svcadm disable dns/server;svcadm enable dns/server
- Verify if DNS is working (forward & reverse lookup)
---log--
# nslookup perf-5240-2
Server: 10.79.9.12
Address: 10.79.9.12#53

Name: perf-5240-2.central.sun.com
Address: 10.80.189.29