Install Virtual Box On Your PC Download Virtual Box Software From
Install Virtual Box On Your PC Download Virtual Box Software From
Install the oracle virtual box by executing the above executable file
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”
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”
Click “OK”
Before starting the machine first time we need to download the OEL iso copy image.
https://edelivery.oracle.com/linux
Select the “Oracle Linux” and “X86 64 bit” plat form as shown in below
Click on “Go”
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”
Click keybord
Click on “Next”
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
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
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.
So open DOS terminal in your PC (not in virtual box) and set the path in DOS to include
VBoxManage executables.
--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.
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
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)
3# make 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.
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
# /etc/init.d/iptables save
# /etc/init.d/iptables stop
Now shutdown the virtual machine and create new one or clone it
/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
/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.
/etc/init.d/network restart
Now you will see the disks on new virtual machine too
http://www.oracle.com/technetwork/server-storage/linux/asmlib/ol6-1709075.html
http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/x86_64/
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.
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)
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:
In this case kill yum process running on server and re run download
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.
but it failed with following error: Marking disk "DISK1" as an ASM disk: [FAILED]
in /var/log/oracleasm -->
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
# getenforce Disabled
Note: Make sure on /dev/oracleasm/disks ---> it will shows the disks and it has
grid:dba permissions
Diskgroup created.
Diskgroup created.
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
# cd /etc/yum.repos.d
# yum install bind
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;
};
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/
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.
################################################################
# chkconfig named on
step6: on all servers (RAC nodes and DNS server):
/etc/resolv.conf
###############################
###############################
Make sure you enabled the firewall especially for port 53.