小编给大家分享一下Linux下如何利用脚本静默安装Oracle11G,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
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"
以上是“Linux下如何利用脚本静默安装Oracle11G”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。