Oracle安装需要脚本orainstRoot.sh
2015-06-30 23:32
525 查看
# cat /oracle/oraInventory/orainstRoot.sh #!/bin/sh AWK=/bin/awk CHMOD=/bin/chmod CHGRP=/bin/chgrp CP=/bin/cp ECHO=/bin/echo MKDIR=/bin/mkdir RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'` if [ ${RUID} != "root" ];then $ECHO "This script must be executed as root" exit 1 fi if [ -d "/etc" ]; then $CHMOD 755 /etc; else $MKDIR -p /etc; fi if [ -f "/oracle/oraInventory/oraInst.loc" ]; then $CP /oracle/oraInventory/oraInst.loc /etc/oraInst.loc; $CHMOD 644 /etc/oraInst.loc else INVPTR=/etc/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. Adding read,write permissions for group. Removing read,write,execute permissions for world. "; $CHMOD -R g+rw,o-rwx /oracle/oraInventory; if [ $? != 0 ]; then $ECHO "OUI-35086:WARNING: chmod of /oracle/oraInventory Adding read,write permissions for group. ,Removing read,write,execute permissions for world. failed!"; fi $ECHO "Changing groupname of /oracle/oraInventory to oinstall."; $CHGRP -R oinstall /oracle/oraInventory; if [ $? != 0 ]; then $ECHO "OUI-10057:WARNING: chgrp of /oracle/oraInventory to oinstall failed!"; fi $ECHO "The execution of the script is complete."
相关文章推荐
- 如何在PL/SQL中修改ORACLE的字段顺序
- Oracle 11.2.0.2 安装条件检查之pdksh 包
- oracle 索引
- Oracle 修复脚本runfixup.sh
- Oracle Error Collect
- 【数据库】Oracle vs SQL Server
- 【Oracle错误集锦】:ORA-12154: TNS: 无法解析指定的连接标识符
- oracle 2
- 升级_宽视野Oracle图形升级(升级后dbca建库)—10.2.0.1.0提拔10.2.0.5.0
- Oracle CASE WHEN 用法介绍
- Oracle基本数据类型
- Oracle数据库备份与恢复
- Oracle DDL基本操作
- ORACLE日期时间函数大全
- Oracle 10g/11g 导入导出整理
- win8.1打不开oracle11g的Database Configuration Assistant和Net Configuration Assistant
- Oracle_关联查询
- Oracle 11g 新特性 --SQL Plan Management 说明
- windows系统卸载oracle(简单步骤,完全卸载)
- 如何恢复错误授权后的grid目录权限