设为首页 加入收藏

TOP

重新发现Oracle太美之root.sh(五)
2015-07-24 10:35:08 来源: 作者: 【 】 浏览:2
Tags:重新 发现 Oracle root.sh
it.
#
if [ -f $ORACLE_HOME/install/oratab -a $NEW = "true" ]
then
$CAT $ORACLE_HOME/install/oratab >> $ORATAB
fi


$ECHO "Finished running generic part of root script."
$ECHO "Now product-specific root actions will be performed."


第三个脚本
[oracle@rh64 ~]$ cat /u01/app/db11g/product/11.2.0/dbhome_1/install/unix/rootadd.sh
#!/bin/sh
#!/usr/bin/sh
ORACLE_HOME=/u01/app/db11g/product/11.2.0/dbhome_1
. $ORACLE_HOME/install/utl/rootmacro.sh


# the following commands need to run as root after installing
# the OEM Daemon


AWK=/usr/bin/awk
CAT=/usr/bin/cat
CHOWN="/usr/bin/chown"
CHMOD="/usr/bin/chmod"
CHMODR="/usr/bin/chmod -R"
CP=/usr/bin/cp
ECHO=/usr/bin/echo
MKDIR=/usr/bin/mkdir
TEE=/usr/bin/tee
RM=/bin/rm
MV=/bin/mv
GREP=/usr/bin/grep
CUT=/bin/cut
SED=/usr/bin/sed


PLATFORM=`uname`


if [ ${PLATFORM} = "Linux" ] ; then
CAT=/bin/cat
CHOWN=/bin/chown
CHMOD=/bin/chmod
CHMODR="/bin/chmod -R"
CP=/bin/cp
ECHO=/bin/echo
MKDIR=/bin/mkdir
GREP=/bin/grep
if [ ! -f $CUT ] ; then
CUT=/usr/bin/cut
fi
SED=/bin/sed
fi


if [ ${PLATFORM} = "SunOS" ] ; then
GREP=/usr/xpg4/bin/grep
fi


if [ ${PLATFORM} = "Darwin" ] ; then
CAT=/bin/cat
CHOWN="/usr/sbin/chown"
CHMOD="/bin/chmod"
CHMODR="/bin/chmod -R"
CP=/bin/cp
ECHO=/bin/echo
MKDIR=/bin/mkdir
CUT=/usr/bin/cut
fi

# change owner and permissions of the remote operations executible
if [ -f ${ORACLE_HOME}/bin/nmo.0 ];
then
$RM -f ${ORACLE_HOME}/bin/nmo
$CP -p ${ORACLE_HOME}/bin/nmo.0 ${ORACLE_HOME}/bin/nmo
fi
$CHOWN root $ORACLE_HOME/bin/nmo
$CHMOD 4710 $ORACLE_HOME/bin/nmo


# change owner and permissions of the program that does memory computations
if [ -f ${ORACLE_HOME}/bin/nmb.0 ];
then
$RM -f ${ORACLE_HOME}/bin/nmb
$CP -p ${ORACLE_HOME}/bin/nmb.0 ${ORACLE_HOME}/bin/nmb
fi
$CHOWN root $ORACLE_HOME/bin/nmb
$CHMOD 4710 $ORACLE_HOME/bin/nmb


# change owner and permissions of the storage metrics executible
if [ -f ${ORACLE_HOME}/bin/nmhs.0 ];
then
$RM -f ${ORACLE_HOME}/bin/nmhs
$CP -p ${ORACLE_HOME}/bin/nmhs.0 ${ORACLE_HOME}/bin/nmhs
fi
$CHOWN root $ORACLE_HOME/bin/nmhs
$CHMOD 4710 $ORACLE_HOME/bin/nmhs


#change permissions on emdctl and emagent
$CHMOD 700 $ORACLE_HOME/bin/emagent
$CHMOD 700 $ORACLE_HOME/bin/emdctl


# change permissions so they are accessible by users from groups
# other than the agent user group.
$CHMOD 755 $ORACLE_HOME/bin
$CHMODR a+rX $ORACLE_HOME/lib
$CHMODR a+rX $ORACLE_HOME/perl
#$CHMODR a+rX $ORACLE_HOME/sysman/admin/scripts
$CHMODR a+rX $ORACLE_HOME/jdk
$CHMOD 755 $ORACLE_HOME/bin/nmocat


#
# Following changes to system executables are needed for getting
# host inventory metrics on HP-UX
#
if [ ${PLATFORM} = "HP-UX" ] ; then
$CHMOD 555 /usr/sbin/swapinfo
#$CHMOD +r /dev/rdsk/*
fi


$ECHO "Finished product-specific root actions."| $TEE -a $LOG


[oracle@rh64 ~]$


第四个脚本:
[oracle@rh64 ~]$ cat /u01/app/db11g/product/11.2.0/dbhome_1/network/install/sqlnet/setowner.sh
#!/bin/sh
ORACLE_HOME=/u01/app/db11g/product/11.2.0/dbhome_1
. $ORACLE_HOME/install/utl/rootmacro.sh
:
if [ ! -d /var/tmp/.oracle ]
then
$MKDIR -p /var/tmp/.oracle;
fi


$CHMOD 01777 /var/tmp/.oracle
$CHOWN root /var/tmp/.oracle


if [ ! -d /tmp/.oracle ]
then
$MKDIR -p /tmp/.oracle;
fi


$CHMOD 01777 /tmp/.oracle
$CHOWN root /tmp/.oracle
------->>>这个地方要注意了,这个临时文件的.o
首页 上一页 2 3 4 5 6 下一页 尾页 5/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇oracle数据库开发面试题 下一篇oracle存储过程+游标处理select数..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·TCP/UDP协议_百度百科 (2025-12-26 12:20:11)
·什么是TCP和UDP协议 (2025-12-26 12:20:09)
·TCP和UDP详解 (非常 (2025-12-26 12:20:06)
·Python 教程 - W3Sch (2025-12-26 12:00:51)
·Python基础教程,Pyt (2025-12-26 12:00:48)