11GR2 rac 2节点一键安装演示

Oracle 一键安装脚本,演示 2 节点 RAC 一键安装过程(全程无需人工干预):(脚本包括 GRID/ORALCE PSU/OJVM 补丁自动安装

⭐️ 脚本下载地址:Shell脚本安装Oracle数据库

脚本第三代支持 N 节点一键安装,不限制节点数!

image.png

[root@rac01 soft]# ll
total 11144948
-rwx------. 1 root root 2889184573 Mar 11 14:13 LINUX.X64_193000_grid_home.zip
-rwxr-xr-x. 1 root root     163165 Mar 11 14:23 OracleShellInstall
-rwx------. 1 root root 1395582860 Mar 11 14:12 p13390677_112040_Linux-x86-64_1of7.zip
-rwx------. 1 root root 1151304589 Mar 11 14:12 p13390677_112040_Linux-x86-64_2of7.zip
-rwx------. 1 root root 1205251894 Mar 11 14:12 p13390677_112040_Linux-x86-64_3of7.zip
-rwx------. 1 root root  174911877 Mar 11 14:12 p18370031_112040_Linux-x86-64.zip
-rwx------. 1 root root 1319414278 Mar 11 14:13 p31718723_112040_Linux-x86-64.zip
-rwx------. 1 root root 3153297056 Mar 11 14:15 p35940989_190000_Linux-x86-64.zip
-rwx------. 1 root root  122976179 Mar 11 14:12 p6880880_112000_Linux-x86-64.zip
-rwx------. 1 root root     321590 Mar 11 14:12 rlwrap-0.44.tar.gz
[root@rac01 soft]# ./OracleShellInstall -n rac `# hostname prefix`\
> -hn rac01,rac02 `# rac node hostname`\
> -cn rac-cls `# cluster_name`\
> -rp oracle `# root password`\
> -gp oracle `# grid password`\
> -op oracle `# oracle password`\
> -lf ens192 `# local ip ifname`\
> -pf ens224 `# rac private ip ifname`\
> -ri 192.168.6.151,192.168.6.152 `# rac node public ip`\
> -vi 192.168.6.153,192.168.6.154 `# rac virtual ip`\
> -si 192.168.6.155 `# rac scan ip`\
> -od /dev/sdb `# rac ocr asm disk`\
> -dd /dev/sdc `# rac data asm disk`\
> -o lucifer `# dbname`\
> -ds AL32UTF8 `# database character`\
> -ns AL16UTF16 `# national character`\
> -dp oracle `# sys/system password`\
> -gpa 31718723 `# grid PSU/RU`\
> -opd Y `# optimize db`

   ███████                             ██          ████████ ██               ██  ██ ██                    ██              ██  ██
  ██░░░░░██                           ░██         ██░░░░░░ ░██              ░██ ░██░██                   ░██             ░██ ░██
 ██     ░░██ ██████  ██████    █████  ░██  █████ ░██       ░██       █████  ░██ ░██░██ ███████   ██████ ██████  ██████   ░██ ░██
░██      ░██░░██░░█ ░░░░░░██  ██░░░██ ░██ ██░░░██░█████████░██████  ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░  ░░░░░░██  ░██ ░██
░██      ░██ ░██ ░   ███████ ░██  ░░  ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██  ░██░░█████   ░██    ███████  ░██ ░██
░░██     ██  ░██    ██░░░░██ ░██   ██ ░██░██░░░░        ░██░██  ░██░██░░░░  ░██ ░██░██ ░██  ░██ ░░░░░██  ░██   ██░░░░██  ░██ ░██
 ░░███████  ░███   ░░████████░░█████  ███░░██████ ████████ ░██  ░██░░██████ ███ ███░██ ███  ░██ ██████   ░░██ ░░████████ ███ ███
  ░░░░░░░   ░░░     ░░░░░░░░  ░░░░░  ░░░  ░░░░░░ ░░░░░░░░  ░░   ░░  ░░░░░░ ░░░ ░░░ ░░ ░░░   ░░ ░░░░░░     ░░   ░░░░░░░░ ░░░ ░░░ 


请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : 11

数据库安装模式输入错误,请重新选择!                                                                                  


请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : rac

数据库安装模式: rac                                                                              

请选择数据库版本 [11/12/19/21] : 11

数据库版本:     11                                                                               

#==============================================================#                                                                                  
配置本地 YUM 源                                                                                  
#==============================================================#                                                                                  

[server]
name=server
baseurl=file:///mnt
enabled=1
gpgcheck=0

#==============================================================#                                                                                  
获取 ASM 磁盘 UUID && 格式化磁盘头                                                                                  
#==============================================================#                                                                                  

格式化 OCR 磁盘:/dev/sdb                                                                                  

1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.0182662 s, 56.1 kB/s

OCR磁盘组的磁盘UUID: 2e87e4f535c397171                                                                

格式化 DATA 磁盘:/dev/sdc                                                                                  

1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.00229086 s, 447 kB/s

DATA磁盘组的磁盘UUID: 2f218dae15b551c5d                                                                

#==============================================================#                                                                                  
配置 root 用户互信                                                                                  
#==============================================================#                                                                                  

Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:uema8IGjLzyomcTc3f1seLCSNK0lFbf2aKndAOKLIFg root@rac01
The key's randomart image is:
+---[RSA 2048]----+
|                 |
|         . .     |
|          o .    |
|  E    . + o     |
|..    . S o +    |
|+......=.* = .   |
| *..=.+.X.B o    |
|oo+. = O +o+ .   |
|= .+. +.o oo     |
+----[SHA256]-----+

#==============================================================#                                                                                  
禁用防火墙                                                                                       
#==============================================================#                                                                                  

● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Mar 11 14:50:08 rac01 systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 11 14:50:10 rac01 systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 11 14:50:11 rac01 firewalld[982]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
Mar 11 15:05:10 rac01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Mar 11 15:05:11 rac01 systemd[1]: Stopped firewalld - dynamic firewall daemon.

#==============================================================#                                                                                  
禁用 SELinux                                                                                        
#==============================================================#                                                                                  

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          disabled
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31

#==============================================================#                                                                                  
YUM 静默安装依赖包                                                                                  
#==============================================================#                                                                                  

bc-1.06.95-13.el7.x86_64
binutils-2.27-44.base.el7.x86_64
compat-libcap1-1.10-7.el7.x86_64
gcc-4.8.5-44.el7.x86_64
gcc-c++-4.8.5-44.el7.x86_64
elfutils-libelf-0.176-5.el7.x86_64
elfutils-libelf-devel-0.176-5.el7.x86_64
glibc-2.17-317.el7.x86_64
glibc-devel-2.17-317.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libgcc-4.8.5-44.el7.x86_64
libstdc++-4.8.5-44.el7.x86_64
libstdc++-devel-4.8.5-44.el7.x86_64
libxcb-1.13-1.el7.x86_64
libX11-1.6.7-2.el7.x86_64
libXau-1.0.8-2.1.el7.x86_64
libXi-1.7.9-1.el7.x86_64
libXrender-0.9.10-1.el7.x86_64
make-3.82-24.el7.x86_64
net-tools-2.0-0.25.20131004git.el7.x86_64
smartmontools-7.0-2.el7.x86_64
sysstat-10.1.5-19.el7.x86_64
e2fsprogs-1.42.9-19.el7.x86_64
e2fsprogs-libs-1.42.9-19.el7.x86_64
unzip-6.0-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
readline-6.2-11.el7.x86_64
readline-devel-6.2-11.el7.x86_64
psmisc-22.20-17.el7.x86_64
ksh-20120801-142.el7.x86_64
nfs-utils-1.3.0-0.68.el7.x86_64
tar-1.26-35.el7.x86_64
device-mapper-multipath-0.4.9-133.el7.x86_64
avahi-0.6.31-20.el7.x86_64
ntp-4.2.6p5-29.el7_8.2.x86_64
chrony-3.4-1.el7.x86_64
libXtst-1.2.3-1.el7.x86_64
libXrender-devel-0.9.10-1.el7.x86_64
fontconfig-devel-2.13.0-4.3.el7.x86_64
policycoreutils-2.5-34.el7.x86_64
policycoreutils-python-2.5-34.el7.x86_64

#==============================================================#                                                                                  
配置主机名                                                                                       
#==============================================================#                                                                                  

rac01

#==============================================================#                                                                                  
配置 /etc/hosts 文件                                                                                  
#==============================================================#                                                                                  

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

## OracleBegin

## RAC1 IP's: rac01

## RAC1 Public IP
192.168.6.151 rac01
## RAC1 Virtual IP
192.168.6.153 rac01-vip
## RAC1 Private IP
1.1.1.1 rac01-priv

## RAC2 IP's: rac02

## RAC2 Public IP
192.168.6.152 rac02
## RAC2 Virtual IP
192.168.6.154 rac02-vip
## RAC2 Private IP
1.1.1.2 rac02-priv

## SCAN IP
192.168.6.155 rac-scan

#==============================================================#                                                                                  
创建用户和组                                                                                    
#==============================================================#                                                                                  

oracle 用户:                                                                                      

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba),54327(asmdba),54328(asmoper),54329(asmadmin)

