码迷,mamicode.com
首页 > 数据库 > 详细

linux下静默安装oracle 11g 数据库

时间:2015-04-12 06:54:18      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:liunx 下静默安装oracle 11g 数据库

sed -i ‘$a fs.aio-max-nr = 1048576‘ /etc/sysctl.conf
sed -i ‘$a fs.file-max = 6815744‘ /etc/sysctl.conf
sed -i ‘$a kernel.shmall = 2097152‘ /etc/sysctl.conf
sed -i ‘$a kernel.shmmax = 536870912‘ /etc/sysctl.conf
sed -i ‘$a kernel.shmmni = 4096‘ /etc/sysctl.conf
sed -i ‘$a kernel.sem = 250 32000 100 128‘ /etc/sysctl.conf
sed -i ‘$a net.ipv4.ip_local_port_range = 9000 65500‘ /etc/sysctl.conf
sed -i ‘$a net.core.rmem_default = 262144‘ /etc/sysctl.conf
sed -i ‘$a net.core.rmem_max = 4194304‘ /etc/sysctl.conf
sed -i ‘$a net.core.wmem_default = 262144‘ /etc/sysctl.conf
sed -i ‘$a net.core.wmem_max = 1048576‘ /etc/sysctl.conf
sysctl -p

sed -i ‘$a oracle soft nproc 2047‘ /etc/security/limits.conf
sed -i ‘$a oracle hard nproc 16384‘ /etc/security/limits.conf
sed -i ‘$a oracle soft nofile 1024‘ /etc/security/limits.conf
sed -i ‘$a oracle hard nofile 65536‘ /etc/security/limits.conf
sed -i ‘$a oracle soft stack 10240‘ /etc/security/limits.conf

groupadd -g 1001 dba
useradd -g dba -G dba oracle
mkdir -p /opt/app/
chown -R oracle:dba /opt/app/
chmod -R 775 /opt/app/

usermod -G wheel oracle

sed -i ‘$a umask 022‘ /home/oracle/.bash_profile
sed -i ‘$a TMP=/tmp; export TMP‘ /home/oracle/.bash_profile
sed -i ‘$a TMPDIR=$TMP; export TMPDIR‘ /home/oracle/.bash_profile
sed -i ‘$a ORACLE_BASE=/opt/app; export ORACLE_BASE‘ /home/oracle/.bash_profile
sed -i ‘$a ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME‘ /home/oracle/.bash_profile
sed -i ‘$a ORACLE_SID=ora11g; export ORACLE_SID‘ /home/oracle/.bash_profile
sed -i ‘$a ORACLE_TERM=xterm; export ORACLE_TERM‘ /home/oracle/.bash_profile
sed -i ‘$a PATH=/usr/sbin:$PATH; export PATH‘ /home/oracle/.bash_profile
sed -i ‘$a PATH=$ORACLE_HOME/bin:$PATH; export PATH‘ /home/oracle/.bash_profile
sed -i ‘$a LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH‘ /home/oracle/.bash_profile
sed -i ‘$a CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH‘ /home/oracle/.bash_profile
sed -i ‘$a #LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL‘ /home/oracle/.bash_profile
sed -i ‘$a export NLS_LANG=AMERICAN_AMERICA.AL32UTF8‘ /home/oracle/.bash_profile
source /home/oracle/.bash_profile

unzip /opt/oracle_zip/linux.x64_11gR2_database_1of2.zip -d /opt/oracle_zip/
unzip /opt/oracle_zip/linux.x64_11gR2_database_2of2.zip -d /opt/oracle_zip/
chown -R oracle:dba /opt/oracle_zip/database
chmod -R 755 /opt/oracle_zip/database
chown -R oracle:dba /opt/oracle_zip/db_install.rsp
chmod -R 755 /opt/oracle_zip/db_install.rsp
chown -R oracle:dba /opt/oracle_zip/dbca.rsp
chmod -R 755 /opt/oracle_zip/dbca.rsp

su - oracle -c "/opt/oracle_zip/database/runInstaller -silent -responseFile /opt/oracle_zip/db_install.rsp -noconfig -ignorePrereq"
sleep 15m
sh /opt/app/oraInventory/orainstRoot.sh 
sh /opt/app/product/11.2.0/db_1/root.sh 

su - oracle -c "DISPLAY=127.0.0.1:0.0"
su - oracle -c "export DISPLAY"
su - oracle -c "$ORACLE_HOME/bin/netca -silent -responseFile /opt/oracle_zip/database/response/netca.rsp"
sleep 1m
su - oracle -c "$ORACLE_HOME/bin/dbca -silent -responseFile /opt/oracle_zip/dbca.rsp" 

本文出自 “oracle” 博客,请务必保留此出处http://waxich1010.blog.51cto.com/10100484/1631352

linux下静默安装oracle 11g 数据库

标签:liunx 下静默安装oracle 11g 数据库

原文地址:http://waxich1010.blog.51cto.com/10100484/1631352

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!