Oracle 21C下載和安裝
Oracle 21C安裝包下載地址
Oracle 21C文件位置
Database Installation Guide for Linux
準備安裝環境:
作業系統版本:Redhat 7.6
cd /home/oracle
touch install_db01.sh
chmod a+x install_db01.sh
vim install_db01.sh
#!/bin/bash SPATH=/soft DATAPATH=/oradata FS_TYPE=ext4 ORABASE=/oracle/product FNAME=LINUX.X64_213000_db_home.zip MT_PT=/oracle ORAlnven=/oracle TPATH=/home/oracle ORAHOME=/oracle/product/21.3/db mem=$(free -g | grep Mem | awk {'print $2'}) shm=$((mem*1024*1024*819)) mall=$((shm/4096)) sga=$((mem*512))M pga=$((mem*153))M cpu=$(cat /proc/cpuinfo | grep process|wc -l) install_database_log=$TPATH/install_database.log install_database_rsp_file=$TPATH/install_database.rsp # ############################################################## ## Step 2: create oracle path ############################################################## env_info(){ echo "Os:" `cat /etc/system-release` echo `grep MemTotal /proc/meminfo` grep SwapTotal /proc/meminfo df -h /tmp free -g df -h /dev/shm echo "Processor architecture: " `uname -m` } mk_path(){ mkdir -p "$MT_PT" mkdir -p "$DATAPATH" } ############################################################## ## Step 3: Change os properties ############################################################## change_os(){ if [[ -f /usr/lib/systemd/system/ctrl-alt-del.target ]]; then rm -f /usr/lib/systemd/system/ctrl-alt-del.target init q systemctl stop firewalld systemctl stop avahi-daemon systemctl stop bluetooth systemctl disable firewalld systemctl disable avahi-daemon systemctl disable bluetooth echo "OS has been changed" else echo "OS has been changed!!!!" fi } add_user(){ id oracle if [[ $? == 0 ]]; then echo "Oracle user has been add!!!!!!" else #user and group groupadd -g 301 oinstall groupadd -g 300 dba groupadd -g 303 oper groupadd -g 307 backupdba groupadd -g 308 dgdba groupadd -g 309 kmdba useradd -m -d /home/oracle -u 500 -g oinstall -G dba,oper,backupdba,dgdba,kmdba oracle mkdir -p $ORAHOME chown -R oracle:oinstall /oracle echo 'oracle' | passwd oracle --stdin cp /etc/profile /etc/profile_org cat <<eof >> /etc/profile if [ \$USER = "oracle" ]; then if [ \$SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi export HISTTIMEFORMAT="%F %T " export HISTSIZE=10000 eof cat <<eof >> /home/oracle/.bash_profile export ORACLE_BASE=/oracle/product export ORACLE_HOME=$ORAHOME export PATH=\$PATH:\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$ORACLE_HOME/suptools/oratop export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:\$LD_LIBRARY_PATH export ORACLE_SID=$DBNAME alias cdo='cd \$ORACLE_HOME' alias cdb='cd \$ORACLE_HOME/dbs' alias cdn='cd \$ORACLE_HOME/network/admin' alias cdal='cd \$ORACLE_BASE/diag/rdbms/*/$DBNAME/trace' alias sqp='sqlplus / as sysdba' eof echo "User has been changed" fi } change_param(){ if [[ $(cat /etc/sysctl.conf | grep 'oracle parameter' |wc -l) == 1 ]]; then echo "Parameter has been changed!!!!!!" else cp /etc/sysctl.conf /etc/sysctl.conf_orig cat <<eof >> /etc/sysctl.conf ##oracle parameter kernel.shmmni = 4096 kernel.shmall = $mall kernel.shmmax = $shm fs.aio-max-nr = 1048576 fs.file-max = 6815744 #fs.aio-max-nr = 4194304 #系統最大非同步IO請求數目 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 net.ipv4.ipfrag_high_thresh = 16777216#容易觸發BUG,RHEL 6.6+/7.1+需要修改 ID 2008933.1 net.ipv4.ipfrag_low_thresh = 15728640#容易觸發BUG,RHEL 6.6+/7.1+需要修改 ID 2008933.1 kernel.panic_on_oops = 1 #出現OOPS(OS核心錯誤)系統不傾向於當機或重啟 kernel.randomize_va_space = 0 #禁用實體記憶體地址是否隨機分配Address Space Layout Randomization (ASLR) vm.min_free_kbytes= 524288#配置最小保留記憶體,建議為512MB,如果實體記憶體超過128GB,按照比例翻倍。 vm.swappiness =10 eof sysctl -p cat <<eof >> /etc/security/limits.conf ##oracle parameter * - memlock unlimited * soft memlock unlimited * hard memlock unlimited oracle soft nproc 16384 oracle hard nproc 16384 oracle soft nofile 65536 oracle hard nofile 65536 oracle soft stack 10240 eof sed -i -e "s/4096/16384/g" /etc/security/limits.d/20-nproc.conf cp /etc/pam.d/login /etc/pam.d/login_orig echo "session required pam_limits.so" >> /etc/pam.d/login echo "RemoveIPC=no" >> /etc/systemd/logind.conf systemctl daemon-reload systemctl restart systemd-logind echo "Parameter has been changed" fi } disable_thp(){ if [[ $(cat /etc/default/grub | grep 'transparent_hugepage=never' |wc -l) == 1 ]]; then echo "THP has been disabled !!!!!!!" else cp /etc/default/grub /etc/default/grub_orig cat /etc/default/grub sed -i 's#rhgb quiet#rhgb quiet transparent_hugepage=never NUMA=off#' /etc/default/grub #普通啟動方式 grub2-mkconfig -o /boot/grub2/grub.cfg #efi模式 # grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg if [[ $? != 0 ]]; then echo "THP change failed, Please manual change!" else echo "THP has been disabled!!!" fi fi } unzip_soft(){ chown oracle:oinstall $SPATH/$FNAME echo "Begin unzip......" su - oracle -c "unzip -qo $SPATH/$FNAME -d $ORAHOME" } env_info mk_path change_os add_user change_param unzip_soft
nohup ./install_db01.sh > 01.log &
開始安裝資料庫:
su - oracle
[oracle@cjc db]$ pwd
/oracle/product/21.3/db
[oracle@cjc db]$ ./runInstaller
[oracle@cjc db]$ source /home/oracle/.bash_profile
[oracle@cjc db]$ sqlplus -v
SQL*Plus: Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
[oracle@cjc db]$ netca
[oracle@cjc db]$ dbca
EM:
#####chenjuchao 2021-08-17 18:00#####
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2787431/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Linux 7.5下載和安裝OracleLinux
- Oracle 19C 下載和安裝Oracle
- oracle11g安裝和下載Oracle
- Oracle 19C下載和安裝(二)Oracle
- Oracle 19C的下載和安裝部署(圖形安裝和靜默安裝)Oracle
- Windows下Oracle的下載與安裝WindowsOracle
- maven下載和安裝Maven
- Nginx下載和安裝Nginx
- clickhouse下載和安裝
- tengine下載和安裝
- 下載和安裝PycharmPyCharm
- Oracle 21C OCR和OLR管理Oracle
- Charles的下載和安裝
- Python 下載安裝和配置Python
- nodejs下載、安裝和配置NodeJS
- oracleLinux下安裝oracleOracleLinux
- ubuntu下安裝oracleUbuntuOracle
- windows下oracle安裝WindowsOracle
- MySQL的下載、安裝和配置MySql
- Tesseract引擎的下載和安裝
- Centos 7下下載和安裝dockerCentOSDocker
- typora下載安裝以及notepad++下載安裝
- Oracle 21C TriggersOracle
- Oracle 23C Free下載安裝及新特性Oracle
- 11. Oracle for Linux安裝和配置—11.3. Oracle安裝和配置—11.3.1. Oracle軟體安裝OracleLinux
- MAT(Memory Analyzer Tool)下載和安裝
- java中maven下載和安裝整理JavaMaven
- 下載和安裝MySQL資料庫MySql資料庫
- xftp和xshell,xftp和xshell的下載安裝FTP
- xftp和xshell,xftp和xshell的下載和安裝FTP
- Oracle 21C Flex ClustersOracleFlex
- Oracle 21C Extended ClustersOracle
- oracle下載安裝及PLSQL連線資料庫教程OracleSQL資料庫
- 下載安裝ApacheApache
- Newman下載安裝
- MySQL下載安裝MySql
- 下載安裝gitGit
- VMware 下載安裝