麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 數據庫 > Oracle > 正文

Linux一鍵部署oracle安裝環境腳本(推薦)

2020-07-26 13:26:09
字體:
來源:轉載
供稿:網友

具體代碼如下所示:

#!/bin/bash###############################################功能:Preparation for Oracle Installation###參數:SID BASE###其中,sid指的是ORACLE_SID###BASE指的是ORACLE_BASE的一級目錄,如ORACLE_BASE=/u01/app/oracle,則BASE為/u01#############################################檢查參數個數是否正確if [ $# -ne 2 ];then  echo "$0 SID BASE"  exitfiSID="$1"BASE="$2"#主機名綁定IP=`ifconfig |awk -F'[: ]+' 'NR==2{print $4'}`HOST=`hostname`sed -i '$a'$IP' '$HOST'' /etc/hosts#Checking the Package Requirements#將需要安裝的表的列表貼在Package_list文件中awk -F'-[0-9]' '{print $1}' Package_list |awk '{print $1}' |uniq |xargs yum install -y > output.log 2>&1#Creating Required Operating System Groups and Usersgroupadd -g 800 oinstallgroupadd -g 801 dbagroupadd -g 802 operuseradd -g oinstall -G dba,oper oracleecho oracle | passwd --stdin oracle >> output.log 2>&1#Configure Kernal Parameterssed -i '$a/fs.aio-max-nr = 1048576' /etc/sysctl.confsed -i '$a/fs.file-max = 6815744' /etc/sysctl.confsed -i '$a/kernel.shmall = 2097152' /etc/sysctl.confsed -i '$a/kernel.shmmax = 536870912' /etc/sysctl.confsed -i '$a/kernel.shmmni = 4096' /etc/sysctl.confsed -i '$a/kernel.sem = 250 32000 100 128' /etc/sysctl.confsed -i '$a/net.ipv4.ip_local_port_range = 9000 65500' /etc/sysctl.confsed -i '$a/net.core.rmem_default = 262144' /etc/sysctl.confsed -i '$a/net.core.rmem_max = 4194304' /etc/sysctl.confsed -i '$a/net.core.wmem_default = 262144' /etc/sysctl.confsed -i '$a/net.core.wmem_max = 1048586' /etc/sysctl.confsysctl -p >> output.log 2>&1#Configure Resource Limitssed -i '$a/oracle      soft  nproc  2047' /etc/security/limits.confsed -i '$a/oracle      hard  nproc  16384' /etc/security/limits.confsed -i '$a/oracle      soft  nofile 1024' /etc/security/limits.confsed -i '$a/oracle      hard  nofile 65536' /etc/security/limits.conf#Add the following line to the /etc/pam.d/login file, if it does not already exist:sed -i '$a/session  required   pam_limits.so' /etc/pam.d/login#Add the following line to the /etc/profilesed -i '$a/if [[ $USER = "oracle" ]]; then' /etc/profilesed -i '$a/   if [[ $SHELL = "/bin/ksh" ]]; then' /etc/profilesed -i '$a/       ulimit -p 16384' /etc/profilesed -i '$a/       ulimit -n 65536' /etc/profilesed -i '$a/   else' /etc/profilesed -i '$a/       ulimit -u 16384 -n 65536' /etc/profilesed -i '$a/   fi' /etc/profilesed -i '$a/fi' /etc/profilesource /etc/profile#Configuring the oracle User's Environmentsed -i '$a/export ORACLE_SID='$SID'' /home/oracle/.bash_profilesed -i '$a/export ORACLE_BASE='$BASE'/app/oracle' /home/oracle/.bash_profilesed -i '$a/export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1' /home/oracle/.bash_profilesed -i '$a/export PATH=$ORACLE_HOME/bin:$PATH' /home/oracle/.bash_profilesource /home/oracle/.bash_profile#Creating Required Directoriesmkdir -p $ORACLE_HOMEchown -R oracle.oinstall $BASE/appchmod -R 775 $BASE/appecho "Preparation For Oracle Installation Is Over!"

總結

以上所述是小編給大家介紹的Linux一鍵部署oracle安裝環境腳本,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!
如果你覺得本文對你有幫助,歡迎轉載,煩請注明出處,謝謝!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 午夜a狂野欧美一区二区 | 青草久久av| 曰韩一二三区 | 亚洲国产精品久久久久婷婷老年 | 午夜精品久久久久久久久久久久久蜜桃 | 久久超 | 视频一区二区三区在线播放 | 日韩精品中文字幕一区二区 | 久草导航 | 亚洲精品久久久久久久久久久 | 91一区二区三区久久久久国产乱 | 国产一区视频在线观看免费 | 99精品国产小情侣高潮露脸在线 | 久久91精品国产91久久yfo | 91短视频版高清在线观看免费 | 黑人日比| 久久艹精品 | 久久免费综合视频 | 亚洲精品动漫在线观看 | 伊人999| 久草在线观看首页 | 精品一区二区三区免费 | 免费看成人毛片 | av观看网站| 日本a∨精品中文字幕在线 狠狠干精品视频 | 日韩黄色免费电影 | av在线观| 成人免费毛片一 | 欧美日韩中文字幕在线视频 | 国产亚洲美女精品久久久2020 | 国产视频精品在线 | 一级毛片在线观看免费 | 欧美成人免费看 | 亚洲精品动漫在线观看 | 日本a v免费观看 | 欧美日韩在线视频一区 | 国产99久久久久久免费看农村 | 国内精品免费一区二区2001 | 欧美国产一区二区三区 | 黄网站免费观看视频 | 久久精品国产99久久6动漫亮点 |