0% found this document useful (0 votes)
110 views

Install Virtual Box On Your PC Download Virtual Box Software From

The document provides instructions for configuring a shared storage environment using Oracle VirtualBox. It describes how to: 1. Create 6 shared virtual disks using the VBoxManage command. 2. Attach the shared disks to the virtual machine configuration. 3. Modify the disks to be shared so they can be accessed from multiple virtual machines simultaneously. 4. Verify the new shared disks appear as devices in the virtual machine's /dev directory once started.

Uploaded by

chaganti_rakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

Install Virtual Box On Your PC Download Virtual Box Software From

The document provides instructions for configuring a shared storage environment using Oracle VirtualBox. It describes how to: 1. Create 6 shared virtual disks using the VBoxManage command. 2. Attach the shared disks to the virtual machine configuration. 3. Modify the disks to be shared so they can be accessed from multiple virtual machines simultaneously. 4. Verify the new shared disks appear as devices in the virtual machine's /dev directory once started.

Uploaded by

chaganti_rakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 71

1.

Install Virtual Box on your PC

Download virtual box software from


http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html

Download the software as per your operating system


VirtualBox-4.2.0-80737-Win.exe

Install the oracle virtual box by executing the above executable file

2. Create the new virtual machine

Click the new button


It will prompts the “Name and operating System” window, enter the name, operating system type
and o.s version

In our case, we are installing Oracle Enterprise Linux

Name: msp1rac1  this will be the name of your virtual machine

Type: Linux X86

Version: Oracle

Enter “Next”

It will popup the “Memory Size” window, enter the memory you want to allocate to the virtual
box
Enter “Next”, It will prompts the “Hard Drive” window

Check the “create a virtual hard drive now” and enter “Next”

Select the “VDI (virtualbox Disk Image)” as the hard drive file type and click the”Next”
Click “Next”

Select “Dynamically allocated” as the storage allocation method

Clieck “Next”
Specify the how much storage we want to allocate for the new virtual machine and name of the
disk and choose the file location

Click “Create”

It will create the basic virtual machine configuration and shows the following screen:
If you check on the specified location, you will find a new disk created as follows:

Click on “System”

Make sure you check the “Enable IO APIC” feature

Click on “Processor” tab

Allocate 2 cpu’s at least


Click “OK”
Click on “Network” tab

For all “Adapters” check the “Enable Network Adaptor” feature


And select “Bridge Adaptor” form the topdown list.
Name will show your PC network adaptor name (in my case it is dell)

Do it for all four adaptors

Click “OK”

Now in networ tab it will show four network adaptors


Click on “Start” green arrow button

Before starting the machine first time we need to download the OEL iso copy image.

https://edelivery.oracle.com/linux

login to oracle E-delivery

Select the “Oracle Linux” and “X86 64 bit” plat form as shown in below
Click on “Go”

Select the required version, in my case it will be 6.1.0.0 version

click “Continue” on bottom of the page


We just need to download the first file.

Once you download the file you will find the file iso copy of OEL6.1

Now Start the virtual machine first time by clicking the START green arrow
For the first time it will prompt for the startup disk, select the OEL 6.1 iso copy image
(downloaded previously)

Click “Start”

“Skip” the media test


Click “Next”

Select “English” as language


Click on “Next”

Click keybord
Click on “Next”

Select “basic storage device”


Select “yse, discard any data”
Machine Name: msp1rac1.usa.com  usa.com is the domain name
Press “Configure Network”
Findout what is the default gateway and subnet mask of public network on our desktop.
On DNS servers make sure you added the DNS server IP and Default gateway IP

DNS server IP is used for resolving local domain name (rcc.com –you will see later)
Default gateway is used to connect to internet (outside domain)

The file looks like as follows: (if we miss default gateway then it can’t be connect to internet)

cat /etc/resolv.conf
# Generated by NetworkManager
search rcc.com
nameserver 192.168.0.50
nameserver 192.168.0.1
Welcome
For swap:
The following list specifies the file systems, and their respective sizes, that

