溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Linux下如何利用腳本靜默安裝Oracle11G

發(fā)布時(shí)間:2021-11-09 14:34:32 來(lái)源:億速云 閱讀:194 作者:小新 欄目:關(guān)系型數(shù)據(jù)庫(kù)

小編給大家分享一下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”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI