top of page
Writer's pictureHanh Nguyen

Step by Step to install oracle RAC in Solaris LDOM

Step by Step to install oracle RAC 12c in Solaris VM

ldm add-vcc port-range=5000-5100 primary-vcc0 primary

  1. Create the virtual disk server (vds).

# ldm add-vds primary-vds0 primary

Create virtual network

# ldm add-vsw net-dev=net1 linkprop=phys-state primary-vsw1 primary

# ldm add-vsw net-dev=nnet2 linkprop=phys-state primary-vsw2 primary

Create domain

ldm add-domain ldom01

ldm add-domain ldom02

ldm set-vcpu 2 ldom01

ldm set-vcpu 2 ldom02

ldm set-memory 18G ldom01

ldm set-memory 18G ldom02

Add virtual network

ldm add-vnet linkprop=phys-state vnet0 primary-vsw0 ldom01

ldm add-vnet linkprop=phys-state vnet1 primary-vsw1 ldom01

ldm add-vnet linkprop=phys-state vnet0 primary-vsw0 ldom02

ldm add-vnet linkprop=phys-state vnet1 primary-vsw1 ldom02

 Create disk

zfs create -V 100G rdata/ldom1_zpool

zfs create -V 100G rdata/ldom2_zpool

ldm add-vdsdev /dev/zvol/dsk/rdata/ldom1_zpool zpool1@primary-vds0

ldm add-vdsdev /dev/zvol/dsk/rdata/ldom2_zpool zpool2@primary-vds0

ldm add-vdisk zpool1 zpool1@primary-vds0 ldom01

ldm add-vdisk zpool2 zpool2@primary-vds0 ldom02

Add Virutal DVD from ISO file

## ldm add-vdsdev /software/solaris_base/sol-11_3-text-sparc.iso cdiso@primary-vds0

ldm add-vdsdev /software/solaris_base/sol-11_2-text-sparc.iso cdiso112@primary-vds0

Set boot devices to ldom

ldm add-vdisk s112-cd cdiso112@primary-vds0 ldom02

ldm set-var boot-device= s11-cd ldom01

ldm set-var boot-device= s112-cd ldom02

ldm set-var auto-boot\?=true ldom01

ldm set-var auto-boot\?=true ldom01

Bind Ldom

ldm bind ldom01

ldm bind ldom02

Start ldom01 and ldom02

ldm start ldom01

ldm start ldom02

Access ldom01 console

ldm list

root@dev # ldm list

NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME

primary          active     -n-cv-  UART    16    160G      15%   15%  8d 9h 53m

ldom01           active     -n—-  5000    2     10G      0.3%  0.3%  1m

ldom02           bound      ——  5001    2     10G

Telnet localhsot 5000

Install OS:

Untitled

Press F2, follow instruction to complete OS installation

Patch OS:

pkg set-publisher -O http://10.66.1.150 solaris

Install GUI:

pkg info -r solaris-desktop

pkg install solaris-desktop

Pkg update

Init 6

Create IP

Run in both server (rac1 and rac2)

ipadm create-ip net0 (public IP)

ipadm create-ip net1 (Private IP)

Ipadm create-addr -T static -a 10.66.1.11 net0

Ipadm create-addr -T static -a 192.168.1 net1

Create OS user and group

groupadd -g 1000 oinstall

groupadd -g 1020 asmadmin

groupadd -g 1021 asmdba

groupadd -g 1022 asmoper

groupadd -g 1031 dba

groupadd -g 1032 oper

useradd -u 1100 -g oinstall -G asmoper,asmadmin,asmdba -d /export/home/grid -m grid

useradd -u 1101 -g oinstall -G oper,dba,asmdba -d /export/home/oracle -m oracle

Set password to oracle and grid user

passwd oracle

password grid

Create user profile

Grid:

umask 022

ORACLE_BASE=/u01/app/grid

ORACLE_HOME=/u01/app/12.1.0/grid

ORACLE_SID=+ASM1

LD_LIBRARY_PATH=$ORACLE_HOME/lib

PATH=$PATH:/usr/local/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

TEMP=/tmp

TMPDIR=/tmp

export TEMP TMPDIR

ulimit -t unlimited

ulimit -f unlimited

ulimit -d unlimited

ulimit -s unlimited

ulimit -v unlimited

Oracle

umask 022

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1

ORACLE_SID=D11G

LD_LIBRARY_PATH=$ORACLE_HOME/lib

PATH=$PATH:/usr/local/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

TEMP=/tmp

TMPDIR=/tmp

export TEMP TMPDIR

ulimit -t unlimited

ulimit -f unlimited

ulimit -d unlimited

ulimit -s unlimited

ulimit -v unlimited

Create directory:

mkdir -p /u01/app/12.1.0/grid

mkdir -p /u01/app/grid

chown -R grid:oinstall /u01

mkdir -p /u01/app/oracle

chown oracle:oinstall /u01/app/oracle

chmod -R 775 /u01

mkdir -p /u01/app/12.1.0/grid

chown grid:oinstall /u01/app/12.1.0/grid

chmod -R 775 /u01/app/12.1.0/grid

mkdir -p /u01/app/oracle/product/12.1.0/db_1

chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/app/oracle

Update kernel

/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000 /usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500 /usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 /usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 /usr/sbin/ndd -set /dev/udp udp_xmit_hiwat 65536 /usr/sbin/ndd -set /dev/udp udp_recv_hiwat 65536

Add below line to /etc/system

set noexec_user_stack=1

Configure ssh

In rac1

grid@rac1:~$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/export/home/grid/.ssh/id_rsa):