will be created. Create /u01 last with size the remaining part of the 300GB disk.

The approach can be used to create any custom size. Plan accordingly to have

sufficient disk space.

1. / – 10000M
2. /boot – 10000M

3. /home – 10000M

4. /opt – 10000M

5. /tmp – 10000M

6. /usr – 10000M

7. /usr/local – 10000M
8. /var – 10000M

9. swap – 10000M

10. /u01 – the remaining disk space.


Once completed it will prompts for formatting –press OK

Then it will shows the boot disk press ok


Check “customize now”
Reboot
Rakesh/trusted
In VirtualBox: Settings==>Storage==>Controller IDE (in the window to the right);
highlighted the dependency which was empty; checked the Live CD/DVD
checkbox==>clicked on round part bluish DVD sign, highlighted Choose a virtual
CD/DVD disk drive==> Look for an .iso file: VBGuestAdditions.iso, click, click,==>
went back to the Ubuntu VM. There is already a window waiting for you which announces
that there is something to install, just click "RUN" button. The mouse capture disappears
immediately and you can move your mouse back and force. Clipboard bidirectionality still
does no work but hopefully will be after a reboot.

The display will be small and we adjust it by reducing the clocktick


We will add divider=10 to grab.conf file.

So add lines of kernals by appending the divider=10

