1,/u01/app/oracle/oraInventory/orainstRoot.sh 脚本

#!/bin/sh
if [ -d "/etc" ]; then
chmod 755 /etc;
fi
if [ -f "/u01/app/oracle/oraInventory/oraInst.loc" ]; then
cp /u01/app/oracle/oraInventory/oraInst.loc /etc/oraInst.loc;
else
INVPTR=/etc/oraInst.loc
INVLOC=/u01/app/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 /u01/app/oracle/oraInventory to 770.";
chmod -R 770 /u01/app/oracle/oraInventory;
if [ $? != 0 ]; then
echo "OUI-35086:WARNING: chmod of /u01/app/oracle/oraInventory to 770 failed!";
fi
echo "Changing groupname of /u01/app/oracle/oraInventory to oinstall.";
chgrp oinstall /u01/app/oracle/oraInventory;
if [ $? != 0 ]; then
echo "OUI-10057:WARNING: chgrp of /u01/app/oracle/oraInventory to oinstall failed!";
fi
echo "The execution of the script is complete"

从上面的脚步中可以看出,这个脚本的作用是/etc/oraInst.loc文件,并修改/etc和/u01/app/oracle/oraInventory 的权限

2./u01/crs1020/root.sh 脚步

脚本如下:

#!/bin/sh
/u01/crs1020/install/rootinstall
/u01/crs1020/install/rootconfig

调用上面的两个脚本

/u01/crs1020/install/rootinstall 如下

