Oracle RAC installation requires 4 scripts and implications

Source: Internet
Author: User
Tags chmod mkdir requires

4 scripts are required to perform RAC installation

1) $ORACLE _base/orainventory/orainstroot.sh (performed at end of Clusterware)

2) $CRS _home/root.sh (performed at end of Clusterware)

3) $CRS _home/bin/vipca.sh (the script is automatically invoked when the second node executes $crs_home/root.sh)

4) $ORACLE _home/root.sh (after installing the database to perform)

1. orainstroot.sh Script

1.1 orainstroot.sh Script Execution process

Root@node2 #/oracle/orainventory/orainstroot.sh

Changing permissions of/oracle/orainventory to 770.

Changing groupname of/oracle/orainventory to Oinstall.

The execution of the script is complete

1.2 orainstroot.sh Script Content

Root@node1 # more/oracle/orainventory/orainstroot.sh

#!/bin/sh

if [!-D "/var/opt/oracle"]; Then

Mkdir-p/var/opt/oracle;

Fi

If [-D "/var/opt/oracle"]; Then

chmod 755/var/opt/oracle;

Fi

If [F "/oracle/orainventory/orainst.loc"]; Then

Cp/oracle/orainventory/orainst.loc/var/opt/oracle/orainst.loc;

chmod 644/var/opt/oracle/orainst.loc;

Else

Invptr=/var/opt/oracle/orainst.loc

Invloc=/oracle/orainventory

Grp=oinstall

Ptrdir= "' DirName $INVPTR '";

# Create the Software inventory location pointer file

if [!-D "$PTRDIR"]; Then

Mkdir-p $PTRDIR;

Fi

echo "Creating the Oracle inventory pointer file ($INVPTR)";

echo inventory_loc= $INVLOC > $INVPTR

echo inst_group= $GRP "$INVPTR

chmod 644 $INVPTR

# Create The Inventory directory if it doesn ' t exist

if [!-d "$INVLOC"];then

echo "Creating the Oracle Inventory directory ($INVLOC)";

Mkdir-p $INVLOC;

Fi

Fi

echo "Changing permissions of/oracle/orainventory to 770";

Chmod-r 770/oracle/orainventory;

If [$!= 0]; Then

echo "Oui-35086:warning:chmod of/oracle/orainventory to 770 failed!";

Fi

echo "Changing groupname of/oracle/orainventory to Oinstall."

Chgrp oinstall/oracle/orainventory;

If [$!= 0]; Then

echo "Oui-10057:warning:chgrp of/oracle/orainventory to Oinstall failed!";

Fi

More Wonderful content: http://www.bianceng.cn/database/Oracle/

echo "The execution of the script is complete"

As we can see from the script, this script basically creates the/var/opt/oracle directory (if it doesn't exist), and then builds the Orainst.loc file in that directory (the file records the Orainventory location and group). and change the properties of the orainventory.

Root@node2 # ls–rlt/var/opt/oracle/

Total 2

-rw-r--r--1 root Apr 2 14:42 orainst.loc

Root@node2 # more Orainst.loc

Inventory_loc=/oracle/orainventory

Inst_group=oinstall

Run the script on another node

Root@node1 #/oracle/orainventory/orainstroot.sh

Changing permissions of/oracle/orainventory to 770.

Changing groupname of/oracle/orainventory to Oinstall.

The execution of the script is complete

2. root.sh Script

2.1 root.sh Script Execution process

Root@node2 #/oracle/crs/root.sh

Warning:directory '/oracle ' isn't owned by root

Checking to-if Oracle CRS stack is already configured

Checking to = If any 9i GSD are up

Setting the permissions on OCR backup directory

Setting Up NS Directories

Oracle Cluster Registry Configuration upgraded successfully

Warning:directory '/oracle ' isn't owned by root

Successfully accumulated necessary OCR keys.

Using ports:css=49895 crs=49896 evmc=49898 and evmr=49897.

Node <nodenumber>: <nodename> <private interconnect name>

Node 0:node2 node2-priv Node2

Node 1:node1 node1-priv Node1

Creating OCR keys for user ' root ', privgrp ' root '

Operation successful.

Now formatting voting device:/ORACLE/OCRCFG1

Format of 1 voting devices complete.

Startup would be queued to init within seconds.

Adding daemons to Inittab

Expecting the CRS daemons to being up within seconds.

CSS is active on these nodes.

Node2

CSS is inactive on these nodes.

Node1

Local node checking complete.

Run root.sh on remaining nodes to start CRS daemons.

As we can see from the output, the script mainly performs the configuration of CRS, formats OCR disk, updates the/etc/inittab file, launches the CSS process, and creates a new Ocr.loc file and Scls_scr,oprocd folder in/var/opt/oracle/.

2.2 View the CRS process and the/etc/inittab file to see the node changes.

Root@node2 # Ps-ef|grep Crs|grep–v grep

Oracle 18212 18211 0 14:47:28 0:00/oracle/crs/bin/ocssd.bin

Oracle 18191 18180 0 14:47:28 0:00/oracle/crs/bin/oclsmon.bin

Oracle 17886 1 0 14:47:27 0:00/oracle/crs/bin/evmd.bin

Oracle 18180 18092 0 14:47:28 0:00/bin/sh-c Cd/oracle/crs/log/node2/cssd/oclsmon; Ulimit-c Unlimited; /ora

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.