[root@msp1rac2 ~]# cat /etc/grub.conf


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda6
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server-uek (2.6.32-100.34.1.el6uek.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-100.34.1.el6uek.x86_64 ro
root=UUID=e99d093a-f8b6-41e4-9904-4cdba37cf21d rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16
KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
kernel /vmlinuz-2.6.32-100.34.1.el6uek.x86_64 ro
root=UUID=e99d093a-f8b6-41e4-9904-4cdba37cf21d rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16
KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet divider=10
initrd /initramfs-2.6.32-100.34.1.el6uek.x86_64.img
title Oracle Linux Server (2.6.32-131.0.15.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro
root=UUID=e99d093a-f8b6-41e4-9904-4cdba37cf21d rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16
KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img
Once we added, reboot the machine and you will see better screen resolution.

Now we need to create DISKS that are going to be shared between nodes.

1. Shutdown the machine (we need to shutdown the machine in order to create disks)

In order to create the DISKS we will use “VBoxManage” command in your PC (MS DOS
interface) . “VBoxManage” is the host command and its executables are located in the
directory where we installed the virtual box.

In my case I have installed the virtual box on c:\Program Files\Oracle\VirtualBox

So open DOS terminal in your PC (not in virtual box) and set the path in DOS to include
VBoxManage executables.

set PATH=c:\Program Files\Oracle\VirtualBox;%PATH%

--Now go to dir where we want to create disks (DOS terminal go to the dir where you want to
create new disks, in my case I am creating directories in C:\app\disks folder.

--Note: “VBoxManage” is the CASE SENSITIVE command.

1# create disks:

VBoxManage createhd --filename rasm1.vdi --size 20480 --format VDI --variant Fixed

VBoxManage createhd --filename rasm2.vdi --size 20480 --format VDI --variant Fixed

VBoxManage createhd --filename rasm3.vdi --size 20480 --format VDI --variant Fixed
VBoxManage createhd --filename rasm4.vdi --size 20480 --format VDI --variant Fixed

VBoxManage createhd --filename rasm5.vdi --size 20480 --format VDI --variant Fixed

VBoxManage createhd --filename rasm6.vdi --size 20480 --format VDI --variant Fixed

2#. Attach disks to virtual machine (my machine name is msp1rac1)


VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium rasm1.vdi --mtype
shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 2 --device 0 --type hdd --medium rasm2.vdi --mtype
shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 3 --device 0 --type hdd –medium rasm3.vdi --mtype
shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 4 --device 0 --type hdd --medium rasm4.vdi --mtype
shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 5 --device 0 --type hdd --medium rasm5.vdi --mtype
shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 6 --device 0 --type hdd --medium rasm6.vdi --mtype
shareable

How to detach the disks (we can only detach all the disks pf certain port)

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 4 --device 0


--type hdd --medium none

The above command detach all the devices attached to port4

3# make shareable:

VBoxManage modifyhd rasm1.vdi --type shareable


VBoxManage modifyhd rasm2.vdi --type shareable
VBoxManage modifyhd rasm3.vdi --type shareable
VBoxManage modifyhd rasm4.vdi --type shareable
VBoxManage modifyhd rasm5.vdi --type shareable
VBoxManage modifyhd rasm6.vdi --type shareable

Now start the virtual machine and you will see the disks in
“/dev”

Now we can confirm that there are 6 new disk devices sdb[b-g].

[root]# cd /dev
[root]# ls sd*
sda sda10 sda2 sda4 sda6 sda8 sdb sdd sdf
sda1 sda11 sda3 sda5 sda7 sda9 sdc sde sdg
Now we got the disks sdb-sdg
To create ASM disks we need to partition those disks.

[root]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor


Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier
0xb4cd1737.
Changes will remain in memory only, until you decide to
write them.
After that, of course, the previous content won’t be
recoverable.
Warning: invalid flag 0×0000 of partition table 4 will be
corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It’s strongly
recommended to
switch off the mode (command ‘c’) and change display units
to
sectors (command ‘u’).
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default
1305):
Using default value 1305
Command (m for help): p
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb4cd1737
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

Repeat the steps listed below for each disk from /dev/sdb to /dev/sdf.

Once created partitions now you will see partitioned disks sdb1-sdg1

[root@oel61a dev]# ls sd*


sda sda10 sda2 sda4 sda6 sda8 sdb sdc sdd sde sdf sdg
sda1 sda11 sda3 sda5 sda7 sda9 sdb1 sdc1 sdd1 sde1 sdf1 sdg1

 Remember to turnoff firewallas(iptables) on all boxes


Type the following two commands (you must login as the root user):

# /etc/init.d/iptables save
# /etc/init.d/iptables stop

Turn off firewall on boot:


# chkconfig iptables off

Now shutdown the virtual machine and create new one or clone it

If you clone it the once started we need to rename the hostname

To change the hostname: change HOSTNAME parameter in /etc/sysconfig/network file.

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=msp1rac2.usa.com
GATEWAY=192.168.0.1

After cloning the machine we will see eth4, eth5, eth6, eth7 network interfaces,
So we need to rename the network interfaxes to eth0, eth1, eth2, eth3
ifconfig -a |grep eth
it will shows the eth4, eth5, eth6, eth7, notedown the above address and assign those MAC
address to eth0, eth1, eth2, eth3

to chnage the NIC names:

/etc/udev/rules.d/70-persistent-net.rules -->in this file choose name depends upon the mac
Address (we got from above step)

So network configuration also change the names to match with MAC address.

But "route" command shows eth1 as default, so change eth1 to eth0

[root@msp1rac2 dev]# route


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.35.0 * 255.255.255.0 U 0 0 0 eth3
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
10.10.15.0 * 255.255.255.0 U 0 0 0 eth1
192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0
10.10.25.0 * 255.255.255.0 U 0 0 0 eth2
link-local * 255.255.0.0 U 0 0 0 eth1
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

Measure eth0 is the default and it is also your public interface.

To restart newtwork configuration:

/etc/init.d/network restart

Once it completed attach the shared disks to new virtual machine

set PATH=c:\Program Files\Oracle\VirtualBox;%PATH%

--go to dir wherewe have disks


VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 1
--device 0 --type hdd --medium rasm1.vdi --mtype shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 2


--device 0 --type hdd --medium rasm2.vdi --mtype shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 3


--device 0 --type hdd --medium rasm3.vdi --mtype shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 4


--device 0 --type hdd --medium rasm4.vdi --mtype shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 5


--device 0 --type hdd --medium rasm5.vdi --mtype shareable

VBoxManage storageattach msprac1.rcc.com --storagectl "SATA Controller" --port 6 –


device 0 --type hdd --medium rasm6.vdi --mtype shareable

Once you attached the disks start the virtual machine

Now you will see the disks on new virtual machine too

[root@oel61a dev]# ls sd*


sda sda10 sda2 sda4 sda6 sda8 sdb sdc sdd sde sdf sdg
sda1 sda11 sda3 sda5 sda7 sda9 sdb1 sdc1 sdd1 sde1 sdf1 sdg1

once partitioned complete , now we need to add sisk to another machine

VBoxManage storageattach msprac2.rcc.com --storagectl "SATA Controller" --port 1


--device 0 --type hdd --medium rasm1.vdi --mtype shareable

VBoxManage storageattach msprac2.rcc.com --storagectl "SATA Controller" --port 2


--device 0 --type hdd --medium rasm2.vdi --mtype shareable
VBoxManage storageattach msprac2.rcc.com --storagectl "SATA Controller" --port 3
--device 0 --type hdd --medium rasm3.vdi --mtype shareable

VBoxManage storageattach msprac2.rcc.com --storagectl "SATA Controller" --port 4


--device 0 --type hdd --medium rasm4.vdi --mtype shareable

VBoxManage storageattach msprac2.rcc.com --storagectl "SATA Controller" --port 5


--device 0 --type hdd --medium rasm5.vdi --mtype shareable

VBoxManage storageattach msprac2.rcc.com --storagectl "SATA Controller" --port 6 –


device 0 --type hdd --medium rasm6.vdi --mtype shareable

install oracle asmlibs and all nodes


configure oracleasm on all nodes
create disks on one of node
list disks on other nodes

Install ORACLE ASM LIB:

asmlib installation for oracle linux 6 (OEL6) :

ASMLib installations require the oracleasmlib and oracleasm-support packages appropriate


for their machine.

oracleasmlib cab be downloaded from: (oracleasmlib-2.0.4-1.el6.x86_64.rpm)

http://www.oracle.com/technetwork/server-storage/linux/asmlib/ol6-1709075.html

oracleasm-support cab be downloaded from:

http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/x86_64/

download those two packages and install the packages:

rpm -ivh <package_name>

We can install the any rpm’s using YUM


YUM is the new utility and it will connect to internet and downloads the specified pckages and
installs it on the server.

To configure YUM:

Oracle Linux 6

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo

Makesure internet is working. After configuring of YUM, we can install asmlib required
packages.

[root]# yum install <package_name>

For ASM libraries we nned to install


1) Oracleasmlib - this is need to be downloaded from
oraclesite
2) Oracleasm-support  this can be installed usin YUM

