Setup DNS Server and configure scan ips and modify the scan details in 11g grid (11.2)
======================================================================================
In this post we are going to discuss about below
* How to setup the yum installer.
* How to Configure DNS server.
* How to add the Client server details in the DNS Server.
* How to Modify the SCAN IP details in the 11gr2 Grid Infrastructure.
OS - RHEL 5.7
Prepare Yum Install.
===================
1. Mount the RHEL ISO DVD on the server.
2. [root@standalone2 media]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@standalone2 media]# cd /mnt
3. Install the FTP Server.
[root@standalone2 Server]# ls -lrt vsf*
-r--r--r-- 75 root root 143483 May 24 2011 vsftpd-2.0.5-21.el5.x86_64.rpm
[root@standalone2 Server]# rpm -ivh vsftpd-2.0.5-21.el5.x86_64.rpm
warning: vsftpd-2.0.5-21.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
4. Copy the files under Server / images directory and RPM-GPG-KEY files to /var/ftp/pub directory.
[root@standalone2 Server]# cp -av /mnt/Server /var/ftp/pub/
[root@standalone2 Server]# cp -av /mnt/images /var/ftp/pub/
[root@standalone2 Server]# cp -av /mnt/RPM-GPG-KEY* /var/ftp/pub/
5. Install the create repository package.
[root@standalone2 ~]# cd /var/ftp/pub/Server/
[root@standalone2 Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
6. Create a Repository for the /var/ftp/pub directory
[root@standalone2 Server]# createrepo -v /var/ftp/pub
[root@standalone2 Server]# createrepo -g /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /var/ftp/pub/
[root@standalone2 Server]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
7. Create an Repository file with below contents.
[root@standalone2 Server]# vi /etc/yum.repos.d/Server.repo
[ser]
name=standalone2.manzoor.com
baseurl=file:///var/ftp/pub
enabled=1
gpgcheck=0
8. Check yum installer tool by uninsalling and reinstalling a package
[root@standalone2 Server]# yum remove telnet
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-39.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Removing:
telnet x86_64 1:0.17-39.el5 installed 105 k
Transaction Summary
=============================================================================================================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : telnet 1/1
Removed:
telnet.x86_64 1:0.17-39.el5
Complete!
[root@standalone2 Server]# yum install telnet
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Server | 1.1 kB 00:00
Server/primary | 1.1 MB 00:00
Server 3261/3261
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-39.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
telnet x86_64 1:0.17-39.el5 Server 60 k
Transaction Summary
=============================================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 60 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : telnet 1/1
Installed:
telnet.x86_64 1:0.17-39.el5
Complete!
[root@standalone2 Server]# yum update
======= yum configuration completed =========================
DNS Server Configuration
========================
1) Install the necessary rpm (bind packages) which are required to configure DNS Server.
[root@standalone2 ~]# yum install -y *bind* caching-nameserver
2) Notedown the Public IP address of the Server.
[root@standalone2 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:86:F8:24
inet addr:192.168.0.30 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe86:f824/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26338 errors:0 dropped:0 overruns:0 frame:0
TX packets:40786 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1764870 (1.6 MiB) TX bytes:8763994 (8.3 MiB)
IP Address - 192.168.0.30
3) Modify the named.conf coniguration files
[root@standalone2 ~]# cd /var/named/chroot/etc/
[root@standalone2 etc]# ls -lrt
total 16
-rw-r----- 1 root named 955 Dec 2 2010 named.rfc1912.zones
-rw-r----- 1 root named 1230 Dec 2 2010 named.caching-nameserver.conf
-rw-r--r-- 1 root root 2819 Oct 13 2012 localtime
-rw-r----- 1 root named 113 Oct 4 21:52 rndc.key
[root@standalone2 etc]# cp named.caching-nameserver.conf named.conf
[root@standalone2 etc]# vi named.conf
# edit the named.conf file...
Modify the below lines...
Before Modification
===================
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
allow-query { localhost; };
allow-query-cache { localhost; };
match-clients { localhost; };
match-destinations { localhost; };
After Modificaton
=================
listen-on port 53 { 192.168.0.30; };
# listen-on-v6 port 53 { ::1; };
allow-query { any; };
allow-query-cache { any; };
match-clients { any; };
match-destinations { 192.168.0.30; };
[root@standalone2 etc]# ls -lrt
total 20
-rw-r----- 1 root named 955 Dec 2 2010 named.rfc1912.zones
-rw-r----- 1 root named 1230 Dec 2 2010 named.caching-nameserver.conf
-rw-r--r-- 1 root root 2819 Oct 13 2012 localtime
-rw-r----- 1 root named 113 Oct 4 21:52 rndc.key
-rw-r----- 1 root root 1219 Oct 4 22:46 named.conf
4. Edit the zones files.
[root@standalone2 etc]# vi named.rfc1912.zones
# Now edit the zone file
Mofiy the below lines.
Before Modification.
====================
zone "localdomain" IN {
file "localdomain.zone";
zone "0.0.127.in-addr.arpa" IN {
file "named.local";
After Modification
===================
zone "manzoor.com" IN {
file "forward.zone";
zone "0.168.192.in-addr.arpa" IN {
file "reverse.zone";
[root@standalone2 etc]# chgrp named named.conf
[root@standalone2 etc]# ls -lrt
total 20
-rw-r----- 1 root named 1230 Dec 2 2010 named.caching-nameserver.conf
-rw-r--r-- 1 root root 2819 Oct 13 2012 localtime
-rw-r----- 1 root named 113 Oct 4 21:52 rndc.key
-rw-r----- 1 root named 1219 Oct 4 22:46 named.conf
-rw-r----- 1 root named 954 Oct 4 23:20 named.rfc1912.zones
[root@standalone2 etc]# cd /var/named/chroot/var/named
[root@standalone2 named]# ls -lrt
total 36
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
drwxrwx--- 2 named named 4096 Aug 25 2004 data
-rw-r----- 1 root named 427 Dec 2 2010 named.zero
-rw-r----- 1 root named 426 Dec 2 2010 named.local
-rw-r----- 1 root named 424 Dec 2 2010 named.ip6.local
-rw-r----- 1 root named 1892 Dec 2 2010 named.ca
-rw-r----- 1 root named 427 Dec 2 2010 named.broadcast
-rw-r----- 1 root named 195 Dec 2 2010 localhost.zone
-rw-r----- 1 root named 198 Dec 2 2010 localdomain.zone
-- Before in the zone file we have changed the localdoamin.zone to forward.zone and named.local to reverse.zone
so copy the below files with the mentioned name and edit it
[root@standalone2 named]# cp localdomain.zone forward.zone
[root@standalone2 named]# cp named.local reverse.zone
[root@standalone2 named]# vi forward.zone
# Whole file before modification.
================================
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
# whole file after modification.
================================
$TTL 86400
@ IN SOA standalone2.manzoor.com. root.standalone2.manzoor.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS standalone2.manzoor.com.
standalone2 IN A 192.168.0.30
[root@standalone2 named]# vi reverse.zone
# Whole file before modification.
================================
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
# whole file after modification.
================================
$TTL 86400
@ IN SOA standalone2.manzoor.com. root.standalone2.manzoor.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS standalone2.manzoor.com.
30 IN PTR standalone2.manzoor.com.
-- in the above 30 is the last pointer in the ip address 192.168.0.30
-- Change the group of forward.zone and reverse.zone files to named group.
[root@standalone2 named]# chgrp named forward.zone
[root@standalone2 named]# chgrp named reverse.zone
[root@standalone2 named]# ls -lrt
total 44
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
drwxrwx--- 2 named named 4096 Aug 25 2004 data
-rw-r----- 1 root named 427 Dec 2 2010 named.zero
-rw-r----- 1 root named 426 Dec 2 2010 named.local
-rw-r----- 1 root named 424 Dec 2 2010 named.ip6.local
-rw-r----- 1 root named 1892 Dec 2 2010 named.ca
-rw-r----- 1 root named 427 Dec 2 2010 named.broadcast
-rw-r----- 1 root named 195 Dec 2 2010 localhost.zone
-rw-r----- 1 root named 198 Dec 2 2010 localdomain.zone
-rw-r----- 1 root named 258 Oct 4 23:25 forward.zone
-rw-r----- 1 root named 482 Oct 4 23:28 reverse.zone
[root@standalone2 named]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
##################################################
#### Public ips #################################
192.168.0.30 standalone2.manzoor.com standalone2
5) Edit the resolv.conf file modify the localdomain to your domain name
and the nameserver ip address to the public ip of this server.
[root@standalone2 named]# vi /etc/resolv.conf
# Edit file as per below details.
search manzoor.com
nameserver 192.168.0.30
-- Host name should be updated in network file as below
[root@standalone2 named]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=standalone2.manzoor.com
-- Restart the named service
[root@standalone2 named]# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]
-- Test the dns
[root@standalone2 named]# dig standalone2.manzoor.com
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> standalone2.manzoor.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- 6354="" div="" id:="" noerror="" opcode:="" query="" status:="">
->
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;standalone2.manzoor.com. IN A
;; ANSWER SECTION:
standalone2.manzoor.com. 86400 IN A 192.168.0.30
;; AUTHORITY SECTION:
manzoor.com. 86400 IN NS standalone2.manzoor.com.
;; Query time: 4 msec
;; SERVER: 192.168.0.30#53(192.168.0.30)
;; WHEN: Fri Oct 4 23:32:47 2013
;; MSG SIZE rcvd: 71
- We got the answer without error.
[root@standalone2 named]# nslookup standalone2.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: standalone2.manzoor.com
Address: 192.168.0.30
[root@standalone2 named]# nslookup 192.168.0.30
Server: 192.168.0.30
Address: 192.168.0.30#53
30.0.168.192.in-addr.arpa name = standalone2.manzoor.com.
== DNS Configuration for the server has been completed =====================
Steps to Add client to the DNS server.
======================================
1) Update the client server details in the forward.zone file.
Here our clinet server is hostname is urac1rac2-scan.manzoor.com and the IP address for
this host is 192.168.0.27 / 192.168.0.28 and 192.168.0.29
-- Note in this eg. we are using three ip address for the same host beacuse we are
going to setup scan ip for the Oracle 11g grid.
2. Edit the forward zone file and add the client server hostname and ip address as below.
[root@standalone2 named]# vi forward.zone
$TTL 86400
@ IN SOA standalone2.manzoor.com. root.standalone2.manzoor.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS standalone2.manzoor.com.
IN NS urac1rac2-scan.manzoor.com.
standalone2 IN A 192.168.0.30
urac1rac2-scan IN A 192.168.0.27
urac1rac2-scan IN A 192.168.0.28
urac1rac2-scan IN A 192.168.0.29
-- Note
NS -- Denotes Named server
A -- Denotes Address.
We have updated the NS and A for the client.
2) Update the clienter server details in the reverse.zone file.
[root@standalone2 named]# vi reverse.zone
$TTL 86400
@ IN SOA standalone2.manzoor.com. root.standalone2.manzoor.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS standalone2.manzoor.com.
IN NS urac1rac2-scan.manzoor.com.
30 IN PTR standalone2.manzoor.com.
27 IN PTR urac1rac2-scan.manzoor.com.
28 IN PTR urac1rac2-scan.manzoor.com.
29 IN PTR urac1rac2-scan.manzoor.com.
-- Note
PTR -- Here the PTR denotes the last pointer of the IP address.
4) Now Test this
[root@standalone2 named]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
** server can't find urac1rac2-scan.manzoor.com: NXDOMAIN
[root@standalone2 named]# service named restart
Stopping named: [ OK ]
Starting named:
-- We have assigned three ips for urac1rac2-scan.manzoor.com so it should listen is round robin fashion.
[root@standalone2 named]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.27
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.28
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.29
[root@standalone2 named]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.28
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.29
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.27
[root@standalone2 named]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.29
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.27
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.28
Update the /etc/resovl.conf file in the client to update the DNS server address.
----- Client Configuration in DNS Server is Completed ------------------------------------
Updating the SCAN IP in 11gr2 Grid.
===================================
Currently we have a two node rac setup running with one scan since we dont have dns,
and have used the /etc/hosts file for resolving the SCAN ip.
Now we have setup the DNS server and have updated three ips for scan (urac1rac2-scan.manzoor.com).
Current scan detail in Grid.
[oracle@rhel11gr2rac1 bin]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rhel11gr2rac2
[oracle@rhel11gr2rac1 bin]$ ./srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rhel11gr2rac2
[oracle@rhel11gr2rac1 bin]$ srvctl config scan
SCAN name: urac1rac2-scan.manzoor.com, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /urac1rac2-scan.manzoor.com/192.168.0.28
-- As we see currently its running with 1 ip 192.168.0.28
1) Update the DNS server ip details on both the rac nodes.
[root@rhel11gr2rac1 ~]# vi /etc/resolv.conf
search manzoor.com
nameserver 192.168.0.30
[root@rhel11gr2rac2 ~]# vi /etc/resolv.conf
; generated by /sbin/dhclient-script
search manzoor.com
nameserver 192.168.0.30
2) Check whether the nslookup is returning the details properly.
[root@rhel11gr2rac2 ~]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.28
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.29
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.27
[root@rhel11gr2rac2 ~]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.29
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.27
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.28
[root@rhel11gr2rac2 ~]# nslookup urac1rac2-scan.manzoor.com
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.27
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.28
Name: urac1rac2-scan.manzoor.com
Address: 192.168.0.29
3) Remove the Scan entry from /etc/hosts file on all the nodes.
4) Stop the scan listener and scan.
[oracle@rhel11gr2rac1 bin]$ ./srvctl stop scan_listener
[oracle@rhel11gr2rac1 bin]$ ./srvctl stop scan
5) Modify scan as root user.
[root@rhel11gr2rac1 bin]# ./srvctl modify scan -n urac1rac2-scan.manzoor.com
[oracle@rhel11gr2rac1 bin]$ ./srvctl modify scan_listener -u
6) Start the Scan listener.
[oracle@rhel11gr2rac1 bin]$ ./srvctl start scan_listener
6) Check the status of the scan.
[oracle@rhel11gr2rac1 bin]$ ./srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rhel11gr2rac1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rhel11gr2rac2
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rhel11gr2rac1
[oracle@rhel11gr2rac1 bin]$ ./srvctl config scan
SCAN name: urac1rac2-scan.manzoor.com, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /urac1rac2-scan.manzoor.com/192.168.0.28
SCAN VIP name: scan2, IP: /urac1rac2-scan.manzoor.com/192.168.0.29
SCAN VIP name: scan3, IP: /urac1rac2-scan.manzoor.com/192.168.0.27
[oracle@rhel11gr2rac1 bin]$ ./srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rhel11gr2rac1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rhel11gr2rac2
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rhel11gr2rac1
-- Scan configuration has been completed.
Reference:-
How to Modify SCAN Setting or SCAN Listener Port after Installation (Doc ID 972500.1)
Linux: How to Configure the DNS Server for 11gR2 SCAN (Doc ID 1107295.1)
How To Convert an 11gR2 GNS Configuration To A Standard Configuration Using DNS Only[Article ID 1489121.1
http://www.youtube.com/watch?v=XLcryY6Ndlg
No comments:
Post a Comment