ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle script for preinstalling oracle10g

oracle script for preinstalling oracle10g

原创 Linux操作系统 作者:tompson1983 时间:2009-07-31 09:59:21 0 删除 编辑

#!/bin/bash

#####create user oracle
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
##### create directory

mkdir -p /opt/ora_home
mkdir -p /opt/ora_data
mkdir -p /opt/ora_log
mkdir -p /opt/ora_arc
mkdir -p /opt/ora_standby
chown oracle.oinstall -R /opt
chmod 775 -R /opt

mkdir -p /home/oracle/pfile
chown oracle.oinstall -R /home/oracle/pfile
mkdir -p /home/oracle/webgame_sql
chown oracle.oinstall -R /home/oracle/webgame_sql


#####create bash_profile
su - oracle <more >>./.bash_profile <export ORACLE_BASE=/opt
export ORACLE_HOME=$ORACLE_BASE/ora_home
export ORACLE_SID=fsxy
export PATH=$ORACLE_HOME/bin:/usr/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export LANG=AMERICAN_AMERICA.ZHS16GBK

#LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib:/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib:/lib:$LD_LIBRARY_PATH

EOF
!

######limits configure
echo "oracle          soft    nproc           2047" >>/etc/security/limits.conf
echo "oracle          hard    nproc           16384">>/etc/security/limits.conf
echo "oracle          soft    nofile          4096 ">>/etc/security/limits.conf
echo "oracle          hard    nofile          65535">>/etc/security/limits.conf

 

echo "session     required        /lib/security/pam_limits.so">>/etc/pam.d/login

########sysctl
more >> /etc/sysctl.conf << EOF
  
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.shmall=2097152
kernel.sem=250 32000 100 128
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

EOF

sysctl -p

####### install rpm package

cd /media/cdrom/RedHat/RPMS
rpm -Uvh binutils-2.15.92.0.2-24.i386.rpm compat-db-4.1.25-9.i386.rpm control-center-2.8.0-12.rhel4.5.i386.rpm gcc-3.4.6-9.i386.rpm gcc-c++-3.4.6-9.i386.rpm glibc-2.3.4-2.39.i386.rpm gnome-libs-1.4.1.2.90-44.1.i386.rpm libstdc++-3.4.6-9.i386.rpm libstdc++-devel-3.4.6-9.i386.rpm make-3.80-6.EL4.i386.rpm openmotif21-2.1.30-11.RHEL4.6.i386.rpm

#######add xhost
su - <

xhost +127.0.0.1
!
####### configure oracle password
passwd oracle

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15072844/viewspace-610940/,如需转载,请注明出处,否则将追究法律责任。

上一篇: awk2
请登录后发表评论 登录
全部评论

注册时间:2009-06-15

  • 博文量
    52
  • 访问量
    78356