[root@chi1pas1 yum.repos.d]# yum install oracleasmlib-2.0.4-1.el6.x86_64.rpm


Loaded plugins: refresh-packagekit
ol6_UEK_latest
| 1.2 kB 00:00
ol6_UEK_latest/primary
| 3.3 MB 00:02
ol6_UEK_latest
85/85
ol6_latest
| 1.4 kB 00:00
ol6_latest/primary
| 21 MB 00:17
ol6_latest
17982/17982
Setting up Install Process
No package oracleasmlib-2.0.4-1.el6.x86_64.rpm available.
Error: Nothing to do
[root@chi1pas1 yum.repos.d]# yum install oracleasmlib
Loaded plugins: refresh-packagekit
Setting up Install Process
No package oracleasmlib available.
Error: Nothing to do
[root@chi1pas1 yum.repos.d]# yum install oracleasm-support
Loaded plugins: refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
================================================================================
=============================================================================
Package Arch
Version Repository
Size
================================================================================
================================================================================
=============================================================================
Installing:
oracleasm-support x86_64
2.1.5-1.el6 ol6_latest
73 k

Transaction Summary
================================================================================
================================================================================
=============================================================================
Install 1 Package(s)

Total download size: 73 k


Installed size: 214 k
Is this ok [y/N]: y
Downloading Packages:
oracleasm-support-2.1.5-1.el6.x86_64.rpm
| 73 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03:
NOKEY
Retrieving key from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Importing GPG key 0xEC551F03:
Userid: "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
From : http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : oracleasm-support-2.1.5-1.el6.x86_64
1/1