#!/bin/sh
#
# rootinstall.sbs for CRS installs
#
# This is run once per CRS_HOME during the install. This install specific
# root script sets file ownerships, groups, and permissions on
# the files or directories that are to be owned by root user.
#
SILENT=false
CRS_ORACLE_HOME=/u01/crs1020
CRS_ORACLE_OWNER=oracle
CRS_DBA_GROUP=oinstall if [ -z "$CHOWN" ]; then CHOWN=/bin/chown; fi
if [ -z "$CHGRP" ]; then CHGRP=/bin/chgrp; fi
if [ -z "$CHMOD" ]; then CHMOD=/bin/chmod; fi
if [ -z "$ECHO" ]; then ECHO=/bin/echo; fi
if [ -z "$AWK" ]; then AWK=/bin/awk; fi
if [ -z "$LS" ]; then LS=/bin/ls; fi
if [ -z "$ID" ]; then ID=/usr/bin/id; fi
if [ -z "$MKDIRP" ]; then MKDIRP="/bin/mkdir -p"; fi usage()
{
printf "Usage:"
printf "$0 [-silent]\n"
printf " [-crshome <Oracle CRS home path>]\n"
printf " [-crsuser <Name of the user installing Oracle CRS>]\n"
printf " [-crsgroup <Name of the user-group installing Oracle CRS>]\n"
} validateInput()
{
##validates if any value is assigned to the script variables
valid=`$ECHO $1 | $AWK '/^%/ { print "false"; }'`
if [ "$valid" = "false" ];
then
$ECHO "No value set for the CRS parameter $2. Use parameter file to set values";
usage;
return 1;
fi return 0;
} # This script is intended to be run by root. RUID=`$ID|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'`
if [ ${RUID} != "root" ];then
$ECHO "You must be logged in as root to run $0."
$ECHO "Log in as root and restart $0 execution."
exit 1
fi UNAME=/bin/uname
PLATFORM=`$UNAME` case $PLATFORM in
Linux) DIRNAME=/usr/bin/dirname
;;
HP-UX) DIRNAME=/bin/dirname
;;
SunOS) DIRNAME=/bin/dirname
;;
AIX) DIRNAME=/bin/dirname
;;
OSF1) DIRNAME=/usr/bin/dirname
;;
*) DIRNAME=/bin/dirname
;;
esac USER_ARGS=$* while [ $# -gt 0 ];
do
if [ $1 = "-silent" ]; then
SILENT=1;
elif [ $1 = "-crshome" ]; then
if [ $# -ge 2 ]; then
CRS_ORACLE_HOME=$2;
shift;
else
usage;
exit 2
fi
elif [ $1 = "-crsuser" ]; then
if [ $# -ge 2 ]; then
CRS_ORACLE_OWNER=$2;
shift;
else
usage;
exit 2
fi
elif [ $1 = "-crsgroup" ]; then
if [ $# -ge 2 ]; then
CRS_DBA_GROUP=$2;
shift;
else
usage;
exit 2
fi
else
usage;
exit 2
fi
shift;
done validateInput $CRS_ORACLE_HOME "CRS_ORACLE_HOME" || { $ECHO $?; exit 1; }
validateInput $CRS_ORACLE_OWNER "CRS_ORACLE_OWNER" || { $ECHO $?; exit 1; }
validateInput $CRS_DBA_GROUP "CRS_DBA_GROUP" || { $ECHO $?; exit 1; } ORA_CRS_HOME=$CRS_ORACLE_HOME
export ORA_CRS_HOME
CH=$ORA_CRS_HOME export CRS_ORACLE_HOME # set ownership to root, but give execute permissions to all $CHOWN root $CH/bin/crs*
$CHMOD 555 $CH/bin/crs* # only owner(root) should ever invoke crsd $CHMOD 744 $CH/bin/crsd if [ ! -d $CH/crs/init ]; then
$MKDIRP $CH/crs/init
fi $CHOWN root $CH
$CHMOD 755 $CH for d in bin crs crs/init crs/profile crs/script crs/template crs/auth
do
$CHOWN root $CH/$d
$CHMOD 755 $CH/$d
done # These are writeable by all
for d in crs/public
do
$CHOWN $CRS_ORACLE_OWNER $CH/$d
$CHMOD 777 $CH/$d
done for d in evm evm/init
do
$CHMOD 750 $CH/$d
done for d in css css/init css/log css/auth
do
$CHMOD 711 $CH/$d
done # check directories above $CH are owned by root d=$CH
while [ "$d" != "/" ]
do
d=`$DIRNAME $d`
set -$- `$LS -ld $d`
case $3 in
root) ;; # ok
*) $ECHO "WARNING: directory '$d' is not owned by root";;
esac
done

主要是对CRS需要的一些目录权限进行配置

/u01/crs1020/install/rootconfig这个脚本主要是对CRS进行配置,使CRS服务在服务器重启时自动启动,加入/etc/inittab ,格式化Voting disk等

安装oracle 10g RAC执行的几个脚本说明的更多相关文章

  1. 安装Oracle 10g RAC是否需要安装HACMP

    实际上无论在哪个操作系统(AIX,HP-UX,Solaris,Linux)上安装Oracle10g RAC都不再需要Vendor Clusterware(IBM的HACMP,HP的Service Gu ...

  2. CentOS 6.3(x86_64)下安装Oracle 10g R2

    目 录 一.硬件要求二.软件三.系统安装注意四.安装Oracle前的系统准备工作五.安装Oracle,并进行相关设置六.升级Oracle到patchset 10.2.0.4七.使用rlwrap调用sq ...

  3. 【转】CentOS 6.3(x86_64)下安装Oracle 10g R2

    目 录 一.硬件要求二.软件三.系统安装注意四.安装Oracle前的系统准备工作五.安装Oracle,并进行相关设置六.升级Oracle到patchset 10.2.0.4七.使用rlwrap调用sq ...

  4. 【转】CentOS 6.3(x86_32)下安装Oracle 10g R2

    一.硬件要求 1.内存 & swap Minimum: 1 GB of RAMRecommended: 2 GB of RAM or more 检查内存情况 # grep MemTotal / ...

  5. CentOS 6.3(x86_32)下安装Oracle 10g R2

    一.硬件要求 1.内存 & swap Minimum: 1 GB of RAMRecommended: 2 GB of RAM or more 检查内存情况 # grep MemTotal / ...

  6. linux安装oracle 11g rac

    安装oracle 11gR2 RAC 一.网络规划及安装虚拟主机 主机名 主机版本 Ip rac1.localdomain Redhat 6.5 RAC节点1 192.168.100.11 rac2. ...

  7. 【转】Oracle 10g RAC TAF

    本人转自:http://www.cnblogs.com/future2012lg/archive/2013/10/12/3365978.html Oracle RAC 同一时候具备HA(High Av ...

  8. Oracle 10g RAC启动与关闭命令

    一. 检查共享设备 一般情况下, 存放OCR 和 Voting Disk 的OCFS2 或者raw 都是自动启动的. 如果他们没有启动,RAC 肯定是启动不了的. 1.1 如果使用ocfs2的,检查o ...

  9. Oracle安装部署之linux(redhat/centos)快速安装oracle 11g rac

    安装oracle 11gR2 RAC 一.网络规划及安装虚拟主机 主机名 主机版本 Ip rac1.localdomain Redhat 6.5 RAC节点1 192.168.100.11 rac2. ...

随机推荐

  1. Python PEP8规范

    转载自:http://blog.csdn.net/kellyseeme/article/details/50644893 风格指南:http://zh-google-styleguide.readth ...

  2. Java拼接批量新增SQL语句

    StringBuffer addSql = new StringBuffer(1000); int batchSize = 50; int executeTime = 0; SimpleDateFor ...

  3. 应用HTK搭建语音拨号系统4: 识别器评估

    选自:http://maotong.blog.hexun.com/6261890_d.html 苏统华 哈尔滨工业大学人工智能研究室 2006年10月30日 声明:版权所有,转载请注明作者和来源 该系 ...

  4. 【GoLang】与或非 异或操作

    在Go规范,^这个运算符在一元运算符和二元运算符中都出现了.那么他们分别是啥?在规范中说道:^ bitwise XOR integers这是按位异或. Go语言位操作实例 <!-- lang: ...

  5. [转载] C++ 突破私有成员访问限制

    最后一个方式 模板尚未弄清楚. 我们在写代码的时候,按约定都是把成员数据放到private访问区中,然后在通过相应的函数来存取.那又有什么样的代码可以突破访问权限来直接操作类中private区段中的成 ...

  6. FFmpeg-20160428-snapshot-bin

    ESC 退出 0 进度条开关 1 屏幕原始大小 2 屏幕1/2大小 3 屏幕1/3大小 4 屏幕1/4大小 S 下一帧 [ -2秒 ] +2秒 ; -1秒 ' +1秒 下一个帧 -> -5秒 F ...

  7. Enum:Face The Right Way(POJ 3276)

    面朝大海,春暖花开 题目大意:农夫有一群牛,牛排成了一排,现在需要把这些牛都面向正确的方向,农夫买了一个机器,一次可以处理k只牛,现在问你怎么处理这些牛才可以使操作数最小? 这道题很有意思,其实这道题 ...

  8. 【leetcode】 Unique Path ||(easy)

    Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How m ...

  9. 【leetcode】Longest Consecutive Sequence(hard)☆

    Given an unsorted array of integers, find the length of the longest consecutive elements sequence. F ...

  10. 浅析 Cordova for iOS

    转自@夏小BO的技术博客: Cordova,对这个名字大家可能比较陌生,大家肯定听过 PhoneGap 这个名字,Cordova 就是 PhoneGap 被 Adobe 收购后所改的名字.(Cordo ...