grid 用户:                                                                                        

uid=11012(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba),54327(asmdba),54328(asmoper),54329(asmadmin)


#==============================================================#                                                                                  
配置 Avahi-daemon 服务                                                                                  
#==============================================================#                                                                                  

● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Mar 11 14:50:16 rac01 avahi-daemon[877]: Joining mDNS multicast group on interface virbr0.IPv4 with address 192.168.122.1.
Mar 11 14:50:16 rac01 avahi-daemon[877]: New relevant interface virbr0.IPv4 for mDNS.
Mar 11 14:50:16 rac01 avahi-daemon[877]: Registering new address record for 192.168.122.1 on virbr0.IPv4.
Mar 11 14:55:25 rac01 avahi-daemon[877]: Registering new address record for fe80::a8ce:7574:2cec:a98e on ens224.*.
Mar 11 14:55:25 rac01 avahi-daemon[877]: Joining mDNS multicast group on interface ens224.IPv4 with address 1.1.1.1.
Mar 11 14:55:25 rac01 avahi-daemon[877]: New relevant interface ens224.IPv4 for mDNS.
Mar 11 14:55:25 rac01 avahi-daemon[877]: Registering new address record for 1.1.1.1 on ens224.IPv4.
Mar 11 15:05:41 rac01 avahi-daemon[877]: Got SIGTERM, quitting.
Mar 11 15:05:41 rac01 systemd[1]: Stopping Avahi mDNS/DNS-SD Stack...
Mar 11 15:05:41 rac01 systemd[1]: Stopped Avahi mDNS/DNS-SD Stack.

#==============================================================#                                                                                  
配置透明大页 && NUMA && 磁盘 IO 调度器                                                                                  
#==============================================================#                                                                                  

args="ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8 numa=off transparent_hugepage=never elevator=deadline"
-rd.lvm.lv=rhel/root
-args="ro
args="ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
-elevator=deadline"
-transparent_hugepage=never

#==============================================================#                                                                                  
配置 sysctl.conf                                                                                    
#==============================================================#                                                                                  

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8369385471
kernel.shmmni = 4096
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 = 1048576
vm.min_free_kbytes = 32692
net.ipv4.conf.ens192.rp_filter = 1
vm.swappiness = 10
kernel.panic_on_oops = 1
kernel.randomize_va_space = 2
kernel.numa_balancing = 0
net.ipv4.conf.ens224.rp_filter = 2

#==============================================================#                                                                                  
配置 nsysctl.conf                                                                                   
#==============================================================#                                                                                  

NOZEROCONF=yes

#==============================================================#                                                                                  
配置 RemoveIPC                                                                                      
#==============================================================#                                                                                  

[Login]
RemoveIPC=no

#==============================================================#                                                                                  
配置 /etc/security/limits.conf 和 /etc/pam.d/login                                                                                  
#==============================================================#                                                                                  

查看 /etc/security/limits.conf:                                                                                  

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft nproc 2047
oracle hard nproc 16384
oracle hard memlock unlimited
oracle soft memlock unlimited
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
grid soft nproc 2047
grid hard nproc 16384

查看 /etc/pam.d/login 文件:                                                                                  

auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       substack     system-auth
auth       include      postlogin
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
session    include      postlogin
-session   optional     pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so

#==============================================================#                                                                                  
配置 /dev/shm                                                                                       
#==============================================================#                                                                                  

/dev/mapper/rhel-root   /                       xfs     defaults        0 0
UUID=64fa46ff-7a45-4939-b2bf-f995a20165d1 /boot                   xfs     defaults        0 0
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
tmpfs /dev/shm tmpfs size=8173228k 0 0

#==============================================================#                                                                                  
安装 rlwrap 插件                                                                                  
#==============================================================#                                                                                  

成功安装 rlwrap: rlwrap 0.44                                                                      

#==============================================================#                                                                                  
Root 用户环境变量                                                                                  
#==============================================================#                                                                                  

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
alias so='su - oracle'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
alias sg='su - grid'
alias crsctl='/u01/app/11.2.0/grid/bin/crsctl'
alias srvctl='/u01/app/11.2.0/grid/bin/srvctl'