Installed:
oracleasm-support.x86_64 0:2.1.5-1.el6

Complete!
once you installed the rpm's, configure the asm

--
If sometimes we will lock message as follows:

[root@chi1pas1 yum.repos.d]# yum install ksh


Loaded plugins: refresh-packagekit
Existing lock /var/run/yum.pid: another copy is running as pid 3203.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 91 M RSS (399 MB VSZ)
Started: Sat Oct 13 19:21:59 2012 - 01:00 ago
State : Sleeping, pid: 3203
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 91 M RSS (399 MB VSZ)
Started: Sat Oct 13 19:21:59 2012 - 01:02 ago
State : Running, pid: 3203
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 91 M RSS (399 MB VSZ)
Started: Sat Oct 13 19:21:59 2012 - 01:04 ago
State : Running, pid: 3203

In this case kill yum process running on server and re run download

Ps –ef|grep yum  kill ospid

[root]# /etc/init.d/oracleasm configure


--grid as owner
--dba as group
[root@chi1pas1 yum.repos.d]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: grid


Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]

--to check status: /etc/init.d/oracleasm status

Now create asm disks:

[root]# /etc/init.d/oracleasm createdisk DISK1 /dev/sdb1

but it failed with following error: Marking disk "DISK1" as an ASM disk: [FAILED]

in /var/log/oracleasm -->

Disk "DISK1" does not exist or is not instantiated


Writing disk header: done
Instantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "DISK1":
Permission denied
failed
Clearing disk header: done

After googling the error, I came to know that we need to disable the SELINUX

/etc/sysconfig/selinux --> in that file modify the SELINUX value i.e SELINUX=disabled
reboot the system

Run following to makesure it disabled:

# getenforce Disabled

After disabling i successfully marked the disk as asm disk

/etc/init.d/oracleasm createdisk DISK1 /dev/sdb1


/etc/init.d/oracleasm createdisk DISK2 /dev/sdc1
/etc/init.d/oracleasm createdisk DISK3 /dev/sdd1
/etc/init.d/oracleasm createdisk DISK4 /dev/sde1
/etc/init.d/oracleasm createdisk DISK5 /dev/sdf1
/etc/init.d/oracleasm createdisk DISK6 /dev/sdg1

once you create the disks, makesure its available

[root] /etc/init.d/oracleasm listdisks --> it will list all disks

Note: Make sure on /dev/oracleasm/disks ---> it will shows the disks and it has
grid:dba permissions

SCAN the disks on other node

[root] /etc/init.d/oracleasm scandisks

[root] /etc/init.d/oracleasm listsdisks  make sure it shows


all disks

---how to create diskgroups with au_size=4m

SQL> create diskgroup DATA external redundancy disk


'ORCL:DISK2','ORCL:DISK3' attribute 'au_size'='4M';

Diskgroup created.

SQL> create diskgroup FRA external redundancy disk


'ORCL:DISK4','ORCL:DISK5' attribute 'au_size'='4M';

Diskgroup created.

We need to use v$asm_disk.PATH to create the diskgroup.


We need to install the BIND (Berkeley Internet Name Daemon)
name server) on our DNS server

Install YUM (YUM is the online linux utliy that will download
install rpm’s and packages automatically by connection to
internet)

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo

wget http://public-yum.oracle.com/public-yum-ol6.repo
--2012-11-24 16:02:13-- http://public-
yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 1927 (1.9K) [text/plain]
Saving to: âpublic-yum-ol6.repoâ

100%
[===========================================================
===================================================>] 1,927
--.-K/s in 0s

2012-11-24 16:02:13 (168 MB/s) - âpublic-yum-ol6.repoâ

