红帽安装oracle 10g系统环境配置脚本
类别:Oracle数据库 作者:码皇 来源:snaid 的BLOG 点击:
红帽安装oracle 10g系统环境配置脚本redhat linux安装oracle之前需要配置一些系统环境,每次配置比较麻烦,为方便,写了个简单的脚本,在rhel5 8系统测试通过。 www 2cto com bin bash
红帽安装oracle 10g系统环境配置脚本
redhat linux安装oracle之前需要配置一些系统环境,每次配置比
较麻烦,为方便,写了个简单的脚本,在rhel5.8系统测试通过。
www.2cto.com
#/bin/bash
#######################################################
# Description:此脚本为rhel5或rhel6环境安装oracle 10g
的系统准备工作,需要配置好yum源
# 添加的oracle用户默认密码为oracle
# Author:snaid
# Email:snaid_x@163.com
########################################################
#difine oracle_sid
read -p "Please input your oracle sid that will
be install:" ora_sid
#modify system version
echo "Red Hat Enterprise Linux Server release 4.8
(Tikanga)" > /etc/redhat-release
#install depdent packge
for i in binutils compat-gcc-34 compat-
libstdc++-296 control-center
gcc gcc-c++ glibc glibc-common
glibc-devel libaio libgcc
libstdc++ libstdc++-devel libXp
make openmotif22 setarch
do
yum -y install $i 2>/dev/null ;
done
#modify kernel parameter
printf "kernel.shmall = 2097152 n
kernel.shmmax = 2147483648 n
kernel.shmmni = 4096 n
kernel.sem = 250 32000 100 128 n
fs.file-max = 65536 n
net.ipv4.ip_local_port_range = 1024 65000 n
net.core.rmem_default = 1048576 n
net.core.rmem_max = 1048576 n
net.core.wmem_default = 262144 n
net.core.wmem_max = 262144 ">> /etc/sysctl.conf
/sbin/sysctl -p
#add user
/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1001 dba
/usr/sbin/useradd -u 1000 -g oinstall -G dba oracle
echo "oracle"| passwd oracle --stdin > /dev/null 2>&1
#build oracle directory
mkdir -p /u01/oracle
chown -R oracle.oinstall /u01
#oracle environment variable
echo export ORACLE_BASE=/u01/oracle >> /home/
oracle/.bash_profile
echo export ORACLE_HOME=$ORACLE_BASE/product/
10.2.0 >> /home/oracle/.bash_profile
echo export ORACLE_SID=$ora_sid >> /home/oracle
/.bash_profile
echo export PATH=$PATH:$HOME/bin:$ORACLE_
HOME/bin >> /home/oracle/.bash_profile
echo export LD_LIBRARY_PATH=$ORACLE_HOME/
lib:/lib:/usr/lib >> /home/oracle/.bash_profile
source /home/oracle/.bash_profile
#oracle's ulimit
printf
"oracle soft nproc 2047 n
oracle hard nproc 16384 n
oracle soft nofile 1024 n
oracle hard nofile 65536 n" >> /etc/
security/limits.conf
echo "Please make sure your hostname and
host file configure ok."
相关热词搜索:
红帽 安装 oracle