Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选

首页 / 数据库 / MySQL / Oracle Database 10g Release 2(10.2.0.1)脚本自动化安装

#!/bin/sh
#The scripts is for RHEL5U1
#author is kevin
#date 2011-06-06for 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
doneOracle_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
# 开始安装ORACLEOracle 10g的EXPDP与IMPDP的导出与导入测试DG配置网络报ORA-12514: TNS:listener does not...相关资讯      Oracle教程 
  • Oracle中纯数字的varchar2类型和  (07/29/2015 07:20:43)
  • Oracle教程:Oracle中查看DBLink密  (07/29/2015 07:16:55)
  • [Oracle] SQL*Loader 详细使用教程  (08/11/2013 21:30:36)
  • Oracle教程:Oracle中kill死锁进程  (07/29/2015 07:18:28)
  • Oracle教程:ORA-25153 临时表空间  (07/29/2015 07:13:37)
  • Oracle教程之管理安全和资源  (04/08/2013 11:39:32)
本文评论 查看全部评论 (0)
表情: 姓名: 字数