WEB开发网
开发学院数据库Oracle oracle 10gr2 环境变量配置脚本 阅读

oracle 10gr2 环境变量配置脚本

 2012-11-01 20:48:50 来源:WEB开发网   
核心提示:cp /etc/selinux/config /etc/selinux/sugon.bak.config &&if [ $? != 0 ];thenecho "backup selinux.config failed"exit -1fiecho -n "SELINUX=disabled&
cp /etc/selinux/config /etc/selinux/sugon.bak.config &&
if [ $? != 0 ];then
echo "backup selinux.config failed"
exit -1
fi
echo -n "SELINUX=disabled" > /etc/selinux/config &&
if [ $? != 0 ];then
echo "modify selinux failed"
exit -1
fi
##Create the new groups and users:
echo -e '\n'
echo -en '\e[31m Create the user and group for install ! \e[0m \n'
groupadd oinstall &&
groupadd dba &&
groupadd oper &&
useradd -g oinstall -G dba oracle &&
echo 11111 | passwd oracle --stdin
##Create the directories in which the Oracle software will be installed:
echo -e '\n'
echo -en '\e[31m Create the DIR for ORACLE_BASE and chown the privilege! \e[0m \n'
mkdir -p $ORACLE_BASE/product/10.2.0/db_1 &&
chown -R oracle.oinstall /u01 &&
##Login as the oracle user and add the following lines at the end of the .bash_profile file:
echo -e '\n'
echo -en '\e[31m Modify the bash_profile of oracle ! \e[0m \n'
cat << EOF >> /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=/u01/crs/oracle/10gr2/crs
export ORACLE_SID=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$ORACLE_HOME/bin:$HOME/bin:$ORA_CRS_HOME/bin:/sbin:$ORA_ASM_HOME:$PATH
EOF

上一页  1 2 

Tags:oracle gr 环境

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接