Next install the BIND:

# cd /etc/yum.repos.d
# yum install bind

It will download the required rpm’s from internet (yum server)


and installs it.

DNS CONFIGURATION : domain names is “rcc.com” in this example.

Default Gateway: 192.168.0.1


NIC-name msp1rac1.rcc.com msp1rac2.rcc.com mspdns.rcc.com

public (eth0) 192.168.0.10 192.168.0.20 192.168.0.50


vip 192.168.0.11 192.168.0.21
rac scan 192.168.0.121, 192.168.0.122, 192.168.0.123

private (eth1) 10.10.15.10 10.10.15.20

step1: on DNS server modify the "/etc/named.conf" file


Note: our dns server ip is 192.168.0.50
My pc ip: 192.168.0.100
My virtual host adapter ip: 192.168.56.1
This files need 775 permission
Chmod 775 /etc/named.conf
################################################################

[root@mspdns ~]# cat /etc/named.conf


//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC
BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS
resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named
configuration files.
//

options {
listen-on port 53 { 127.0.0.1; 192.168.0.50; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file
"/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */


bindkeys-file "/etc/named.iscdlv.key";

forwarders { 192.168.56.1; 192.168.0.100; };

};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

zone "rcc.com" IN {
type master;
file "rcc.com.zone";
allow-update { none; };
};

zone "0.168.192.in-addr.arpa." IN {
type master;
file "0.168.192.in-addr.arpa";
allow-update { none; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

################################################################

step2: cd /var/named/

create a zone file: rcc.com.zone

This file containts the all the servernames that are in the domain “rcc.com”
If we do nslookup <servername> then it will look into this file.
For nslookup of IP we need another file called reverse lookupfile (netx step)
###########################################################
$TTL 86400
@ IN SOA localhost root.localhost (
42 ;
serial (d. adams)
3H ;
refresh
15M ;
retry
1W ;
expiry
1D ) ;
minimum
IN NS localhost
localhost IN A 127.0.0.1
msprac1 IN A 192.168.0.10
msprac2 IN A 192.168.0.20
msprac1-priv IN A 10.10.15.10
msprac2-priv IN A 10.10.15.20
msprac1-vip IN A 192.168.0.11
msprac2-vip IN A 192.168.0.21
msprac-scan IN A 192.168.0.121
msprac-scan IN A 192.168.0.122
msprac-scan IN A 192.168.0.123
mspdns IN A 192.168.0.50

################################################################
step3: 0.168.192.in-addr.arpa
create for public network reverse lookup (192.168.0 is subnet of public interface)
if we do nslookup <IP-address> then it will find the name here.

################################################################
$ORIGIN 0.168.192.in-addr.arpa.
$TTL 1H
@ IN SOA mspdns.rcc.com.
root.mspdns.rcc.com. ( 2
3H
1H
1W
1H )
0.168.192.in-addr.arpa. IN NS mspdns.rcc.com.

10 IN PTR msp1rac1.rcc.com.
20 IN PTR msp1rac2.rcc.com.
100 IN PTR msp1rac1-vip.rcc.com.
200 IN PTR msp1rac2-vip.rcc.com.
121 IN PTR msprac-scan.rcc.com.
122 IN PTR msprac-scan.rcc.com.
123 IN PTR msprac-scan.rcc.com.
50 IN PTR mspdns.rcc.com.

################################################################

step 4: start the service

[root@mspdns named]# service named start


Generating /etc/rndc.key: [ OK ]
Starting named: [ OK ]

step5: to start the service after reboot everytime:

# chkconfig named on
step6: on all servers (RAC nodes and DNS server):

/etc/resolv.conf

###############################

nameserver 192.168.0.50 #this is the dns server


nameserver 192.168.0.1 #this for outside (internet)
search rcc.com #this is the domain name

###############################

Make sure you enabled the firewall especially for port 53.

Also turnoff iptables in all servers:

# chkconfig iptables off

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy