Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2109966
  • 博文数量: 195
  • 博客积分: 4378
  • 博客等级: 上校
  • 技术积分: 4046
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-09 11:37
个人简介

白天和黑夜只交替没交换无法想像对方的世界

文章分类

全部博文(195)

文章存档

2014年(3)

2013年(20)

2012年(18)

2011年(107)

2010年(17)

2009年(5)

2008年(20)

2007年(5)

分类: Oracle

2011-06-23 23:32:02

 Oracle Database 10g Release 2(10.2.0.1)脚本自动化安装

#!/bin/sh
#The scripts is for RHEL5U1
#author is kevin
#date 2011-06-06

for i in  libXp-1.0.0-8    openmotif-2.3.0-0.3.el5 compat-db-4.2.52-5.1 compat-gcc-34-3.4.6-4 compat-libf2c-34-3.4.6-4  compat-gcc-34-g77-3.4.6-4 compat-gcc-34-c++-3.4.6-4 compat-libstdc++-296-2.96-138 compat-libstdc++-33-3.2.3-61
do
yum install -y $i
done

ORACLE_PASSWD=oracle
# oracle用户密码
SETUP_FILE_PATH=/u01/oracle
# 10g安装程序目录
INSTALL_TO_PATH=/u01
# 安装路径
#----------------------------------------
grep oracle /etc/passwd &> /dev/null

# 检查是否已经安装
if [ $? -eq 0 ]
then
clear
echo "oracle user is already existEOF"
exit 1
fi
###################调整内核参数#############################
cat >> /etc/sysctl.conf << EOF
kernel.sem = 250 32000 100 128
fs.file-max = 65546
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
EOF
sysctl -p
# 提交配置参数
###################创建安装用户及组#########################
#off Selinux
groupadd dba && groupadd oinstall
useradd -g oinstall -G dba -m oracle
echo $ORACLE_PASSWD | passwd oracle --stdin
mkdir -p $INSTALL_TO_PATH
chown -R oracle.oinstall $INSTALL_TO_PATH
##=============================================
cat >> /etc/pam.d/login << EOF
# Add content for oracle install
session required pam_limits.so
EOF
# turn on limits for oracle 10g
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65535
EOF
##=============================================
echo 'Red Hat Enterprise Linux Server release 4 (Tikanga)' > /etc/redhat-release
echo '
#--------------------------------------
# Set for Oracle10g Install           ;
#--------------------------------------
trap " " 0 1 2 3 5 9 15
trap clear 0
export TMP=/tmp
export TMPDIR=$TMP
' >> /home/oracle/.bash_profile
#============
echo "export ORACLE_BASE=$INSTALL_TO_PATH" >> /home/oracle/.bash_profile
#============
echo '
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=orcl
export ORACLE_TERM=oinstall
export PATH=$ORACLE_HOME/bin:$PATH
export LANG=en_US
' >> /home/oracle/.bash_profile

# 用户ROOT登录在字符界面下
clear
echo "you can su - oracle in X and run runInstaller to install oracle now"
#su - oracle
#startx -- :1
#./runInstaller
# 开始安装ORACLE

阅读(6959) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~