#==============================================================#                                                                                  
Oracle 用户环境变量                                                                                  
#==============================================================#                                                                                  

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
umask 022
export TMP=/tmp
export TMPDIR=$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=lucifer1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
export PERL5LIB=$ORACLE_HOME/perl/lib
alias sas='sqlplus / as sysdba'
alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias adrci='rlwrap adrci'

#==============================================================#                                                                                  
Grid 用户环境变量                                                                                  
#==============================================================#                                                                                  

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
umask 022
export TMP=/tmp
export TMPDIR=$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=+ASM1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
alias sas='sqlplus / as sysasm'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
alias sqlplus='rlwrap sqlplus'
alias asmcmd='rlwrap asmcmd'
alias adrci='rlwrap adrci'

#==============================================================#                                                                                  
配置 multipath 多路径                                                                                  
#==============================================================#                                                                                  

create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET  ,IMAGEFILE       
size=10G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
  `- 33:0:0:0 sdb 8:16 undef ready running
create: asm_data_1 (2f218dae15b551c5d) undef ROCKET  ,IMAGEFILE       
size=20G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
  `- 33:0:0:1 sdc 8:32 undef ready running

#==============================================================#                                                                                  
配置 UDEV 绑盘                                                                                    
#==============================================================#                                                                                  

KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2e87e4f535c397171",SYMLINK+="asm_ocr_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2f218dae15b551c5d",SYMLINK+="asm_data_1",OWNER="grid",GROUP="asmadmin",MODE="0660"

/dev/asm_data_1
/dev/asm_ocr_1

UDEV 配置完成!                                                                                    

#==============================================================#                                                                                  
配置 RAC 节点:192.168.6.152                                                                                  
#==============================================================#                                                                                  

正在节点:192.168.6.152 上执行脚本:                                                                                  

   ███████                             ██          ████████ ██               ██  ██ ██                    ██              ██  ██
  ██░░░░░██                           ░██         ██░░░░░░ ░██              ░██ ░██░██                   ░██             ░██ ░██
 ██     ░░██ ██████  ██████    █████  ░██  █████ ░██       ░██       █████  ░██ ░██░██ ███████   ██████ ██████  ██████   ░██ ░██
░██      ░██░░██░░█ ░░░░░░██  ██░░░██ ░██ ██░░░██░█████████░██████  ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░  ░░░░░░██  ░██ ░██
░██      ░██ ░██ ░   ███████ ░██  ░░  ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██  ░██░░█████   ░██    ███████  ░██ ░██
░░██     ██  ░██    ██░░░░██ ░██   ██ ░██░██░░░░        ░██░██  ░██░██░░░░  ░██ ░██░██ ░██  ░██ ░░░░░██  ░██   ██░░░░██  ░██ ░██
 ░░███████  ░███   ░░████████░░█████  ███░░██████ ████████ ░██  ░██░░██████ ███ ███░██ ███  ░██ ██████   ░░██ ░░████████ ███ ███
  ░░░░░░░   ░░░     ░░░░░░░░  ░░░░░  ░░░  ░░░░░░ ░░░░░░░░  ░░   ░░  ░░░░░░ ░░░ ░░░ ░░ ░░░   ░░ ░░░░░░     ░░   ░░░░░░░░ ░░░ ░░░ 


#==============================================================#                                                                                  
配置本地 YUM 源                                                                                  
#==============================================================#                                                                                  

[server]
name=server
baseurl=file:///mnt
enabled=1
gpgcheck=0

#==============================================================#                                                                                  
禁用防火墙                                                                                       
#==============================================================#                                                                                  

● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Mar 11 14:50:11 rac02 systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 11 14:50:13 rac02 systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 11 14:50:13 rac02 firewalld[972]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
Mar 11 15:06:15 rac02 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Mar 11 15:06:16 rac02 systemd[1]: Stopped firewalld - dynamic firewall daemon.

#==============================================================#                                                                                  
禁用 SELinux                                                                                        
#==============================================================#                                                                                  

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          disabled
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31

#==============================================================#                                                                                  
YUM 静默安装依赖包                                                                                  
#==============================================================#                                                                                  

bc-1.06.95-13.el7.x86_64
binutils-2.27-44.base.el7.x86_64
compat-libcap1-1.10-7.el7.x86_64
gcc-4.8.5-44.el7.x86_64
gcc-c++-4.8.5-44.el7.x86_64
elfutils-libelf-0.176-5.el7.x86_64
elfutils-libelf-devel-0.176-5.el7.x86_64
glibc-2.17-317.el7.x86_64
glibc-devel-2.17-317.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libgcc-4.8.5-44.el7.x86_64
libstdc++-4.8.5-44.el7.x86_64
libstdc++-devel-4.8.5-44.el7.x86_64
libxcb-1.13-1.el7.x86_64
libX11-1.6.7-2.el7.x86_64
libXau-1.0.8-2.1.el7.x86_64
libXi-1.7.9-1.el7.x86_64
libXrender-0.9.10-1.el7.x86_64
make-3.82-24.el7.x86_64
net-tools-2.0-0.25.20131004git.el7.x86_64
smartmontools-7.0-2.el7.x86_64
sysstat-10.1.5-19.el7.x86_64
e2fsprogs-1.42.9-19.el7.x86_64
e2fsprogs-libs-1.42.9-19.el7.x86_64
unzip-6.0-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
readline-6.2-11.el7.x86_64
readline-devel-6.2-11.el7.x86_64
psmisc-22.20-17.el7.x86_64
ksh-20120801-142.el7.x86_64
nfs-utils-1.3.0-0.68.el7.x86_64
tar-1.26-35.el7.x86_64
device-mapper-multipath-0.4.9-133.el7.x86_64
avahi-0.6.31-20.el7.x86_64
ntp-4.2.6p5-29.el7_8.2.x86_64
chrony-3.4-1.el7.x86_64
libXtst-1.2.3-1.el7.x86_64
libXrender-devel-0.9.10-1.el7.x86_64
fontconfig-devel-2.13.0-4.3.el7.x86_64
policycoreutils-2.5-34.el7.x86_64
policycoreutils-python-2.5-34.el7.x86_64

#==============================================================#                                                                                  
配置主机名                                                                                       
#==============================================================#                                                                                  

rac02

#==============================================================#                                                                                  
配置 /etc/hosts 文件                                                                                  
#==============================================================#                                                                                  

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

## OracleBegin

## RAC1 IP's: rac01