Created directory ‘/export/home/grid/.ssh’.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/grid/.ssh/id_rsa.

Your public key has been saved in /export/home/grid/.ssh/id_rsa.pub.

The key fingerprint is:

84:04:87:b8:e0:39:dd:8e:31:99:e3:38:12:2f:12:ae grid@rac1

grid@rac1:~$ ssh-keygen -t dsa

Generating public/private dsa key pair.

Enter file in which to save the key (/export/home/grid/.ssh/id_dsa): Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/grid/.ssh/id_dsa.

Your public key has been saved in /export/home/grid/.ssh/id_dsa.pub.

The key fingerprint is:

a2:a5:a8:ed:d3:f7:7d:94:f8:8d:30:31:56:ee:34:da grid@rac1

grid@rac1:~$

grid@rac1:~$ cd .ssh

grid@rac1:~/.ssh$ cat *.pub > rac1

In rac2

grid@rac2:~$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/export/home/grid/.ssh/id_rsa):

Created directory ‘/export/home/grid/.ssh’.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/grid/.ssh/id_rsa.

Your public key has been saved in /export/home/grid/.ssh/id_rsa.pub.

The key fingerprint is:

bc:02:b9:60:98:0f:88:2f:09:1e:e5:f0:8c:c4:f3:5c grid@rac2

grid@rac2:~$ ssh-keygen -t dsa

Generating public/private dsa key pair.

Enter file in which to save the key (/export/home/grid/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/grid/.ssh/id_dsa.

Your public key has been saved in /export/home/grid/.ssh/id_dsa.pub.

The key fingerprint is:

b5:82:44:7a:9a:18:f1:e0:1f:93:51:63:23:27:fb:93 grid@rac2

grid@rac2:~$ cd .ssh

grid@rac2:~/.ssh$ cat *.pub > rac2

In rac1

scp ~/.ssh/rac1 rac2:/export/home/grid/.ssh

grid@rac1:~$ scp ~/.ssh/rac1 rac2:/export/home/grid/.ssh

Password:

rac1                 100% |*****************************|   990       00:00

In rac2:

grid@rac1:~$ scp ~/.ssh/rac1 rac2:/export/home/grid/.ssh

Password:

rac1                 100% |*****************************|   990       00:00

grid@rac2:~/.ssh$ cd ~

grid@rac2:~/.ssh$ ls -ltr

total 102

-rw——-   1 grid     oinstall    1675 Nov 14 23:38 id_rsa

-rw-r–r–   1 grid     oinstall     391 Nov 14 23:38 id_rsa.pub

-rw——-   1 grid     oinstall     668 Nov 14 23:38 id_dsa

-rw-r–r–   1 grid     oinstall     599 Nov 14 23:38 id_dsa.pub

-rw-r–r–   1 grid     oinstall     990 Nov 14 23:39 rac2

-rw-r–r–   1 grid     oinstall     990 Nov 14 23:43 rac1

grid@rac2:~/.ssh$ cat rac* > authorized_keys

Copy authorized_keys to /export/home/gird/.ssh in both nodes

Configure SAN Storage

zfs create -V 30G rdata/SAN

# ldm add-vdsdev /dev/rdsk/c0t5000CCA0701B7C90d0s0 data1@primary-vds0

# ldm add-vdsdev /dev/rdsk/c0t5000CCA0701B7C90d0s1 votedisk1@primary-vds0

# ldm add-vdsdev -f /dev/rdsk/c0t5000CCA0701B7C90d0s0 data2@primary-vds0

# ldm add-vdsdev  -f /dev/rdsk/c0t5000CCA0701B7C90d0s1 votedisk2@primary-vds0

# ldm add-vdisk id=2 votedisk1 votedisk1@primary-vds0 ldom01

# ldm add-vdisk id=2 votedisk2 votedisk2@primary-vds0 ldom02

In rac1,rac2

Searching for disks…done

AVAILABLE DISK SELECTIONS:

  1. c1d1 <Unknown-Unknown-0001-100.00GB>

/virtual-devices@100/channel-devices@200/disk@1

  1. c1d2 <Unknown-Unknown-0001-10.01GB>

/virtual-devices@100/channel-devices@200/disk@2

chown grid:asmdba /dev/rdsk/c1d2s0

chmod 660 /dev/rdsk/c1d2s0

./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup –verbose  >/tmp/raccheck.txt

/runcluvfy.sh stage -post hwos -n rac1,rac2 -verbose > /tmp/storage_check.txt

Launch ./runinstaller


Untitled

Click Next: 

Click Install and Configure Oracle Grid Infrastructure for a Cluster

Untitled

Untitled
Untitled
Untitled

Untitled
Untitled
Untitled
Untitled.png

Untitled

First in rac1, after finish then run in rac2 (Don’t run concurrent)

sh  /u01/app/oraInventory/orainstRoot.sh

First in rac1, after finish then run in rac2

sh /u01/app/12.1.0/grid/root.sh

Untitled.png

If  you are prompted for “Oracle Cluster Verification Utility” failed, you can safety ignore it.

Install Oracle Database

Launch ./runinstaller

Untitled

Untitled

Untitled
Untitled
Untitled

1 view0 comments

Recent Posts

See All

12c Grid Infrastructure Quick Reference

This is a 12c Grid Infrastructure quick reference DETAILS “crsctl stat res -t” output example This example is from a 12c GI Flex Cluster...

OCR – Vote disk Maintenace

Prepare the disks For OCR or voting disk addition or replacement, new disks need to be prepared. Please refer to Clusteware/Gird...

Comments


bottom of page