自动安装oracle所需要的rpm包(需要访问外网):
#! /bin/sh rpmpack=" binutils compat-libstdc++* elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel " for pack in $rpmpack; do rpm -qa | grep $pack > /dev/null if [ $? -eq 1 ];then echo "$pack not install" yum -y install $pack fi done
用户创建(暂时未加判断):
groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle echo "zerostudy" | passwd --stdin oracle mkdir /u01 chown -R oracle:oinstall /u01 chmod -R 775 /u01
本文出自 “尽管错,让我错到死!” 博客,请务必保留此出处http://hxw168.blog.51cto.com/8718136/1424626