## RAC1 Public IP
192.168.6.151 rac01
## RAC1 Virtual IP
192.168.6.153 rac01-vip
## RAC1 Private IP
1.1.1.1 rac01-priv

## RAC2 IP's: rac02

## RAC2 Public IP
192.168.6.152 rac02
## RAC2 Virtual IP
192.168.6.154 rac02-vip
## RAC2 Private IP
1.1.1.2 rac02-priv

## SCAN IP
192.168.6.155 rac-scan

#==============================================================#                                                                                  
创建用户和组                                                                                    
#==============================================================#                                                                                  

oracle 用户:                                                                                      

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba),54327(asmdba),54328(asmoper),54329(asmadmin)

grid 用户:                                                                                        

uid=11012(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba),54327(asmdba),54328(asmoper),54329(asmadmin)


#==============================================================#                                                                                  
配置 Avahi-daemon 服务                                                                                  
#==============================================================#                                                                                  

● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Mar 11 14:56:12 rac02 avahi-daemon[909]: Leaving mDNS multicast group on interface ens224.IPv4 with address 1.1.1.1.
Mar 11 14:56:12 rac02 avahi-daemon[909]: Interface ens224.IPv4 no longer relevant for mDNS.
Mar 11 14:56:16 rac02 avahi-daemon[909]: Registering new address record for fe80::3044:e992:319f:95a2 on ens224.*.
Mar 11 14:56:16 rac02 avahi-daemon[909]: Joining mDNS multicast group on interface ens224.IPv4 with address 1.1.1.2.
Mar 11 14:56:16 rac02 avahi-daemon[909]: New relevant interface ens224.IPv4 for mDNS.
Mar 11 14:56:16 rac02 avahi-daemon[909]: Registering new address record for 1.1.1.2 on ens224.IPv4.
Mar 11 15:06:45 rac02 avahi-daemon[909]: Got SIGTERM, quitting.
Mar 11 15:06:45 rac02 avahi-daemon[909]: Leaving mDNS multicast group on interface virbr0.IPv4 with address 192.168.122.1.
Mar 11 15:06:45 rac02 systemd[1]: Stopping Avahi mDNS/DNS-SD Stack...
Mar 11 15:06:45 rac02 systemd[1]: Stopped Avahi mDNS/DNS-SD Stack.

#==============================================================#                                                                                  
配置透明大页 && NUMA && 磁盘 IO 调度器                                                                                  
#==============================================================#                                                                                  

args="ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8 numa=off transparent_hugepage=never elevator=deadline"
-rd.lvm.lv=rhel/root
-args="ro
args="ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
-elevator=deadline"
-transparent_hugepage=never

#==============================================================#                                                                                  
配置 sysctl.conf                                                                                    
#==============================================================#                                                                                  

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8369381375
kernel.shmmni = 4096
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 = 1048576
vm.min_free_kbytes = 32692
net.ipv4.conf.ens192.rp_filter = 1
vm.swappiness = 10
kernel.panic_on_oops = 1
kernel.randomize_va_space = 2
kernel.numa_balancing = 0
net.ipv4.conf.ens224.rp_filter = 2

#==============================================================#                                                                                  
配置 nsysctl.conf                                                                                   
#==============================================================#                                                                                  

NOZEROCONF=yes

#==============================================================#                                                                                  
配置 RemoveIPC                                                                                      
#==============================================================#                                                                                  

[Login]
RemoveIPC=no

#==============================================================#                                                                                  
配置 /etc/security/limits.conf 和 /etc/pam.d/login                                                                                  
#==============================================================#                                                                                  

查看 /etc/security/limits.conf:                                                                                  

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft nproc 2047
oracle hard nproc 16384
oracle hard memlock unlimited
oracle soft memlock unlimited
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
grid soft nproc 2047
grid hard nproc 16384

查看 /etc/pam.d/login 文件:                                                                                  

auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       substack     system-auth
auth       include      postlogin
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
session    include      postlogin
-session   optional     pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so

#==============================================================#                                                                                  
配置 /dev/shm                                                                                       
#==============================================================#                                                                                  

/dev/mapper/rhel-root   /                       xfs     defaults        0 0
UUID=96b8401c-571c-4575-82e9-1ce6b248167b /boot                   xfs     defaults        0 0
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
tmpfs /dev/shm tmpfs size=8173224k 0 0

#==============================================================#                                                                                  
安装 rlwrap 插件                                                                                  
#==============================================================#                                                                                  

成功安装 rlwrap: rlwrap 0.44                                                                      

#==============================================================#                                                                                  
Root 用户环境变量                                                                                  
#==============================================================#                                                                                  

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
alias so='su - oracle'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
alias sg='su - grid'
alias crsctl='/u01/app/11.2.0/grid/bin/crsctl'
alias srvctl='/u01/app/11.2.0/grid/bin/srvctl'

#==============================================================#                                                                                  
Oracle 用户环境变量                                                                                  
#==============================================================#                                                                                  

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
umask 022
export TMP=/tmp
export TMPDIR=$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=lucifer2
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
export PERL5LIB=$ORACLE_HOME/perl/lib
alias sas='sqlplus / as sysdba'
alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias adrci='rlwrap adrci'

#==============================================================#                                                                                  
Grid 用户环境变量                                                                                  
#==============================================================#                                                                                  

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
umask 022
export TMP=/tmp
export TMPDIR=$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=+ASM2
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
alias sas='sqlplus / as sysasm'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
alias sqlplus='rlwrap sqlplus'
alias asmcmd='rlwrap asmcmd'
alias adrci='rlwrap adrci'

#==============================================================#                                                                                  
配置 multipath 多路径                                                                                  
#==============================================================#                                                                                  

create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET  ,IMAGEFILE       
size=10G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
  `- 33:0:0:0 sdb 8:16 undef ready running
create: asm_data_1 (2f218dae15b551c5d) undef ROCKET  ,IMAGEFILE       
size=20G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
  `- 33:0:0:1 sdc 8:32 undef ready running

#==============================================================#                                                                                  
配置 UDEV 绑盘                                                                                    
#==============================================================#                                                                                  

KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2e87e4f535c397171",SYMLINK+="asm_ocr_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2f218dae15b551c5d",SYMLINK+="asm_data_1",OWNER="grid",GROUP="asmadmin",MODE="0660"

/dev/asm_data_1
/dev/asm_ocr_1

UDEV 配置完成!                                                                                    

配置 RAC 节点:192.168.6.152 结束!                                                                                  

#==============================================================#                                                                                  
配置 GRID 用户 SSH 互信                                                                                  
#==============================================================#                                                                                  

