1
2 ███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
3 ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
4 ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
5░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
6░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
7░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
8 ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
9 ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
10
11
12请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : rac
13
14数据库安装模式: rac
15
16请选择数据库版本 [11/12/19/21] : 19
17
18数据库版本: 19
19
20#==============================================================#
21配置本地 YUM 源
22#==============================================================#
23
24[openEuler]
25name=openEuler
26baseurl=file:////mnt
27enabled=1
28gpgcheck=1
29gpgkey=file:////mnt/RPM-GPG-KEY-openEuler
30
31#==============================================================#
32获取 ASM 磁盘 UUID && 格式化磁盘头
33#==============================================================#
34
35格式化 OCR 磁盘:/dev/sdb
36
371+0 records in
381+0 records out
391024 bytes (1.0 kB, 1.0 KiB) copied, 0.000149528 s, 6.8 MB/s
40
41OCR磁盘组的磁盘UUID: 2e87e4f535c397171
42
43格式化 DATA 磁盘:/dev/sdc
44
451+0 records in
461+0 records out
471024 bytes (1.0 kB, 1.0 KiB) copied, 0.000148043 s, 6.9 MB/s
48
49DATA磁盘组的磁盘UUID: 2f218dae15b551c5d
50
51#==============================================================#
52禁用防火墙
53#==============================================================#
54
55防火墙服务未启动,无需禁用。
56
57#==============================================================#
58禁用 SELinux
59#==============================================================#
60
61SELinux status: disabled
62
63#==============================================================#
64YUM 静默安装依赖包
65#==============================================================#
66
67bc-1.07.1-12.oe2203sp3.x86_64
68binutils-2.37-24.oe2203sp3.x86_64
69package compat-libcap1 is not installed
70gcc-10.3.1-49.oe2203sp3.x86_64
71gcc-c++-10.3.1-49.oe2203sp3.x86_64
72package elfutils-libelf is not installed
73package elfutils-libelf-devel is not installed
74glibc-2.34-143.oe2203sp3.x86_64
75glibc-devel-2.34-143.oe2203sp3.x86_64
76libaio-0.3.113-9.oe2203sp3.x86_64
77libaio-devel-0.3.113-9.oe2203sp3.x86_64
78libgcc-10.3.1-49.oe2203sp3.x86_64
79libstdc++-10.3.1-49.oe2203sp3.x86_64
80libstdc++-devel-10.3.1-49.oe2203sp3.x86_64
81libxcb-1.15-1.oe2203sp3.x86_64
82libX11-1.7.2-8.oe2203sp3.x86_64
83libXau-1.0.10-1.oe2203sp3.x86_64
84libXi-1.8-2.oe2203sp3.x86_64
85libXrender-0.9.10-12.oe2203sp3.x86_64
86make-4.3-4.oe2203sp3.x86_64
87net-tools-2.10-3.oe2203sp3.x86_64
88smartmontools-7.2-2.oe2203sp3.x86_64
89sysstat-12.5.4-9.oe2203sp3.x86_64
90e2fsprogs-1.46.4-24.oe2203sp3.x86_64
91package e2fsprogs-libs is not installed
92unzip-6.0-50.oe2203sp3.x86_64
93openssh-clients-8.8p1-23.oe2203sp3.x86_64
94readline-8.1-3.oe2203sp3.x86_64
95readline-devel-8.1-3.oe2203sp3.x86_64
96psmisc-23.5-2.oe2203sp3.x86_64
97ksh-2020.0.0-10.oe2203sp3.x86_64
98nfs-utils-2.5.4-15.oe2203sp3.x86_64
99tar-1.34-5.oe2203sp3.x86_64
100package device-mapper-multipath is not installed
101avahi-0.8-18.oe2203sp3.x86_64
102ntp-4.2.8p15-13.oe2203sp3.x86_64
103chrony-4.1-6.oe2203sp3.x86_64
104libXtst-1.2.4-1.oe2203sp3.x86_64
105libXrender-devel-0.9.10-12.oe2203sp3.x86_64
106fontconfig-devel-2.13.94-3.oe2203sp3.x86_64
107policycoreutils-3.3-8.oe2203sp3.x86_64
108package policycoreutils-python is not installed
109package librdmacm is not installed
110package libnsl* is not installed
111package libibverbs is not installed
112package compat-openssl10 is not installed
113policycoreutils-python-utils-3.3-8.oe2203sp3.noarch
114package elfutils* is not installed
115glibc-2.34-143.oe2203sp3.x86_64
116
117#==============================================================#
118配置主机名
119#==============================================================#
120
121openEuler01
122
123#==============================================================#
124配置 /etc/hosts 文件
125#==============================================================#
126
127127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
128::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
129
130
131## OracleBegin
132
133## RAC1 IP's: openEuler01
134
135## RAC1 Public IP
136192.168.6.130 openEuler01
137## RAC1 Virtual IP
138192.168.6.132 openEuler01-vip
139## RAC1 Private IP
1401.1.1.1 openEuler01-priv
141
142## RAC2 IP's: openEuler02
143
144## RAC2 Public IP
145192.168.6.131 openEuler02
146## RAC2 Virtual IP
147192.168.6.133 openEuler02-vip
148## RAC2 Private IP
1491.1.1.2 openEuler02-priv
150
151## SCAN IP
152192.168.6.134 openEuler-scan
153
154#==============================================================#
155创建用户和组
156#==============================================================#
157
158oracle 用户:
159
160uid=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)
161
162grid 用户:
163
164uid=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)
165
166
167#==============================================================#
168配置 Avahi-daemon 服务
169#==============================================================#
170
171○ avahi-daemon.service - Avahi mDNS/DNS-SD Stack
172 Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
173 Active: inactive (dead)
174TriggeredBy: ○ avahi-daemon.socket
175
176#==============================================================#
177配置透明大页 && NUMA && 磁盘 IO 调度器
178#==============================================================#
179
180args="ro resume=/dev/mapper/openeuler-swap rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap cgroup_disable=files apparmor=0 crashkernel=512M rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
181-resume=/dev/mapper/openeuler-swap
182-args="ro
183args="ro resume=/dev/mapper/openeuler-swap rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap cgroup_disable=files apparmor=0 crashkernel=512M rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
184-rhgb
185-crashkernel=512M
186
187#==============================================================#
188配置 sysctl.conf
189#==============================================================#
190
191kernel.sysrq = 0
192net.ipv4.ip_forward = 0
193net.ipv4.conf.all.send_redirects = 0
194net.ipv4.conf.default.send_redirects = 0
195net.ipv4.conf.all.accept_source_route = 0
196net.ipv4.conf.default.accept_source_route = 0
197net.ipv4.conf.all.accept_redirects = 0
198net.ipv4.conf.default.accept_redirects = 0
199net.ipv4.conf.all.secure_redirects = 0
200net.ipv4.conf.default.secure_redirects = 0
201net.ipv4.icmp_echo_ignore_broadcasts = 1
202net.ipv4.icmp_ignore_bogus_error_responses = 1
203net.ipv4.conf.all.rp_filter = 1
204net.ipv4.conf.default.rp_filter = 1
205net.ipv4.tcp_syncookies = 1
206kernel.dmesg_restrict = 1
207net.ipv6.conf.all.accept_redirects = 0
208net.ipv6.conf.default.accept_redirects = 0
209fs.aio-max-nr = 1048576
210fs.file-max = 6815744
211kernel.shmall = 2097152
212kernel.shmmax = 7795077119
213kernel.shmmni = 4096
214kernel.sem = 250 32000 100 128
215net.ipv4.ip_local_port_range = 9000 65500
216net.core.rmem_default = 262144
217net.core.rmem_max = 4194304
218net.core.wmem_default = 262144
219net.core.wmem_max = 1048576
220vm.min_free_kbytes = 30449
221net.ipv4.conf.ens33.rp_filter = 1
222vm.swappiness = 10
223kernel.panic_on_oops = 1
224kernel.randomize_va_space = 2
225kernel.numa_balancing = 0
226net.ipv4.conf.ens37.rp_filter = 2
227
228#==============================================================#
229配置 RemoveIPC
230#==============================================================#
231
232[Login]
233RemoveIPC=no
234
235#==============================================================#
236配置 /etc/security/limits.conf 和 /etc/pam.d/login
237#==============================================================#
238
239查看 /etc/security/limits.conf:
240
241oracle soft nofile 1024
242oracle hard nofile 65536
243oracle soft stack 10240
244oracle hard stack 32768
245oracle soft nproc 2047
246oracle hard nproc 16384
247oracle hard memlock unlimited
248oracle soft memlock unlimited
249grid soft nofile 1024
250grid hard nofile 65536
251grid soft stack 10240
252grid hard stack 32768
253grid soft nproc 2047
254grid hard nproc 16384
255
256查看 /etc/pam.d/login 文件:
257
258auth substack system-auth
259auth include postlogin
260account required pam_nologin.so
261account include system-auth
262password include system-auth
263session required pam_selinux.so close
264session required pam_loginuid.so
265session required pam_selinux.so open
266session required pam_namespace.so
267session optional pam_keyinit.so force revoke
268session include system-auth
269session include postlogin
270-session optional pam_ck_connector.so
271session required pam_limits.so
272session required /lib64/security/pam_limits.so
273
274#==============================================================#
275配置 /dev/shm
276#==============================================================#
277
278/dev/mapper/openeuler-root / ext4 defaults 1 1
279UUID=07e6a80f-f2f4-42f8-a1ad-df05bd354960 /boot ext4 defaults 1 2
280/dev/mapper/openeuler-swap none swap defaults 0 0
281tmpfs /dev/shm tmpfs size=7612384k 0 0
282
283#==============================================================#
284Root 用户环境变量
285#==============================================================#
286
287if [ -f ~/.bashrc ]; then
288 . ~/.bashrc
289fi
290PATH=$PATH:$HOME/bin
291export PATH
292alias so='su - oracle'
293export PS1="[`whoami`@`hostname`:"'$PWD]$ '
294alias sg='su - grid'
295alias crsctl='/u01/app/19.3.0/grid/bin/crsctl'
296alias srvctl='/u01/app/19.3.0/grid/bin/srvctl'
297
298#==============================================================#
299Oracle 用户环境变量
300#==============================================================#
301
302[ -f ~/.bashrc ] && . ~/.bashrc
303umask 022
304export TMP=/tmp
305export TMPDIR=$TMP
306export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
307export ORACLE_BASE=/u01/app/oracle
308export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db
309export ORACLE_TERM=xterm
310export TNS_ADMIN=$ORACLE_HOME/network/admin
311export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
312export ORACLE_SID=lucifer1
313export PATH=/usr/sbin:$PATH
314export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
315export PERL5LIB=$ORACLE_HOME/perl/lib
316alias sas='sqlplus / as sysdba'
317alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
318alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
319alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
320export PS1="[`whoami`@`hostname`:"'$PWD]$ '
321export CV_ASSUME_DISTID=OL7
322alias sqlplus='rlwrap sqlplus'
323alias rman='rlwrap rman'
324alias adrci='rlwrap adrci'
325
326#==============================================================#
327Grid 用户环境变量
328#==============================================================#
329
330[ -f ~/.bashrc ] && . ~/.bashrc
331umask 022
332export TMP=/tmp
333export TMPDIR=$TMP
334export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
335export ORACLE_BASE=/u01/app/grid
336export ORACLE_HOME=/u01/app/19.3.0/grid
337export ORACLE_TERM=xterm
338export TNS_ADMIN=$ORACLE_HOME/network/admin
339export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
340export ORACLE_SID=+ASM1
341export PATH=/usr/sbin:$PATH
342export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
343alias sas='sqlplus / as sysasm'
344export PS1="[`whoami`@`hostname`:"'$PWD]$ '
345export CV_ASSUME_DISTID=OL7
346alias sqlplus='rlwrap sqlplus'
347alias asmcmd='rlwrap asmcmd'
348alias adrci='rlwrap adrci'
349
350#==============================================================#
351配置 multipath 多路径
352#==============================================================#
353
354415.530920 | asm_ocr_1: addmap [0 20971520 multipath 0 0 1 1 service-time 0 1 1 8:16 1]
355415.732452 | asm_data_1: addmap [0 104857600 multipath 0 0 1 1 service-time 0 1 1 8:32 1]
356create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET,IMAGEFILE
357size=10G features='0' hwhandler='0' wp=undef
358`-+- policy='service-time 0' prio=1 status=undef
359 `- 3:0:0:0 sdb 8:16 undef ready running
360create: asm_data_1 (2f218dae15b551c5d) undef ROCKET,IMAGEFILE
361size=50G features='0' hwhandler='0' wp=undef
362`-+- policy='service-time 0' prio=1 status=undef
363 `- 3:0:0:1 sdc 8:32 undef ready running
364
365#==============================================================#
366配置 UDEV 绑盘
367#==============================================================#
368
369KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2e87e4f535c397171",SYMLINK+="asm_ocr_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
370KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2f218dae15b551c5d",SYMLINK+="asm_data_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
371
372/dev/asm_data_1
373/dev/asm_ocr_1
374
375UDEV 配置完成!
376
377#==============================================================#
378配置 RAC 节点:192.168.6.131
379#==============================================================#
380
381正在节点:192.168.6.131 上执行脚本:
382
383 ███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
384 ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
385 ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
386░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
387░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
388░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
389 ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
390 ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
391
392
393#==============================================================#
394配置本地 YUM 源
395#==============================================================#
396
397[openEuler]
398name=openEuler
399baseurl=file:////mnt
400enabled=1
401gpgcheck=1
402gpgkey=file:////mnt/RPM-GPG-KEY-openEuler
403
404#==============================================================#
405禁用防火墙
406#==============================================================#
407
408防火墙服务未启动,无需禁用。
409
410#==============================================================#
411禁用 SELinux
412#==============================================================#
413
414SELinux status: disabled
415
416#==============================================================#
417YUM 静默安装依赖包
418#==============================================================#
419
420bc-1.07.1-12.oe2203sp3.x86_64
421binutils-2.37-24.oe2203sp3.x86_64
422package compat-libcap1 is not installed
423gcc-10.3.1-49.oe2203sp3.x86_64
424gcc-c++-10.3.1-49.oe2203sp3.x86_64
425package elfutils-libelf is not installed
426package elfutils-libelf-devel is not installed
427glibc-2.34-143.oe2203sp3.x86_64
428glibc-devel-2.34-143.oe2203sp3.x86_64
429libaio-0.3.113-9.oe2203sp3.x86_64
430libaio-devel-0.3.113-9.oe2203sp3.x86_64
431libgcc-10.3.1-49.oe2203sp3.x86_64
432libstdc++-10.3.1-49.oe2203sp3.x86_64
433libstdc++-devel-10.3.1-49.oe2203sp3.x86_64
434libxcb-1.15-1.oe2203sp3.x86_64
435libX11-1.7.2-8.oe2203sp3.x86_64
436libXau-1.0.10-1.oe2203sp3.x86_64
437libXi-1.8-2.oe2203sp3.x86_64
438libXrender-0.9.10-12.oe2203sp3.x86_64
439make-4.3-4.oe2203sp3.x86_64
440net-tools-2.10-3.oe2203sp3.x86_64
441smartmontools-7.2-2.oe2203sp3.x86_64
442sysstat-12.5.4-9.oe2203sp3.x86_64
443e2fsprogs-1.46.4-24.oe2203sp3.x86_64
444package e2fsprogs-libs is not installed
445unzip-6.0-50.oe2203sp3.x86_64
446openssh-clients-8.8p1-23.oe2203sp3.x86_64
447readline-8.1-3.oe2203sp3.x86_64
448readline-devel-8.1-3.oe2203sp3.x86_64
449psmisc-23.5-2.oe2203sp3.x86_64
450ksh-2020.0.0-10.oe2203sp3.x86_64
451nfs-utils-2.5.4-15.oe2203sp3.x86_64
452tar-1.34-5.oe2203sp3.x86_64
453package device-mapper-multipath is not installed
454avahi-0.8-18.oe2203sp3.x86_64
455ntp-4.2.8p15-13.oe2203sp3.x86_64
456chrony-4.1-6.oe2203sp3.x86_64
457libXtst-1.2.4-1.oe2203sp3.x86_64
458libXrender-devel-0.9.10-12.oe2203sp3.x86_64
459fontconfig-devel-2.13.94-3.oe2203sp3.x86_64
460policycoreutils-3.3-8.oe2203sp3.x86_64
461package policycoreutils-python is not installed
462package librdmacm is not installed
463package libnsl* is not installed
464package libibverbs is not installed
465package compat-openssl10 is not installed
466policycoreutils-python-utils-3.3-8.oe2203sp3.noarch
467package elfutils* is not installed
468glibc-2.34-143.oe2203sp3.x86_64
469
470#==============================================================#
471配置主机名
472#==============================================================#
473
474openEuler02
475
476#==============================================================#
477配置 /etc/hosts 文件
478#==============================================================#
479
480127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
481::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
482
483## OracleBegin
484
485## RAC1 IP's: openEuler01
486
487## RAC1 Public IP
488192.168.6.130 openEuler01
489## RAC1 Virtual IP
490192.168.6.132 openEuler01-vip
491## RAC1 Private IP
4921.1.1.1 openEuler01-priv
493
494## RAC2 IP's: openEuler02
495
496## RAC2 Public IP
497192.168.6.131 openEuler02
498## RAC2 Virtual IP
499192.168.6.133 openEuler02-vip
500## RAC2 Private IP
5011.1.1.2 openEuler02-priv
502
503## SCAN IP
504192.168.6.134 openEuler-scan
505
506#==============================================================#
507创建用户和组
508#==============================================================#
509
510oracle 用户:
511
512uid=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)
513
514grid 用户:
515
516uid=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)
517
518
519#==============================================================#
520配置 Avahi-daemon 服务
521#==============================================================#
522
523○ avahi-daemon.service - Avahi mDNS/DNS-SD Stack
524 Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
525 Active: inactive (dead)
526TriggeredBy: ○ avahi-daemon.socket
527
528#==============================================================#
529配置透明大页 && NUMA && 磁盘 IO 调度器
530#==============================================================#
531
532args="ro resume=/dev/mapper/openeuler-swap rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap cgroup_disable=files apparmor=0 crashkernel=512M rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
533-resume=/dev/mapper/openeuler-swap
534-args="ro
535args="ro resume=/dev/mapper/openeuler-swap rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap cgroup_disable=files apparmor=0 crashkernel=512M rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
536-rhgb
537-crashkernel=512M
538
539#==============================================================#
540配置 sysctl.conf
541#==============================================================#
542
543kernel.sysrq = 0
544net.ipv4.ip_forward = 0
545net.ipv4.conf.all.send_redirects = 0
546net.ipv4.conf.default.send_redirects = 0
547net.ipv4.conf.all.accept_source_route = 0
548net.ipv4.conf.default.accept_source_route = 0
549net.ipv4.conf.all.accept_redirects = 0
550net.ipv4.conf.default.accept_redirects = 0
551net.ipv4.conf.all.secure_redirects = 0
552net.ipv4.conf.default.secure_redirects = 0
553net.ipv4.icmp_echo_ignore_broadcasts = 1
554net.ipv4.icmp_ignore_bogus_error_responses = 1
555net.ipv4.conf.all.rp_filter = 1
556net.ipv4.conf.default.rp_filter = 1
557net.ipv4.tcp_syncookies = 1
558kernel.dmesg_restrict = 1
559net.ipv6.conf.all.accept_redirects = 0
560net.ipv6.conf.default.accept_redirects = 0
561fs.aio-max-nr = 1048576
562fs.file-max = 6815744
563kernel.shmall = 2097152
564kernel.shmmax = 7795097599
565kernel.shmmni = 4096
566kernel.sem = 250 32000 100 128
567net.ipv4.ip_local_port_range = 9000 65500
568net.core.rmem_default = 262144
569net.core.rmem_max = 4194304
570net.core.wmem_default = 262144
571net.core.wmem_max = 1048576
572vm.min_free_kbytes = 30449
573net.ipv4.conf.ens33.rp_filter = 1
574vm.swappiness = 10
575kernel.panic_on_oops = 1
576kernel.randomize_va_space = 2
577kernel.numa_balancing = 0
578net.ipv4.conf.ens37.rp_filter = 2
579
580#==============================================================#
581配置 RemoveIPC
582#==============================================================#
583
584[Login]
585RemoveIPC=no
586
587#==============================================================#
588配置 /etc/security/limits.conf 和 /etc/pam.d/login
589#==============================================================#
590
591查看 /etc/security/limits.conf:
592
593oracle soft nofile 1024
594oracle hard nofile 65536
595oracle soft stack 10240
596oracle hard stack 32768
597oracle soft nproc 2047
598oracle hard nproc 16384
599oracle hard memlock unlimited
600oracle soft memlock unlimited
601grid soft nofile 1024
602grid hard nofile 65536
603grid soft stack 10240
604grid hard stack 32768
605grid soft nproc 2047
606grid hard nproc 16384
607
608查看 /etc/pam.d/login 文件:
609
610auth substack system-auth
611auth include postlogin
612account required pam_nologin.so
613account include system-auth
614password include system-auth
615session required pam_selinux.so close
616session required pam_loginuid.so
617session required pam_selinux.so open
618session required pam_namespace.so
619session optional pam_keyinit.so force revoke
620session include system-auth
621session include postlogin
622-session optional pam_ck_connector.so
623session required pam_limits.so
624session required /lib64/security/pam_limits.so
625
626#==============================================================#
627配置 /dev/shm
628#==============================================================#
629
630/dev/mapper/openeuler-root / ext4 defaults 1 1
631UUID=3b8b94fa-6595-453b-938d-16b973646ae1 /boot ext4 defaults 1 2
632/dev/mapper/openeuler-swap none swap defaults 0 0
633tmpfs /dev/shm tmpfs size=7612400k 0 0
634
635#==============================================================#
636Root 用户环境变量
637#==============================================================#
638
639if [ -f ~/.bashrc ]; then
640 . ~/.bashrc
641fi
642PATH=$PATH:$HOME/bin
643export PATH
644alias so='su - oracle'
645export PS1="[`whoami`@`hostname`:"'$PWD]$ '
646alias sg='su - grid'
647alias crsctl='/u01/app/19.3.0/grid/bin/crsctl'
648alias srvctl='/u01/app/19.3.0/grid/bin/srvctl'
649
650#==============================================================#
651Oracle 用户环境变量
652#==============================================================#
653
654[ -f ~/.bashrc ] && . ~/.bashrc
655umask 022
656export TMP=/tmp
657export TMPDIR=$TMP
658export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
659export ORACLE_BASE=/u01/app/oracle
660export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db
661export ORACLE_TERM=xterm
662export TNS_ADMIN=$ORACLE_HOME/network/admin
663export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
664export ORACLE_SID=lucifer2
665export PATH=/usr/sbin:$PATH
666export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
667export PERL5LIB=$ORACLE_HOME/perl/lib
668alias sas='sqlplus / as sysdba'
669alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
670alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
671alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
672export PS1="[`whoami`@`hostname`:"'$PWD]$ '
673export CV_ASSUME_DISTID=OL7
674alias sqlplus='rlwrap sqlplus'
675alias rman='rlwrap rman'
676alias adrci='rlwrap adrci'
677
678#==============================================================#
679Grid 用户环境变量
680#==============================================================#
681
682[ -f ~/.bashrc ] && . ~/.bashrc
683umask 022
684export TMP=/tmp
685export TMPDIR=$TMP
686export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
687export ORACLE_BASE=/u01/app/grid
688export ORACLE_HOME=/u01/app/19.3.0/grid
689export ORACLE_TERM=xterm
690export TNS_ADMIN=$ORACLE_HOME/network/admin
691export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
692export ORACLE_SID=+ASM2
693export PATH=/usr/sbin:$PATH
694export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
695alias sas='sqlplus / as sysasm'
696export PS1="[`whoami`@`hostname`:"'$PWD]$ '
697export CV_ASSUME_DISTID=OL7
698alias sqlplus='rlwrap sqlplus'
699alias asmcmd='rlwrap asmcmd'
700alias adrci='rlwrap adrci'
701
702#==============================================================#
703配置 multipath 多路径
704#==============================================================#
705
706438.420337 | asm_ocr_1: addmap [0 20971520 multipath 0 0 1 1 service-time 0 1 1 8:16 1]
707438.549864 | asm_data_1: addmap [0 104857600 multipath 0 0 1 1 service-time 0 1 1 8:32 1]
708create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET,IMAGEFILE
709size=10G features='0' hwhandler='0' wp=undef
710`-+- policy='service-time 0' prio=1 status=undef
711 `- 3:0:0:0 sdb 8:16 undef ready running
712create: asm_data_1 (2f218dae15b551c5d) undef ROCKET,IMAGEFILE
713size=50G features='0' hwhandler='0' wp=undef
714`-+- policy='service-time 0' prio=1 status=undef
715 `- 3:0:0:1 sdc 8:32 undef ready running
716
717#==============================================================#
718配置 UDEV 绑盘
719#==============================================================#
720
721KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2e87e4f535c397171",SYMLINK+="asm_ocr_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
722KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2f218dae15b551c5d",SYMLINK+="asm_data_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
723
724/dev/asm_data_1
725/dev/asm_ocr_1
726
727UDEV 配置完成!
728
729配置 RAC 节点:192.168.6.131 结束!
730
731#==============================================================#
732静默解压缩 Grid 软件包
733#==============================================================#
734
735正在静默解压缩 Grid 软件包,请稍等:
736
737.---- -. -. . . . .
738( .',----- - - ' ' ' __
739 \_/ ;--:- __--------------------___ ____=========_||___
740__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
741c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
742,_\___________'_|,L______],|______________________|_i,!________________!_i
743/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
744""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
745
746
747静默解压 Grid 软件安装包: /soft/LINUX.X64_193000_grid_home.zip
748
749静默解压 OPatch 软件补丁包: /soft/p6880880_*.zip
750
751#==============================================================#
752静默解压 Oracle 软件包
753#==============================================================#
754
755正在静默解压缩 Oracle 软件包,请稍等:
756
757.---- -. -. . . . .
758( .',----- - - ' ' ' __
759 \_/ ;--:- __--------------------___ ____=========_||___
760__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
761c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
762,_\___________'_|,L______],|______________________|_i,!________________!_i
763/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
764""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
765
766
767静默解压 Oracle 软件安装包: /soft/LINUX.X64_193000_db_home.zip
768
769静默解压 OPatch 软件补丁包: /soft/p6880880_*.zip
770
771静默解压 OJVM 软件补丁包: /soft/p35926646*.zip
772
773#==============================================================#
774Grid 安装静默文件
775#==============================================================#
776
777INVENTORY_LOCATION=/u01/app/oraInventory
778oracle.install.option=CRS_CONFIG
779ORACLE_BASE=/u01/app/grid
780oracle.install.asm.OSDBA=asmdba
781oracle.install.asm.OSOPER=asmoper
782oracle.install.asm.OSASM=asmadmin
783oracle.install.crs.config.gpnp.scanName=openEuler-scan
784oracle.install.crs.config.gpnp.scanPort=1521
785oracle.install.crs.config.clusterName=openEuler-cls
786oracle.install.crs.config.gpnp.configureGNS=false
787oracle.install.crs.config.clusterNodes=openEuler01:openEuler01-vip,openEuler02:openEuler02-vip
788oracle.install.crs.config.networkInterfaceList=ens33:192.168.6.0:1,ens37:1.1.1.0:5
789oracle.install.crs.config.useIPMI=false
790oracle.install.asm.SYSASMPassword=oracle
791oracle.install.asm.diskGroup.name=OCR
792oracle.install.asm.diskGroup.redundancy=EXTERNAL
793oracle.install.asm.diskGroup.disks=/dev/asm_ocr_1
794oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
795oracle.install.asm.monitorPassword=oracle
796oracle.install.crs.config.ClusterConfiguration=STANDALONE
797oracle.install.crs.config.configureAsExtendedCluster=false
798oracle.install.crs.configureGIMR=false
799oracle.install.asm.storageOption=ASM
800oracle.install.asm.diskGroup.AUSize=4
801oracle.install.asm.configureAFD=false
802oracle.install.crs.config.ignoreDownNodes=false
803oracle.install.config.managementOption=NONE
804oracle.install.crs.rootconfig.executeRootScript=false
805oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
806oracle.install.crs.config.scanType=LOCAL_SCAN
807
808#==============================================================#
809静默安装 Grid 软件
810#==============================================================#
811
812Preparing the home to patch...
813Applying the patch /soft/35940989...
814Successfully applied the patch.
815The log can be found at: /tmp/GridSetupActions2024-03-21_10-31-09AM/installerPatchActions_2024-03-21_10-31-09AM.log
816Launching Oracle Grid Infrastructure Setup Wizard...
817
818[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
819 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].
820 ACTION: Provide a password that conforms to the Oracle recommended standards.
821[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
822 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].
823 ACTION: Provide a password that conforms to the Oracle recommended standards.
824The response file for this session can be found at:
825 /u01/app/19.3.0/grid/install/response/grid_2024-03-21_10-31-09AM.rsp
826
827You can find the log of this install session at:
828 /tmp/GridSetupActions2024-03-21_10-31-09AM/gridSetupActions2024-03-21_10-31-09AM.log
829
830As a root user, execute the following script(s):
831 1. /u01/app/oraInventory/orainstRoot.sh
832 2. /u01/app/19.3.0/grid/root.sh
833
834Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
835[openEuler01, openEuler02]
836Execute /u01/app/19.3.0/grid/root.sh on the following nodes:
837[openEuler01, openEuler02]
838
839Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.
840
841Successfully Setup Software.
842As install user, execute the following command to complete the configuration.
843 /u01/app/19.3.0/grid/gridSetup.sh -executeConfigTools -responseFile /soft/grid.rsp [-silent]
844
845
846Moved the install session logs to:
847 /u01/app/oraInventory/logs/GridSetupActions2024-03-21_10-31-09AM
848
849#==============================================================#
850执行 root 脚本
851#==============================================================#
852
853节点 192.168.6.130 :
854
855Changing permissions of /u01/app/oraInventory.
856Adding read,write permissions for group.
857Removing read,write,execute permissions for world.
858
859Changing groupname of /u01/app/oraInventory to oinstall.
860The execution of the script is complete.
861Check /u01/app/19.3.0/grid/install/root_openEuler01_2024-03-21_11-00-24-542542904.log for the output of root script
862
863节点 192.168.6.131 :
864
865Changing permissions of /u01/app/oraInventory.
866Adding read,write permissions for group.
867Removing read,write,execute permissions for world.
868
869Changing groupname of /u01/app/oraInventory to oinstall.
870The execution of the script is complete.
871Check /u01/app/19.3.0/grid/install/root_openEuler02_2024-03-21_11-09-02-281159664.log for the output of root script
872
873#==============================================================#
874Grid 软件版本
875#==============================================================#
876
877
878SQL*Plus: Release 19.0.0.0.0 - Production
879Version 19.22.0.0.0
880
881
882#==============================================================#
883Grid 补丁信息
884#==============================================================#
885
88636115038;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)
88735967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)
88835956421;ACFS RELEASE UPDATE 19.22.0.0.0 (35956421)
88935943157;Database Release Update : 19.22.0.0.240116 (35943157)
89033575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
891
892OPatch succeeded.
893
894
895#==============================================================#
896ASM 磁盘组创建
897#==============================================================#
898
899State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
900MOUNTED EXTERN N 512 512 4096 1048576 51200 51092 0 51092 0 N DATA/
901MOUNTED EXTERN N 512 512 4096 4194304 10240 9900 0 9900 0 Y OCR/
902
903#==============================================================#
904Oracle 安装静默文件
905#==============================================================#
906
907oracle.install.option=INSTALL_DB_SWONLY
908UNIX_GROUP_NAME=oinstall
909INVENTORY_LOCATION=/u01/app/oraInventory
910ORACLE_BASE=/u01/app/oracle
911oracle.install.db.InstallEdition=EE
912oracle.install.db.DBA_GROUP=dba
913oracle.install.db.OPER_GROUP=oper
914oracle.install.db.CLUSTER_NODES=openEuler01,openEuler02
915oracle.install.db.OSBACKUPDBA_GROUP=backupdba
916oracle.install.db.OSDGDBA_GROUP=dgdba
917oracle.install.db.OSKMDBA_GROUP=kmdba
918oracle.install.db.OSRACDBA_GROUP=racdba
919oracle.install.db.rootconfig.executeRootScript=false
920oracle.install.db.rootconfig.configMethod=
921oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
922
923#==============================================================#
924静默安装数据库软件
925#==============================================================#
926
927Preparing the home to patch...
928Applying the patch /soft/35940989...
929Successfully applied the patch.
930The log can be found at: /u01/app/oraInventory/logs/InstallActions2024-03-21_11-16-04AM/installerPatchActions_2024-03-21_11-16-04AM.log
931Launching Oracle Database Setup Wizard...
932
933[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
934 CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2024-03-21_11-16-04AM/installActions2024-03-21_11-16-04AM.log
935 ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2024-03-21_11-16-04AM/installActions2024-03-21_11-16-04AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
936The response file for this session can be found at:
937 /u01/app/oracle/product/19.3.0/db/install/response/db_2024-03-21_11-16-04AM.rsp
938
939You can find the log of this install session at:
940 /u01/app/oraInventory/logs/InstallActions2024-03-21_11-16-04AM/installActions2024-03-21_11-16-04AM.log
941
942As a root user, execute the following script(s):
943 1. /u01/app/oracle/product/19.3.0/db/root.sh
944
945Execute /u01/app/oracle/product/19.3.0/db/root.sh on the following nodes:
946[openEuler01, openEuler02]
947
948
949Successfully Setup Software with warning(s).
950
951#==============================================================#
952执行 root 脚本
953#==============================================================#
954
955节点 192.168.6.130 :
956
957Changing permissions of /u01/app/oraInventory.
958Adding read,write permissions for group.
959Removing read,write,execute permissions for world.
960
961Changing groupname of /u01/app/oraInventory to oinstall.
962The execution of the script is complete.
963Check /u01/app/oracle/product/19.3.0/db/install/root_openEuler01_2024-03-21_11-56-19-366497121.log for the output of root script
964
965节点 192.168.6.131 :
966
967Changing permissions of /u01/app/oraInventory.
968Adding read,write permissions for group.
969Removing read,write,execute permissions for world.
970
971Changing groupname of /u01/app/oraInventory to oinstall.
972The execution of the script is complete.
973Check /u01/app/oracle/product/19.3.0/db/install/root_openEuler02_2024-03-21_11-56-20-424984369.log for the output of root script
974
975#==============================================================#
976OJVM 补丁安装
977#==============================================================#
978
979节点 192.168.6.130 :
980
981Oracle Interim Patch Installer version 12.2.0.1.40
982Copyright (c) 2024, Oracle Corporation. All rights reserved.
983
984PREREQ session
985
986Oracle Home : /u01/app/oracle/product/19.3.0/db
987Central Inventory : /u01/app/oraInventory
988 from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
989OPatch version : 12.2.0.1.40
990OUI version : 12.2.0.7.0
991Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2024-03-21_11-56-22AM_1.log
992
993Invoking prereq "checkconflictagainstohwithdetail"
994
995Prereq "checkConflictAgainstOHWithDetail" passed.
996
997OPatch succeeded.
998Oracle Interim Patch Installer version 12.2.0.1.40
999Copyright (c) 2024, Oracle Corporation. All rights reserved.
1000
1001
1002Oracle Home : /u01/app/oracle/product/19.3.0/db
1003Central Inventory : /u01/app/oraInventory
1004 from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
1005OPatch version : 12.2.0.1.40
1006OUI version : 12.2.0.7.0
1007Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2024-03-21_11-56-40AM_1.log
1008
1009Verifying environment and performing prerequisite checks...
1010OPatch continues with these patches: 35926646
1011
1012Do you want to proceed? [y|n]
1013Y (auto-answered by -silent)
1014User Responded with: Y
1015All checks passed.
1016
1017Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
1018(Oracle Home = '/u01/app/oracle/product/19.3.0/db')
1019
1020
1021Is the local system ready for patching? [y|n]
1022Y (auto-answered by -silent)
1023User Responded with: Y
1024Backing up files...
1025Applying interim patch '35926646' to OH '/u01/app/oracle/product/19.3.0/db'
1026
1027Patching component oracle.javavm.server, 19.0.0.0.0...
1028
1029Patching component oracle.javavm.server.core, 19.0.0.0.0...
1030
1031Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
1032
1033Patching component oracle.rdbms, 19.0.0.0.0...
1034
1035Patching component oracle.javavm.client, 19.0.0.0.0...
1036Patch 35926646 successfully applied.
1037Log file location: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2024-03-21_11-56-40AM_1.log
1038
1039OPatch succeeded.
1040
1041节点 192.168.6.131 :
1042
1043Oracle Interim Patch Installer version 12.2.0.1.40
1044Copyright (c) 2024, Oracle Corporation. All rights reserved.
1045
1046PREREQ session
1047
1048Oracle Home : /u01/app/oracle/product/19.3.0/db
1049Central Inventory : /u01/app/oraInventory
1050 from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
1051OPatch version : 12.2.0.1.40
1052OUI version : 12.2.0.7.0
1053Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2024-03-21_11-59-15AM_1.log
1054
1055Invoking prereq "checkconflictagainstohwithdetail"
1056
1057Prereq "checkConflictAgainstOHWithDetail" passed.
1058
1059OPatch succeeded.
1060Oracle Interim Patch Installer version 12.2.0.1.40
1061Copyright (c) 2024, Oracle Corporation. All rights reserved.
1062
1063
1064Oracle Home : /u01/app/oracle/product/19.3.0/db
1065Central Inventory : /u01/app/oraInventory
1066 from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
1067OPatch version : 12.2.0.1.40
1068OUI version : 12.2.0.7.0
1069Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2024-03-21_11-59-33AM_1.log
1070
1071Verifying environment and performing prerequisite checks...
1072OPatch continues with these patches: 35926646
1073
1074Do you want to proceed? [y|n]
1075Y (auto-answered by -silent)
1076User Responded with: Y
1077All checks passed.
1078
1079Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
1080(Oracle Home = '/u01/app/oracle/product/19.3.0/db')
1081
1082
1083Is the local system ready for patching? [y|n]
1084Y (auto-answered by -silent)
1085User Responded with: Y
1086Backing up files...
1087Applying interim patch '35926646' to OH '/u01/app/oracle/product/19.3.0/db'
1088
1089Patching component oracle.javavm.server, 19.0.0.0.0...
1090
1091Patching component oracle.javavm.server.core, 19.0.0.0.0...
1092
1093Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
1094
1095Patching component oracle.rdbms, 19.0.0.0.0...
1096
1097Patching component oracle.javavm.client, 19.0.0.0.0...
1098Patch 35926646 successfully applied.
1099Log file location: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2024-03-21_11-59-33AM_1.log
1100
1101OPatch succeeded.
1102
1103#==============================================================#
1104Oracle 软件版本
1105#==============================================================#
1106
1107
1108SQL*Plus: Release 19.0.0.0.0 - Production
1109Version 19.22.0.0.0
1110
1111
1112#==============================================================#
1113Oracle 补丁信息
1114#==============================================================#
1115
111635926646;OJVM RELEASE UPDATE: 19.22.0.0.240116 (35926646)
111735967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)
111835943157;Database Release Update : 19.22.0.0.240116 (35943157)
1119
1120OPatch succeeded.
1121
1122
1123#==============================================================#
1124静默建库命令
1125#==============================================================#
1126
1127dbca -silent -createDatabase \
1128-ignorePrereqFailure \
1129-templateName General_Purpose.dbc \
1130-responseFile NO_VALUE \
1131-gdbName lucifer \
1132-sid lucifer \
1133-sysPassword oracle \
1134-systemPassword oracle \
1135-redoLogFileSize 100 \
1136-diskGroupName +DATA \
1137-storageType ASM -enableArchive true \
1138-archiveLogDest +DATA \
1139-databaseConfigType RAC \
1140-nodeinfo openEuler01,openEuler02 \
1141-characterset AL32UTF8 \
1142-nationalCharacterSet AL16UTF16 \
1143-emConfiguration NONE \
1144-automaticMemoryManagement false \
1145-totalMemory 3716 \
1146-databaseType OLTP \
1147-createAsContainerDatabase false
1148
1149#==============================================================#
1150创建数据库
1151#==============================================================#
1152
1153[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
1154 CAUSE:
1155a. 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].
1156b.The password entered is a keyword that Oracle does not recommend to be used as password
1157 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
1158[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
1159 CAUSE:
1160a. 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].
1161b.The password entered is a keyword that Oracle does not recommend to be used as password
1162 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
1163Prepare for db operation
11648% complete
1165Copying database files
116633% complete
1167Creating and starting Oracle instance
116834% complete
116935% complete
117039% complete
117142% complete
117245% complete
117350% complete
1174Creating cluster database views
117552% complete
117667% complete
1177Completing Database Creation
117871% complete
117973% complete
118075% complete
1181Executing Post Configuration Actions
1182100% complete
1183Database creation complete. For details check the logfiles at:
1184 /u01/app/oracle/cfgtoollogs/dbca/lucifer.
1185Database Information:
1186Global Database Name:lucifer
1187System Identifier(SID) Prefix:lucifer
1188Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/lucifer/lucifer.log" for further details.
1189
1190#==============================================================#
1191配置 OMF && 优化 RMAN
1192#==============================================================#
1193
1194
1195Recovery Manager: Release 19.0.0.0.0 - Production on Thu Mar 21 12:34:23 2024
1196Version 19.22.0.0.0
1197
1198Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
1199
1200connected to target database: LUCIFER (DBID=4020080529)
1201
1202RMAN>
1203using target database control file instead of recovery catalog
1204new RMAN configuration parameters:
1205CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_fdcdb1.f';
1206new RMAN configuration parameters are successfully stored
1207
1208RMAN>
1209
1210Recovery Manager complete.
1211
1212
1213#==============================================================#
1214配置控制文件复用
1215#==============================================================#
1216
1217
1218Recovery Manager: Release 19.0.0.0.0 - Production on Thu Mar 21 12:36:21 2024
1219Version 19.22.0.0.0
1220
1221Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
1222
1223connected to target database: LUCIFER (not mounted)
1224
1225RMAN>
1226Starting restore at 21-MAR-24
1227using target database control file instead of recovery catalog
1228allocated channel: ORA_DISK_1
1229channel ORA_DISK_1: SID=133 instance=lucifer1 device type=DISK
1230
1231channel ORA_DISK_1: copied control file copy
1232Finished restore at 21-MAR-24
1233
1234
1235Recovery Manager complete.
1236
1237数据库控制文件:
1238
1239
1240NAME
1241----------------------------------------------------------------------------------------------------
1242+DATA/LUCIFER/CONTROLFILE/current.261.1164197265
1243+DATA/LUCIFER/CONTROLFILE/control02.ctl
1244
1245#==============================================================#
1246配置在线重做日志
1247#==============================================================#
1248
1249数据库在线重做日志文件:
1250
1251
1252 THREAD# GROUP# MEMBER size(M)
1253---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
1254 1 1 +DATA/LUCIFER/ONLINELOG/group_1.262.1164197267 100
1255 1 2 +DATA/LUCIFER/ONLINELOG/group_2.263.1164197267 100
1256 1 11 +DATA/LUCIFER/ONLINELOG/group_11.274.1164199055 100
1257 1 12 +DATA/LUCIFER/ONLINELOG/group_12.275.1164199057 100
1258 1 13 +DATA/LUCIFER/ONLINELOG/group_13.276.1164199059 100
1259 1 14 +DATA/LUCIFER/ONLINELOG/group_14.277.1164199061 100
1260 1 15 +DATA/LUCIFER/ONLINELOG/group_15.278.1164199065 100
1261 2 3 +DATA/LUCIFER/ONLINELOG/group_3.266.1164198731 100
1262 2 4 +DATA/LUCIFER/ONLINELOG/group_4.267.1164198733 100
1263 2 21 +DATA/LUCIFER/ONLINELOG/group_21.279.1164199067 100
1264 2 22 +DATA/LUCIFER/ONLINELOG/group_22.280.1164199069 100
1265 2 23 +DATA/LUCIFER/ONLINELOG/group_23.281.1164199071 100
1266 2 24 +DATA/LUCIFER/ONLINELOG/group_24.282.1164199077 100
1267 2 25 +DATA/LUCIFER/ONLINELOG/group_25.283.1164199079 100
1268
1269#==============================================================#
1270配置 RMAN 备份任务
1271#==============================================================#
1272
1273## OracleBegin
127400 02 * * * /home/oracle/scripts/del_arch.sh
1275#00 00 * * 0 /home/oracle/scripts/dbbackup_lv0.sh
1276#00 00 * * 1,2,3,4,5,6 /home/oracle/scripts/dbbackup_lv1.sh
1277
1278#==============================================================#
1279配置 glogin.sql
1280#==============================================================#
1281
1282define _editor=vi
1283set serveroutput on size 1000000
1284set pagesize 9999
1285set long 99999
1286set trimspool on
1287col name format a80
1288set termout off
1289define gname=idle
1290column global_name new_value gname
1291select 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 );
1292ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
1293set sqlprompt '&gname _DATE> '
1294set termout on
1295
1296#==============================================================#
1297优化数据库参数
1298#==============================================================#
1299
1300数据库参数:
1301
1302
1303NAME SID SPVALUE VALUE
1304-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
1305_b_tree_bitmap_plans * FALSE FALSE
1306_datafile_write_errors_crash_instance * FALSE FALSE
1307audit_file_dest * /u01/app/oracle/admin/lucifer/adump /u01/app/oracle/admin/lucifer/adump
1308audit_trail * NONE DB
1309cluster_database * true TRUE
1310compatible * 19.0.0 19.0.0
1311control_file_record_keep_time * 31 31
1312db_block_size * 8192 8192
1313db_create_file_dest * +DATA +DATA
1314db_file_multiblock_read_count * 128
1315db_files * 5000 200
1316db_name * lucifer lucifer
1317db_writer_processes * 1
1318deferred_segment_creation * FALSE FALSE
1319diagnostic_dest * /u01/app/oracle /u01/app/oracle
1320dispatchers * (PROTOCOL=TCP) (SERVICE=luciferXDB) (PROTOCOL=TCP) (SERVICE=luciferXDB)
1321event * 10949 trace name context forever,level 1
1322event * 28401 trace name context forever,level 1
1323fast_start_parallel_rollback * LOW
1324instance_mode * read-only READ-WRITE
1325log_archive_dest_1 * location=+DATA location=+DATA
1326log_archive_format * %t_%s_%r.dbf %t_%s_%r.dbf
1327max_dump_file_size * unlimited
1328max_string_size * STANDARD
1329nls_language * AMERICAN AMERICAN
1330nls_territory * AMERICA AMERICA
1331open_cursors * 1000 300
1332optimizer_adaptive_plans * TRUE
1333optimizer_adaptive_statistics * FALSE
1334optimizer_index_caching * 0
1335optimizer_mode * ALL_ROWS
1336parallel_force_local * TRUE FALSE
1337parallel_max_servers * 64 64
1338pga_aggregate_target * 1246756864 780140544
1339processes * 2000 640
1340remote_login_passwordfile * exclusive EXCLUSIVE
1341session_cached_cursors * 300 50
1342sessions * 984
1343sga_max_size * 4988076032 3120562176
1344sga_target * 4988076032 3120562176
1345spfile * +DATA/LUCIFER/PARAMETERFILE/spfile.269.1164198737
1346statistics_level * TYPICAL
1347undo_retention * 10800 900
1348
1349恭喜!Oracle RAC 安装成功,现在是否重启主机:[Y/N] N