Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux one-click deployment of oracle installation environment scripts (recommended)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The specific code is as follows:

#! / bin/bash### function: Preparation for Oracle Installation### parameter: SID BASE###, where sid refers to ORACLE_SID###BASE and refers to the first-level directory of ORACLE_BASE For example, BASE is / u0 for ORACLE_BASE=/u01/app/oracle to check whether the number of parameters is correct if [$#-ne 2] Then echo "$0 SID BASE" exitfiSID= "$1" BASE= "$2" # hostname binds IP= `ifconfig | awk-F' [:] + 'NR==2 {print $4'} `HOST= `hostname`sed-I' $astatname`IP' $HOST'' / etc/hosts#Checking the Package Requirements# paste the list of tables to be installed in the Package_list file awk-fills-[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\ $a \ kernel.sem = 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!"

Summary

The above is the Linux one-click deployment oracle installation environment script introduced by the editor to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!

If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report