Generating public/private rsa key pair.
Your identification has been saved in /home/grid/.ssh/id_rsa.
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:C+4WKVUZStzk7GCgapAl7GpD2ad43ohScdxbpZfVyd0 grid@rac01
The key's randomart image is:
+---[RSA 2048]----+
|o . ...ooo   o o.|
| = . o.++ . . + E|
|+ +. .+.oo o     |
|.=..ooooo o      |
|+..oo..+S.       |
|o+.o..+. .       |
|..= o....        |
|.. o o.          |
|.    ..          |
+----[SHA256]-----+

#==============================================================#                                                                                  
配置 ORACLE 用户 SSH 互信                                                                                  
#==============================================================#                                                                                  

Generating public/private rsa key pair.
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:KKWkRDbMBGs6OyIY2zCmZewDloi5rPM4rJ+uFqDx+nM oracle@rac01
The key's randomart image is:
+---[RSA 2048]----+
|.==              |
| +o.             |
|... . .          |
|B+.o o .         |
|&*= o . S        |
|B/.  .           |
|@o=              |
|B=.oE            |
|BO*o             |
+----[SHA256]-----+

#==============================================================#                                                                                  
静默解压缩 Grid 软件包                                                                                  
#==============================================================#                                                                                  

正在静默解压缩 Grid 软件包,请稍等:                                                                                  

