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. javascript最容易混淆的作用域、提升、闭包

    一.函数作用域 1.函数作用域 就是作用域在一个“Function”里,属于这个函数的全部变量都可以在整个函数的范围内使用及复用. function foo(a) { var b = 2; funct ...

  2. centos 谷歌浏览器安装

    首先,这个是坑 http://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/ 安装会报错,按照错误找到以下资源 ...

  3. IDEA 进入到项目的系统文件路径

    选中项目,单击右键,在弹出的菜单中点击file path

  4. 《oracle每天一练》Merge Into 语句代替Insert/Update在Oracle中的应用实战

    转载自窃破天道 动机: 想在Oracle中用一条SQL语句直接进行Insert/Update的操作. 说明: 在进行SQL语句编写时,我们经常会遇到大量的同时进行Insert/Update的语句 ,也 ...

  5. Python之多线程

    廖雪峰教程--- http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/00138683 ...

  6. FIDO 标准简介

    FIDO 联盟(Fast IDentity Online Alliance)简介 网站:http://fidoalliance.org FIDO Alliance,成立于2012年7月. FIDO的目 ...

  7. http get vs post

    http get vs post GET与POST方法有以下区别:(1) 在客户端,Get方式在通过URL提交数据,数据在URL中可以看到:POST方式,数据放置在HTML HEADER内提交.(2) ...

  8. echo 单引号和双引号

    echo输出 $key=value echo "$key" echo 后面带双引号的话,双引号里面的内容会翻译,输出value echo '$key' echo后面带单引号的话,双 ...

  9. 压测 apache ab 初探

    2015年10月30日 14:58:34 ab是apache自带的压测命令, 在其bin目录下边, 不仅可以压测Apache, 也可以测nginx或其他服务器 可以模拟上传post值 (-p, 与下边 ...

  10. 新浪微博授权失败:applications over the unaudited use restrictions

    在用新浪微博授权第三方app时,授权失败,log显示 com.sina.weibo.sdk.exception.WeiboHttpException: {,"request":&q ...