linux下静默安装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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。