.---- -. -. .  .   .        .
( .',----- - - ' '      '                                         __
 \_/      ;--:-          __--------------------___  ____=========_||___
__U__n_^_''__[.  ooo___  | |_!_||_!_||_!_||_!_| |   |..|_i_|..|_i_|..|
c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| |   |                |
,_\___________'_|,L______],|______________________|_i,!________________!_i
/;_(@)(@)==(@)(@)   (o)(o)      (o)^(o)--(o)^(o)          (o)(o)-(o)(o)
""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""


静默解压 Grid 软件安装包: /soft/p13390677_112040_Linux-x86-64_3of7.zip                                                                                  

静默解压 Grid 软件补丁包: /soft/p31718723*.zip                                                                                  

静默安装 cvu 软件:cvuqdisk-1.0.9-1.rpm                                                                                  


#==============================================================#                                                                                  
静默解压 Oracle 软件包                                                                                  
#==============================================================#                                                                                  

正在静默解压缩 Oracle 软件包,请稍等:                                                                                  

.---- -. -. .  .   .        .
( .',----- - - ' '      '                                         __
 \_/      ;--:-          __--------------------___  ____=========_||___
__U__n_^_''__[.  ooo___  | |_!_||_!_||_!_||_!_| |   |..|_i_|..|_i_|..|
c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| |   |                |
,_\___________'_|,L______],|______________________|_i,!________________!_i
/;_(@)(@)==(@)(@)   (o)(o)      (o)^(o)--(o)^(o)          (o)(o)-(o)(o)
""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""

静默解压 Oracle 软件安装包: /soft/p13390677_112040_Linux-x86-64_1of7.zip,/soft/p13390677_112040_Linux-x86-64_2of7.zip                                                                                  
unzip:  cannot find or open , .zip or .ZIP.

#==============================================================#                                                                                  
Grid 安装静默文件                                                                                  
#==============================================================#                                                                                  

INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=rac-scan
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.clusterName=rac-cls
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.clusterNodes=rac01:rac01-vip,rac02:rac02-vip
oracle.install.crs.config.networkInterfaceList=ens192:192.168.6.0:1,ens224:1.1.1.0:2
oracle.install.crs.config.useIPMI=false
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.disks=/dev/asm_ocr_1
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
oracle.install.asm.monitorPassword=oracle
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/11.2.0/grid
oracle.install.crs.config.storageOption=ASM_STORAGE
oracle.install.asm.diskGroup.AUSize=1
oracle.installer.autoupdates.option=SKIP_UPDATES

#==============================================================#                                                                                  
静默安装 Grid 软件                                                                                  
#==============================================================#                                                                                  

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 70362 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2024-03-11_03-10-21PM. Please wait ...[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2024-03-11_03-10-21PM.log

Prepare in progress.
..................................................   9% Done.

Prepare successful.

Copy files in progress.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   35% Done.
..................................................   40% Done.
..................................................   45% Done.
........................................
Copy files successful.

Link binaries in progress.

Link binaries successful.
..................................................   62% Done.

Setup files in progress.

Setup files successful.
..................................................   76% Done.

Perform remote operations in progress.
..................................................   89% Done.

Perform remote operations successful.
The installation of Oracle Grid Infrastructure 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2024-03-11_03-10-21PM.log' for more details.
..................................................   94% Done.

Execute Root Scripts in progress.

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/11.2.0/grid/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[rac01, rac02]
Execute /u01/app/11.2.0/grid/root.sh on the following nodes: 
[rac01, rac02]

..................................................   100% Done.

Execute Root Scripts successful.
As install user, execute the following script to complete the configuration.
        1. /u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>

        Note:
        1. This script must be run on the same host from where installer was run. 
        2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).


Successfully Setup Software.

#==============================================================#                                                                                  
静默安装 18370031 补丁                                                                                  
#==============================================================#                                                                                  

节点 192.168.6.151 :                                                                                  

Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2024-03-11_15-16-48PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   18370031  

Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '18370031' to OH '/u01/app/11.2.0/grid'

Patching component oracle.crs, 11.2.0.4.0...

Verifying the update...
Patch 18370031 successfully applied.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2024-03-11_15-16-48PM_1.log

OPatch succeeded.

节点 192.168.6.152 :                                                                                  

Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2024-03-11_15-17-51PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   18370031  

Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '18370031' to OH '/u01/app/11.2.0/grid'

Patching component oracle.crs, 11.2.0.4.0...

Verifying the update...
Patch 18370031 successfully applied.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2024-03-11_15-17-51PM_1.log

OPatch succeeded.

#==============================================================#                                                                                  
执行 root 脚本                                                                                    
#==============================================================#                                                                                  

节点 192.168.6.151 :                                                                                  

Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/11.2.0/grid/install/root_rac01_2024-03-11_15-18-44.log for the output of root script

节点 192.168.6.152 :                                                                                  

Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/11.2.0/grid/install/root_rac02_2024-03-11_15-25-29.log for the output of root script

#==============================================================#                                                                                  
Grid 软件安装补丁                                                                                  
#==============================================================#                                                                                  

节点 192.168.6.151 :                                                                                  

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /soft -patchn 31718723 -oh /u01/app/11.2.0/grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2024-03-11_15-32-56.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2024-03-11_15-32-56.report.log

2024-03-11 15:32:56: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...
Stopped CRS successfully

patch /soft/31718723/29938455  apply successful for home  /u01/app/11.2.0/grid 
patch /soft/31718723/31537677  apply successful for home  /u01/app/11.2.0/grid 
patch /soft/31718723/29509309  apply successful for home  /u01/app/11.2.0/grid 

Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

节点 192.168.6.152 :                                                                                  

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /soft -patchn 31718723 -oh /u01/app/11.2.0/grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2024-03-11_15-44-23.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2024-03-11_15-44-23.report.log

2024-03-11 15:44:23: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...
Stopped CRS successfully

patch /soft/31718723/29938455  apply successful for home  /u01/app/11.2.0/grid 
patch /soft/31718723/31537677  apply successful for home  /u01/app/11.2.0/grid 
patch /soft/31718723/29509309  apply successful for home  /u01/app/11.2.0/grid 

Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.

#==============================================================#                                                                                  
Grid 软件版本                                                                                     
#==============================================================#                                                                                  


SQL*Plus: Release 11.2.0.4.0 Production


#==============================================================#                                                                                  
Grid 补丁信息                                                                                     
#==============================================================#                                                                                  

29509309;ACFS Patch Set Update : 11.2.0.4.190716 (29509309)
31537677;Database Patch Set Update : 11.2.0.4.201020 (31537677)
29938455;OCW Patch Set Update : 11.2.0.4.191015 (29938455)

OPatch succeeded.


#==============================================================#                                                                                  
ASM 磁盘组创建                                                                                   
#==============================================================#                                                                                  

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     20480    20385                0           20385              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     10240     9844                0            9844              0             Y  OCR/

#==============================================================#                                                                                  
Oracle 安装静默文件                                                                                  
#==============================================================#                                                                                  

oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=rac01,rac02
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES

#==============================================================#                                                                                  
静默安装数据库软件                                                                                  
#==============================================================#                                                                                  

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 61003 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 8188 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2024-03-11_03-56-34PM. Please wait ...You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2024-03-11_03-56-34PM.log

Prepare in progress.
..................................................   9% Done.

Prepare successful.

Copy files in progress.
..................................................   14% Done.
..................................................   19% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   36% Done.
..................................................   41% Done.
..................................................   46% Done.
..................................................   51% Done.
..................................................   56% Done.

Copy files successful.
..........
Link binaries in progress.

Link binaries successful.
..................................................   77% Done.

Setup files in progress.
..................................................   94% Done.

Setup files successful.
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2024-03-11_03-56-34PM.log' for more details.

Execute Root Scripts in progress.

As a root user, execute the following script(s):
        1. /u01/app/oracle/product/11.2.0/db/root.sh

Execute /u01/app/oracle/product/11.2.0/db/root.sh on the following nodes: 
[rac01, rac02]

..................................................   100% Done.

Execute Root Scripts successful.
Successfully Setup Software.

#==============================================================#                                                                                  
执行 root 脚本                                                                                    
#==============================================================#                                                                                  

节点 192.168.6.151 :                                                                                  

Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/oracle/product/11.2.0/db/install/root_rac01_2024-03-11_16-06-33.log for the output of root script

节点 192.168.6.152 :                                                                                  

Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/oracle/product/11.2.0/db/install/root_rac02_2024-03-11_16-06-34.log for the output of root script

#==============================================================#                                                                                  
Oracle 软件安装补丁                                                                                  
#==============================================================#                                                                                  

error:  cannot open zipfile [ /soft/p6880880_112000_Linux-x86-64.zip ]
        Permission denied
unzip:  cannot find or open /soft/p6880880_112000_Linux-x86-64.zip, /soft/p6880880_112000_Linux-x86-64.zip.zip or /soft/p6880880_112000_Linux-x86-64.zip.ZIP.

#==============================================================#                                                                                  
Oracle 软件版本                                                                                   
#==============================================================#                                                                                  


SQL*Plus: Release 11.2.0.4.0 Production


#==============================================================#                                                                                  
Oracle 补丁信息                                                                                   
#==============================================================#                                                                                  

There are no Interim patches installed in this Oracle Home "/u01/app/oracle/product/11.2.0/db".

OPatch succeeded.


#==============================================================#                                                                                  
静默建库命令                                                                                    
#==============================================================#                                                                                  

dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-responseFile NO_VALUE \
-gdbname lucifer \
-sid lucifer \
-sysPassword oracle \
-systemPassword oracle \
-redoLogFileSize 1024 \
-diskGroupName DATA \
-storageType ASM \
-listeners LISTENER \
-nodeinfo rac01,rac02 \
-characterSet AL32UTF8 \
-nationalCharacterSet AL16UTF16 \
-emConfiguration NONE \
-automaticMemoryManagement false \
-totalMemory 3990 \
-databaseType OLTP                                                                                  

#==============================================================#                                                                                  
创建数据库                                                                                       
#==============================================================#                                                                                  

Copying database files
1% complete
3% complete
9% complete
15% complete
21% complete
27% complete
30% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
44% complete
45% complete
48% complete
50% complete
Creating cluster database views
52% complete
70% complete
Completing Database Creation
73% complete
76% complete
85% complete
94% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/lucifer/lucifer.log" for further details.

#==============================================================#                                                                                  
配置 OMF && 优化 RMAN                                                                                  
#==============================================================#                                                                                  


Recovery Manager: Release 11.2.0.4.0 - Production on Mon Mar 11 16:13:27 2024

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: LUCIFER (DBID=4019230996)

RMAN> 
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_lucifer.f';
new RMAN configuration parameters are successfully stored

RMAN> 

Recovery Manager complete.


#==============================================================#                                                                                  
配置控制文件复用                                                                                  
#==============================================================#                                                                                  


Recovery Manager: Release 11.2.0.4.0 - Production on Mon Mar 11 16:14:02 2024

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: LUCIFER (not mounted)

RMAN> 
Starting restore at 11-MAR-24
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=128 instance=lucifer1 device type=DISK

channel ORA_DISK_1: copied control file copy
Finished restore at 11-MAR-24


Recovery Manager complete.

数据库控制文件:                                                                                  


NAME
----------------------------------------------------------------------------------------------------
+DATA/lucifer/controlfile/current.260.1163347733
+DATA/lucifer/controlfile/control02.ctl

#==============================================================#                                                                                  
配置在线重做日志                                                                                  
#==============================================================#                                                                                  

数据库在线重做日志文件:                                                                                  


   THREAD#     GROUP# MEMBER                                                                                                                      size(M)
---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
         1          1 +DATA/lucifer/onlinelog/group_1.261.1163347735                                                                                 1024
         1          2 +DATA/lucifer/onlinelog/group_2.262.1163347749                                                                                 1024
         1         11 +DATA/lucifer/onlinelog/group_11.272.1163348087                                                                                1024
         1         12 +DATA/lucifer/onlinelog/group_12.273.1163348101                                                                                1024
         1         13 +DATA/lucifer/onlinelog/group_13.274.1163348117                                                                                1024
         1         14 +DATA/lucifer/onlinelog/group_14.275.1163348135                                                                                1024
         1         15 +DATA/lucifer/onlinelog/group_15.276.1163348151                                                                                1024
         2          3 +DATA/lucifer/onlinelog/group_3.265.1163347931                                                                                 1024
         2          4 +DATA/lucifer/onlinelog/group_4.266.1163347947                                                                                 1024
         2         21 +DATA/lucifer/onlinelog/group_21.277.1163348165                                                                                1024
         2         22 +DATA/lucifer/onlinelog/group_22.278.1163348183                                                                                1024
         2         23 +DATA/lucifer/onlinelog/group_23.279.1163348199                                                                                1024
         2         24 +DATA/lucifer/onlinelog/group_24.280.1163348217                                                                                1024
         2         25 +DATA/lucifer/onlinelog/group_25.281.1163348233                                                                                1024

#==============================================================#                                                                                  
配置 RMAN 备份任务                                                                                  
#==============================================================#                                                                                  

## OracleBegin
00 02 * * * /home/oracle/scripts/del_arch.sh
#00 00 * * 0 /home/oracle/scripts/dbbackup_lv0.sh
#00 00 * * 1,2,3,4,5,6 /home/oracle/scripts/dbbackup_lv1.sh

#==============================================================#                                                                                  
配置 glogin.sql                                                                                     
#==============================================================#                                                                                  

define _editor=vi
set serveroutput on size 1000000
set pagesize 9999
set long 99999
set trimspool on
col name format a80
set termout off
define gname=idle
column global_name new_value gname
select lower(user) || '@' || substr( global_name, 1, decode( dot, 0, length(global_name), dot-1) ) global_name from (select global_name, instr(global_name,'.') dot from global_name );
ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
set sqlprompt '&gname _DATE> '
set termout on

#==============================================================#                                                                                  
优化数据库参数                                                                                  
#==============================================================#                                                                                  

数据库参数:                                                                                    


NAME                                               SID        SPVALUE                                                                          VALUE
-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
_b_tree_bitmap_plans                               *          FALSE                                                                            FALSE
_datafile_write_errors_crash_instance              *          FALSE                                                                            FALSE
audit_file_dest                                    *          /u01/app/oracle/admin/lucifer/adump                                              /u01/app/oracle/admin/lucifer/adump
audit_trail                                        *          NONE                                                                             DB
cluster_database                                   *          true                                                                             TRUE
compatible                                         *          11.2.0.4.0                                                                       11.2.0.4.0
control_file_record_keep_time                      *          31                                                                               31
db_block_size                                      *          8192                                                                             8192
db_create_file_dest                                *          +DATA                                                                            +DATA
db_file_multiblock_read_count                      *                                                                                           128
db_files                                           *          5000                                                                             200
db_name                                            *          lucifer                                                                          lucifer
db_writer_processes                                *                                                                                           1
deferred_segment_creation                          *          FALSE                                                                            FALSE
diagnostic_dest                                    *          /u01/app/oracle                                                                  /u01/app/oracle
dispatchers                                        *          (PROTOCOL=TCP) (SERVICE=luciferXDB)                                              (PROTOCOL=TCP) (SERVICE=luciferXDB)
enable_ddl_logging                                 *          TRUE                                                                             FALSE
event                                              *          10949 trace name context forever,level 1
event                                              *          28401 trace name context forever,level 1
fast_start_parallel_rollback                       *                                                                                           LOW
log_archive_dest_1                                 *          location=+DATA                                                                   location=+DATA
log_archive_format                                 *          %t_%s_%r.dbf                                                                     %t_%s_%r.dbf
max_dump_file_size                                 *                                                                                           unlimited
open_cursors                                       *          1000                                                                             300
optimizer_index_caching                            *                                                                                           0
optimizer_mode                                     *                                                                                           ALL_ROWS
parallel_force_local                               *          TRUE                                                                             FALSE
parallel_max_servers                               *          64                                                                               64
pga_aggregate_target                               *          1339031552                                                                       836763648
processes                                          *          2000                                                                             150
remote_login_passwordfile                          *          exclusive                                                                        EXCLUSIVE
resource_limit                                     *          TRUE                                                                             FALSE
resource_manager_plan                              *          force:
sec_case_sensitive_logon                           *          FALSE                                                                            TRUE
session_cached_cursors                             *          300                                                                              50
sessions                                           *                                                                                           248
sga_max_size                                       *          5356126208                                                                       3355443200
sga_target                                         *          5356126208                                                                       3355443200
spfile                                             *                                                                                           +DATA/lucifer/spfilelucifer.ora
statistics_level                                   *                                                                                           TYPICAL
undo_retention                                     *          10800                                                                            900

恭喜!Oracle RAC 安装成功,现在是否重启主机:[Y/N] Y

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/457048.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

LLVM-3.5 —— 01记,编译 LLVM 3.5.0 clang and clang-query

包括编译&#xff1a;clang clang-tools-extra 0, prepare env sudo apt install llvm sudo apt install clang 使用最新的g 会出错。 1, source code $ git clone --recursive $ cd llvm-project $ git checkout llvmorg-3.5.0 $ cp -r ./clang ./llvm/tools/ $ mkdir llv…

为什localhost被forbidden而127.0.0.1不被绊?

原因&#xff1a; 判段网关的时候判127.0.0.1&#xff0c;所以最好改localhost 其他参考&#xff1a; 【计算机网络】localhost不能访问&#xff0c;127.0.0.1可以访问&#xff1f;_ping localhost和ping 127.0.0.1-CSDN博客

如何关闭 Visual Studio 双击异常高亮

[问题描述]&#xff1a; 最近 Visual Studio 更新后&#xff0c;双击选中关键字快要亮瞎我的眼睛了 &#x1f440;&#x1f440; [解决方法]&#xff1a; 摸索了一下&#xff0c;找到了关闭的方法&#xff1a;工具 → 选项 → 文本编辑器 → 常规&#xff0c;然后取消 勾选 sel…

C#使用MiniExcel读取excel表格文件

使用MiniExcel读取excel表格文件 MiniExecl提供了几种读取方法。 准备测试数据 测试类&#xff1a; public class Person{public int Id { get; set; }public string Name { get; set; }public string Description { get; set; }public double Value { get; set; }}测试数据…

2023年全球运维大会(GOPS上海站):运维精英齐聚一堂,共探行业新知(附大会核心PPT下载)

随着信息技术的飞速发展&#xff0c;运维作为保障企业信息化系统稳定运行的关键环节&#xff0c;其重要性日益凸显。GOPS 主要面向运维行业的中高端技术人员&#xff0c;包括运维、开发、测试、架构师等群体。目的在于帮助IT技术从业者系统学习了解相关知识体系&#xff0c;让创…

Docker容器化技术(使用Docker搭建论坛)

第一步&#xff1a;删除容器镜像文件 [rootlocalhost ~]# docker rm -f docker ps -aq b09ee6438986 e0fe8ebf3ba1第二步&#xff1a;使用docker拉取数据库 [rootlocalhost ~]# docker run -d --name db mysql:5.7 02a4e5bfffdc81cb6403985fe4cd6acb0c5fab0b19edf9f5b8274783…

RocketMQ—如何解决消息堆积问题

RocketMQ—如何解决消息堆积问题 一般认为单条队列消息差值大于等于10万时&#xff0c;就算消息队列了。 生产者生产速度远远大于消费者消费的速度 我们可以增加消费者数量&#xff0c;但是需要满足消费者数量 小于等于 队列数量。 一般消费方消费消息是IO操作&#xff0c;…

Leetcode 118. 杨辉三角

题目描述&#xff1a; 给定一个非负整数 numRows&#xff0c;生成「杨辉三角」的前 numRows 行。 在「杨辉三角」中&#xff0c;每个数是它左上方和右上方的数的和。 示例 1: 输入: numRows 5 输出: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]] 示例 2: 输入: numRows 1 输…

Logstash 详细介绍、安装与使用

目录 1. Logstash 概述2. 工作原理3. 安装和配置1. 安装&#xff08;两种方法&#xff09;2. 测试运行3. 配置输入和输出 4. 使用 Grok 过滤器插件解析 Web 日志5. 使用 Geoip 过滤器插件增强数据6. 配置接收 Beats 的输入 1. Logstash 概述 Logstash 是一个具有实时管道功能的…

手把手教你苹果MacBook电脑清理内存怎么清理?

随着时间的推移&#xff0c;我们的电脑上总会不知不觉地堆积起各种各样的应用和文件。有些应用可能只是一时兴起安装&#xff0c;用过一次之后便束之高阁&#xff1b;有些文件则是工作、学习中产生的&#xff0c;但随着时间的推移已经变得毫无用处。这些不常用的应用和无用文件…

自己写的whoami

一、代码 #include<stdio.h> #include<stdlib.h> #include<proc/readproc.h> int main() {struct PROCTAB *pt;struct proc_t *p;char *cmd;ptmalloc(sizeof(struct PROCTAB));pmalloc(sizeof(struct proc_t));ptopenproc(0x0028);while(readproc(pt,p)!NUL…

C++ :内存管理 newdelete

目录 内存区域划分 C的动态内存的管理方式 new new的基本使用方法 【注意事项】 delete 【注意】 new和delete操作自定义类型 operator new 和 operator delete 【关于自定义类型new申请内存】 【原理】 【调用顺序】 【连续开辟空间问题】 malloc/free和…

数据结构 -- 第1章 绪论

1.1.3 起泡排序 局部有序与整体有序 在由一组整数组成的序列A[0, n - 1]中&#xff0c;满足A[i - 1] ≤ A[i]的相邻元素称作顺序的&#xff1b;否则是逆序的。 有序序列中每一对相邻元素都是顺序的&#xff0c;所有相邻元素均顺序的序列&#xff0c;也必然整体有序。 扫描交…

Profinet转CC-LINK网关功能与配置方法

CC-LINK转Profinet网关&#xff08;XD-PNCR20&#xff09;支持CC-Link系统&#xff0c;采用一种开放式架构的工业现场总线协议&#xff0c;允许不同厂商的设备依此协议进行通信。由于其良好的兼容性&#xff0c;CC-Link广泛使用在在制造产业中的机器控制或程序控制中&#xff0…

第十四届蓝桥杯省赛真题 Java A 组【原卷】

文章目录 发现宝藏【考生须知】试题 A \mathrm{A} A : 特殊日期试题 B: 与或异或试题 C : \mathrm{C}: C: 平均试题 D: 棋盘试题 E : \mathrm{E}: E: 互质数的个数试题 F: 阶乘的和试题 G: 小蓝的旅行计划试题 H: 太阳试题 I: 高塔试题 J \mathrm{J} J : 反异或 01 串 发现…

怎么把mp4转换成amv格式?如何下载amv格式视频?

MP4&#xff08;MPEG-4 Part 14&#xff09;是一种通用的视频文件格式&#xff0c;广泛用于多媒体应用。作为MPEG-4标准的一部分&#xff0c;MP4以其卓越的压缩性能、出色的视频质量和广泛的兼容性成为当前最流行的视频格式之一。 AMV文件格式的介绍 AMV文件格式起源于中国公司…

day2-C++

1>自己封装一个矩形类(Rect)&#xff0c;拥有私有属性:宽度(width)、高度(height)&#xff0c; 定义公有成员函数: 初始化函数:void init(int w, int h) 更改宽度的函数:set_w(int w) 更改高度的函数:set_h(int h) 输出该矩形的周长和面积函数:void show() 代码&#…

Synchronized的锁升级流程

1.步骤 无锁->偏向锁->轻量级锁->重量级锁 2.原因 第一步&#xff1a;无锁 现在有一个共享资源&#xff0c;还没有线程拥有它呢&#xff0c;所以也就不加锁&#xff0c;所以现在就是无锁状态 第二步&#xff1a;轻量级锁 这时候&#xff0c;来了一个线程A&#xf…

python备份库

个人简介 &#x1f468;&#x1f3fb;‍&#x1f4bb;个人主页&#xff1a;九黎aj &#x1f3c3;&#x1f3fb;‍♂️幸福源自奋斗,平凡造就不凡 &#x1f31f;如果文章对你有用&#xff0c;麻烦关注点赞收藏走一波&#xff0c;感谢支持&#xff01; &#x1f331;欢迎订阅我的…

【MIT 6.S081】2020, 实验记录(8),Lab: locks

目录 Task 1&#xff1a;Memory allocator (moderate)</font>Task 2&#xff1a;Buffer cache (hard)</font> Task 1&#xff1a;Memory allocator (moderate) 这个任务就是练习将一把大锁拆分为多个小锁&#xff0c;同时可以更加深入地理解 memory allocator 运行…