1 ███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
2 ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
3 ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
4░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
5░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
6░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
7 ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
8 ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
9
10
11请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : rac
12
13数据库安装模式: rac
14
15请选择数据库版本 [11/12/19/21] : 12
16
17数据库版本: 12
18
19#==============================================================#
20配置本地 YUM 源
21#==============================================================#
22
23[openEuler]
24name=openEuler
25baseurl=file:////mnt
26enabled=1
27gpgcheck=1
28gpgkey=file:////mnt/RPM-GPG-KEY-openEuler
29
30#==============================================================#
31获取 ASM 磁盘 UUID && 格式化磁盘头
32#==============================================================#
33
34格式化 OCR 磁盘:/dev/sdb
35
361+0 records in
371+0 records out
381024 bytes (1.0 kB, 1.0 KiB) copied, 0.0126392 s, 81.0 kB/s
39
40OCR磁盘组的磁盘UUID: 2e87e4f535c397171
41
42格式化 DATA 磁盘:/dev/sdc
43
441+0 records in
451+0 records out
461024 bytes (1.0 kB, 1.0 KiB) copied, 0.00779187 s, 131 kB/s
47
48DATA磁盘组的磁盘UUID: 2f218dae15b551c5d
49
50#==============================================================#
51配置 root 用户互信
52#==============================================================#
53
54Generating public/private rsa key pair.
55Your identification has been saved in /root/.ssh/id_rsa
56Your public key has been saved in /root/.ssh/id_rsa.pub
57The key fingerprint is:
58SHA256:+J/iECLEmrafHqwjHxZHcrzj2TiwoBWFWZmjFtNwESA root@openEuler01
59The key's randomart image is:
60+---[RSA 3072]----+
61|E oB*= |
62| o=+= |
63| =++. |
64| +o= . . |
65|+o= = o S |
66|oooB * o |
67|..+o= o . |
68|.oo.o. ... . |
69|.o++ ...o |
70+----[SHA256]-----+
71
72#==============================================================#
73打印系统信息
74#==============================================================#
75
76服务器时间:
77
78Fri Mar 29 03:04:26 PM CST 2024
79
80操作系统版本:
81
82NAME="openEuler"
83VERSION="22.03 (LTS-SP3)"
84ID="openEuler"
85VERSION_ID="22.03"
86PRETTY_NAME="openEuler 22.03 (LTS-SP3)"
87ANSI_COLOR="0;31"
88
89
90内核信息:
91
92Linux version 5.10.0-182.0.0.95.oe2203sp3.x86_64 (root@dc-64g.compass-ci) (gcc_old (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #1 SMP Sat Dec 30 13:10:36 CST 2023
93
94服务器属性:
95
96vmware
97
98cpu信息:
99
100Architecture: x86_64
101CPU op-mode(s): 32-bit, 64-bit
102Address sizes: 43 bits physical, 48 bits virtual
103Byte Order: Little Endian
104CPU(s): 8
105On-line CPU(s) list: 0-7
106Vendor ID: GenuineIntel
107BIOS Vendor ID: GenuineIntel
108Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
109BIOS Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
110CPU family: 6
111Model: 62
112Thread(s) per core: 1
113Core(s) per socket: 1
114Socket(s): 8
115Stepping: 4
116BogoMIPS: 5187.49
117Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cpuid_fault pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep arat md_clear flush_l1d arch_capabilities
118Hypervisor vendor: VMware
119Virtualization type: full
120L1d cache: 256 KiB (8 instances)
121L1i cache: 256 KiB (8 instances)
122L2 cache: 2 MiB (8 instances)
123L3 cache: 120 MiB (8 instances)
124NUMA node(s): 1
125NUMA node0 CPU(s): 0-7
126Vulnerability Gather data sampling: Not affected
127Vulnerability Itlb multihit: KVM: Mitigation: VMX unsupported
128Vulnerability L1tf: Mitigation; PTE Inversion
129Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown
130Vulnerability Meltdown: Mitigation; PTI
131Vulnerability Mmio stale data: Unknown: No mitigations
132Vulnerability Retbleed: Mitigation; IBRS
133Vulnerability Spec rstack overflow: Not affected
134Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
135Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
136Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
137Vulnerability Srbds: Not affected
138Vulnerability Tsx async abort: Not affected
139
140内存信息:
141
142 total used free shared buff/cache available
143Mem: 7433 464 5788 8 1447 6969
144Swap: 8187 0 8187
145 total used free shared buff/cache available
146Mem: 7.3Gi 464Mi 5.7Gi 8.7Mi 1.4Gi 6.8Gi
147Swap: 8.0Gi 0B 8.0Gi
148
149挂载信息:
150
151/dev/mapper/openeuler-root / ext4 defaults 1 1
152UUID=07e6a80f-f2f4-42f8-a1ad-df05bd354960 /boot ext4 defaults 1 2
153/dev/mapper/openeuler-swap none swap defaults 0 0
154
155目录信息:
156
157Filesystem Size Used Avail Use% Mounted on
158devtmpfs 4.0M 0 4.0M 0% /dev
159tmpfs 3.7G 0 3.7G 0% /dev/shm
160tmpfs 1.5G 8.8M 1.5G 1% /run
161tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
162/dev/mapper/openeuler-root 90G 12G 73G 14% /
163tmpfs 3.7G 0 3.7G 0% /tmp
164/dev/sda1 974M 174M 733M 20% /boot
165/dev/sr0 18G 18G 0 100% /mnt
166
167#==============================================================#
168禁用防火墙
169#==============================================================#
170
171○ firewalld.service - firewalld - dynamic firewall daemon
172 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
173 Active: inactive (dead)
174 Docs: man:firewalld(1)
175
176Mar 29 14:49:36 openEuler01 systemd[1]: Starting firewalld - dynamic firewall daemon...
177Mar 29 14:49:38 openEuler01 systemd[1]: Started firewalld - dynamic firewall daemon.
178Mar 29 15:04:26 openEuler01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
179Mar 29 15:04:27 openEuler01 systemd[1]: firewalld.service: Deactivated successfully.
180Mar 29 15:04:27 openEuler01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
181
182#==============================================================#
183禁用 SELinux
184#==============================================================#
185
186SELinux status: enabled
187SELinuxfs mount: /sys/fs/selinux
188SELinux root directory: /etc/selinux
189Loaded policy name: targeted
190Current mode: permissive
191Mode from config file: disabled
192Policy MLS status: enabled
193Policy deny_unknown status: allowed
194Memory protection checking: actual (secure)
195Max kernel policy version: 33
196
197#==============================================================#
198配置 nsysctl.conf
199#==============================================================#
200
201NOZEROCONF=yes
202
203#==============================================================#
204YUM 静默安装依赖包
205#==============================================================#
206
207bc-1.07.1-12.oe2203sp3.x86_64
208binutils-2.37-24.oe2203sp3.x86_64
209package compat-libcap1 is not installed
210gcc-10.3.1-49.oe2203sp3.x86_64
211gcc-c++-10.3.1-49.oe2203sp3.x86_64
212package elfutils-libelf is not installed
213package elfutils-libelf-devel is not installed
214glibc-2.34-143.oe2203sp3.x86_64
215glibc-devel-2.34-143.oe2203sp3.x86_64
216libaio-0.3.113-9.oe2203sp3.x86_64
217libaio-devel-0.3.113-9.oe2203sp3.x86_64
218libgcc-10.3.1-49.oe2203sp3.x86_64
219libstdc++-10.3.1-49.oe2203sp3.x86_64
220libstdc++-devel-10.3.1-49.oe2203sp3.x86_64
221libxcb-1.15-1.oe2203sp3.x86_64
222libX11-1.7.2-8.oe2203sp3.x86_64
223libXau-1.0.10-1.oe2203sp3.x86_64
224libXi-1.8-2.oe2203sp3.x86_64
225libXrender-0.9.10-12.oe2203sp3.x86_64
226make-4.3-4.oe2203sp3.x86_64
227net-tools-2.10-3.oe2203sp3.x86_64
228smartmontools-7.2-2.oe2203sp3.x86_64
229sysstat-12.5.4-9.oe2203sp3.x86_64
230e2fsprogs-1.46.4-24.oe2203sp3.x86_64
231package e2fsprogs-libs is not installed
232unzip-6.0-50.oe2203sp3.x86_64
233openssh-clients-8.8p1-23.oe2203sp3.x86_64
234readline-8.1-3.oe2203sp3.x86_64
235readline-devel-8.1-3.oe2203sp3.x86_64
236psmisc-23.5-2.oe2203sp3.x86_64
237ksh-2020.0.0-10.oe2203sp3.x86_64
238nfs-utils-2.5.4-15.oe2203sp3.x86_64
239tar-1.34-5.oe2203sp3.x86_64
240package device-mapper-multipath is not installed
241avahi-0.8-18.oe2203sp3.x86_64
242ntp-4.2.8p15-13.oe2203sp3.x86_64
243chrony-4.1-6.oe2203sp3.x86_64
244libXtst-1.2.4-1.oe2203sp3.x86_64
245libXrender-devel-0.9.10-12.oe2203sp3.x86_64
246fontconfig-devel-2.13.94-3.oe2203sp3.x86_64
247policycoreutils-3.3-8.oe2203sp3.x86_64
248package policycoreutils-python is not installed
249libcap-devel-2.61-6.oe2203sp3.x86_64
250xorg-x11-utils-7.5-31.oe2203sp3.x86_64
251xorg-x11-xauth-1.1.2-1.oe2203sp3.x86_64
252glibc-compat-2.17-2.34-143.oe2203sp3.x86_64
253elfutils-0.185-18.oe2203sp3.x86_64
254elfutils-devel-0.185-18.oe2203sp3.x86_64
255libnsl2-devel-2.0.0-5.oe2203sp3.x86_64
256package librdmacm is not installed
257libnsl-2.34-143.oe2203sp3.x86_64
258package libibverbs is not installed
259package compat-openssl10 is not installed
260policycoreutils-python-utils-3.3-8.oe2203sp3.noarch
261
262#==============================================================#
263配置主机名
264#==============================================================#
265
266openEuler01
267
268#==============================================================#
269配置 /etc/hosts 文件
270#==============================================================#
271
272127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
273::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
274192.168.6.130 openEuler01
275192.168.6.132 openEuler01-vip
2761.1.1.1 openEuler01-priv
277192.168.6.131 openEuler02
278192.168.6.133 openEuler02-vip
2791.1.1.2 openEuler02-priv
280192.168.6.134 openEuler-scan
281
282#==============================================================#
283创建用户和组
284#==============================================================#
285
286oracle 用户:
287
288uid=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)
289
290grid 用户:
291
292uid=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)
293
294
295#==============================================================#
296配置 Avahi-daemon 服务
297#==============================================================#
298
299○ avahi-daemon.service - Avahi mDNS/DNS-SD Stack
300 Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
301 Active: inactive (dead)
302TriggeredBy: ○ avahi-daemon.socket
303
304#==============================================================#
305配置透明大页 && NUMA && 磁盘 IO 调度器
306#==============================================================#
307
308args="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"
309-resume=/dev/mapper/openeuler-swap
310-args="ro
311args="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"
312-rhgb
313-crashkernel=512M
314
315#==============================================================#
316配置 sysctl.conf
317#==============================================================#
318
319kernel.sysrq = 0
320net.ipv4.ip_forward = 0
321net.ipv4.conf.all.send_redirects = 0
322net.ipv4.conf.default.send_redirects = 0
323net.ipv4.conf.all.accept_source_route = 0
324net.ipv4.conf.default.accept_source_route = 0
325net.ipv4.conf.all.accept_redirects = 0
326net.ipv4.conf.default.accept_redirects = 0
327net.ipv4.conf.all.secure_redirects = 0
328net.ipv4.conf.default.secure_redirects = 0
329net.ipv4.icmp_echo_ignore_broadcasts = 1
330net.ipv4.icmp_ignore_bogus_error_responses = 1
331net.ipv4.conf.all.rp_filter = 1
332net.ipv4.conf.default.rp_filter = 1
333net.ipv4.tcp_syncookies = 1
334kernel.dmesg_restrict = 1
335net.ipv6.conf.all.accept_redirects = 0
336net.ipv6.conf.default.accept_redirects = 0
337fs.aio-max-nr = 1048576
338fs.file-max = 6815744
339kernel.shmall = 2097152
340kernel.shmmax = 7795097599
341kernel.shmmni = 4096
342kernel.sem = 250 32000 100 128
343net.ipv4.ip_local_port_range = 9000 65500
344net.core.rmem_default = 262144
345net.core.rmem_max = 4194304
346net.core.wmem_default = 262144
347net.core.wmem_max = 1048576
348vm.min_free_kbytes = 30449
349net.ipv4.conf.ens33.rp_filter = 1
350vm.swappiness = 10
351kernel.panic_on_oops = 1
352kernel.randomize_va_space = 2
353kernel.numa_balancing = 0
354net.ipv4.conf.ens37.rp_filter = 2
355
356#==============================================================#
357配置 RemoveIPC
358#==============================================================#
359
360[Login]
361RemoveIPC=no
362
363#==============================================================#
364配置 /etc/security/limits.conf 和 /etc/pam.d/login
365#==============================================================#
366
367查看 /etc/security/limits.conf:
368
369oracle soft nofile 1024
370oracle hard nofile 65536
371oracle soft stack 10240
372oracle hard stack 32768
373oracle soft nproc 2047
374oracle hard nproc 16384
375oracle hard memlock unlimited
376oracle soft memlock unlimited
377grid soft nofile 1024
378grid hard nofile 65536
379grid soft stack 10240
380grid hard stack 32768
381grid soft nproc 2047
382grid hard nproc 16384
383
384查看 /etc/pam.d/login 文件:
385
386auth substack system-auth
387auth include postlogin
388account required pam_nologin.so
389account include system-auth
390password include system-auth
391session required pam_selinux.so close
392session required pam_loginuid.so
393session required pam_selinux.so open
394session required pam_namespace.so
395session optional pam_keyinit.so force revoke
396session include system-auth
397session include postlogin
398-session optional pam_ck_connector.so
399session required pam_limits.so
400session required /lib64/security/pam_limits.so
401
402#==============================================================#
403配置 /dev/shm
404#==============================================================#
405
406/dev/mapper/openeuler-root / ext4 defaults 1 1
407UUID=07e6a80f-f2f4-42f8-a1ad-df05bd354960 /boot ext4 defaults 1 2
408/dev/mapper/openeuler-swap none swap defaults 0 0
409tmpfs /dev/shm tmpfs size=7612400k 0 0
410
411#==============================================================#
412安装 rlwrap 插件
413#==============================================================#
414
415成功安装 rlwrap: rlwrap 0.44
416
417#==============================================================#
418Root 用户环境变量
419#==============================================================#
420
421if [ -f ~/.bashrc ]; then
422 . ~/.bashrc
423fi
424PATH=$PATH:$HOME/bin
425export PATH
426alias so='su - oracle'
427export PS1="[`whoami`@`hostname`:"'$PWD]$ '
428alias sg='su - grid'
429alias crsctl='/u01/app/12.2.0/grid/bin/crsctl'
430alias srvctl='/u01/app/12.2.0/grid/bin/srvctl'
431
432#==============================================================#
433Oracle 用户环境变量
434#==============================================================#
435
436[ -f ~/.bashrc ] && . ~/.bashrc
437umask 022
438export TMP=/tmp
439export TMPDIR=$TMP
440export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
441export ORACLE_BASE=/u01/app/oracle
442export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
443export ORACLE_TERM=xterm
444export TNS_ADMIN=$ORACLE_HOME/network/admin
445export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
446export ORACLE_SID=lucifer1
447export PATH=/usr/sbin:$PATH
448export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
449export PERL5LIB=$ORACLE_HOME/perl/lib
450alias sas='sqlplus / as sysdba'
451alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
452alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
453alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
454export PS1="[`whoami`@`hostname`:"'$PWD]$ '
455export CV_ASSUME_DISTID=OL7
456alias sqlplus='rlwrap sqlplus'
457alias rman='rlwrap rman'
458alias adrci='rlwrap adrci'
459
460#==============================================================#
461Grid 用户环境变量
462#==============================================================#
463
464[ -f ~/.bashrc ] && . ~/.bashrc
465umask 022
466export TMP=/tmp
467export TMPDIR=$TMP
468export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
469export ORACLE_BASE=/u01/app/grid
470export ORACLE_HOME=/u01/app/12.2.0/grid
471export ORACLE_TERM=xterm
472export TNS_ADMIN=$ORACLE_HOME/network/admin
473export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
474export ORACLE_SID=+ASM1
475export PATH=/usr/sbin:$PATH
476export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
477alias sas='sqlplus / as sysasm'
478export PS1="[`whoami`@`hostname`:"'$PWD]$ '
479export CV_ASSUME_DISTID=OL7
480alias sqlplus='rlwrap sqlplus'
481alias asmcmd='rlwrap asmcmd'
482alias adrci='rlwrap adrci'
483
484#==============================================================#
485配置 multipath 多路径
486#==============================================================#
487
4881194.236780 | asm_ocr_1: addmap [0 20971520 multipath 0 0 1 1 service-time 0 1 1 8:16 1]
4891194.403395 | libdevmapper: ioctl/libdm-iface.c(1947): device-mapper: message ioctl on asm_ocr_1 failed: Invalid argument
4901194.403786 | dm_message: libdm task=17 error: Invalid argument
4911194.403807 | DM message failed [switch_group 1]
4921194.405732 | asm_data_1: addmap [0 104857600 multipath 0 0 1 1 service-time 0 1 1 8:32 1]
493create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET,IMAGEFILE
494size=10G features='0' hwhandler='0' wp=undef
495`-+- policy='service-time 0' prio=1 status=undef
496 `- 3:0:0:0 sdb 8:16 undef ready running
497create: asm_data_1 (2f218dae15b551c5d) undef ROCKET,IMAGEFILE
498size=50G features='0' hwhandler='0' wp=undef
499`-+- policy='service-time 0' prio=1 status=undef
500 `- 3:0:0:1 sdc 8:32 undef ready running
501
502#==============================================================#
503配置 UDEV 绑盘
504#==============================================================#
505
506KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2e87e4f535c397171",SYMLINK+="asm_ocr_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
507KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2f218dae15b551c5d",SYMLINK+="asm_data_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
508
509/dev/asm_data_1
510/dev/asm_ocr_1
511
512UDEV 配置完成!
513
514#==============================================================#
515配置 RAC 节点:192.168.6.131
516#==============================================================#
517
518正在节点:192.168.6.131 上执行脚本:
519
520 ███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
521 ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
522 ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
523░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
524░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
525░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
526 ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
527 ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
528
529
530#==============================================================#
531配置本地 YUM 源
532#==============================================================#
533
534[openEuler]
535name=openEuler
536baseurl=file:////mnt
537enabled=1
538gpgcheck=1
539gpgkey=file:////mnt/RPM-GPG-KEY-openEuler
540
541#==============================================================#
542打印系统信息
543#==============================================================#
544
545服务器时间:
546
547Fri Mar 29 03:10:37 PM CST 2024
548
549操作系统版本:
550
551NAME="openEuler"
552VERSION="22.03 (LTS-SP3)"
553ID="openEuler"
554VERSION_ID="22.03"
555PRETTY_NAME="openEuler 22.03 (LTS-SP3)"
556ANSI_COLOR="0;31"
557
558
559内核信息:
560
561Linux version 5.10.0-182.0.0.95.oe2203sp3.x86_64 (root@dc-64g.compass-ci) (gcc_old (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #1 SMP Sat Dec 30 13:10:36 CST 2023
562
563服务器属性:
564
565vmware
566
567cpu信息:
568
569Architecture: x86_64
570CPU op-mode(s): 32-bit, 64-bit
571Address sizes: 43 bits physical, 48 bits virtual
572Byte Order: Little Endian
573CPU(s): 8
574On-line CPU(s) list: 0-7
575Vendor ID: GenuineIntel
576BIOS Vendor ID: GenuineIntel
577Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
578BIOS Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
579CPU family: 6
580Model: 62
581Thread(s) per core: 1
582Core(s) per socket: 1
583Socket(s): 8
584Stepping: 4
585BogoMIPS: 5187.49
586Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cpuid_fault pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep arat md_clear flush_l1d arch_capabilities
587Hypervisor vendor: VMware
588Virtualization type: full
589L1d cache: 256 KiB (8 instances)
590L1i cache: 256 KiB (8 instances)
591L2 cache: 2 MiB (8 instances)
592L3 cache: 120 MiB (8 instances)
593NUMA node(s): 1
594NUMA node0 CPU(s): 0-7
595Vulnerability Gather data sampling: Not affected
596Vulnerability Itlb multihit: KVM: Mitigation: VMX unsupported
597Vulnerability L1tf: Mitigation; PTE Inversion
598Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown
599Vulnerability Meltdown: Mitigation; PTI
600Vulnerability Mmio stale data: Unknown: No mitigations
601Vulnerability Retbleed: Mitigation; IBRS
602Vulnerability Spec rstack overflow: Not affected
603Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
604Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
605Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
606Vulnerability Srbds: Not affected
607Vulnerability Tsx async abort: Not affected
608
609内存信息:
610
611 total used free shared buff/cache available
612Mem: 7433 445 6795 8 447 6988
613Swap: 8187 0 8187
614 total used free shared buff/cache available
615Mem: 7.3Gi 445Mi 6.6Gi 8.7Mi 447Mi 6.8Gi
616Swap: 8.0Gi 0B 8.0Gi
617
618挂载信息:
619
620/dev/mapper/openeuler-root / ext4 defaults 1 1
621UUID=3b8b94fa-6595-453b-938d-16b973646ae1 /boot ext4 defaults 1 2
622/dev/mapper/openeuler-swap none swap defaults 0 0
623
624目录信息:
625
626Filesystem Size Used Avail Use% Mounted on
627devtmpfs 4.0M 0 4.0M 0% /dev
628tmpfs 3.7G 0 3.7G 0% /dev/shm
629tmpfs 1.5G 8.8M 1.5G 1% /run
630tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
631/dev/mapper/openeuler-root 90G 2.3G 83G 3% /
632tmpfs 3.7G 0 3.7G 0% /tmp
633/dev/sda1 974M 174M 733M 20% /boot
634/dev/sr0 18G 18G 0 100% /mnt
635
636#==============================================================#
637禁用防火墙
638#==============================================================#
639
640○ firewalld.service - firewalld - dynamic firewall daemon
641 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
642 Active: inactive (dead)
643 Docs: man:firewalld(1)
644
645Mar 29 14:49:38 openEuler02 systemd[1]: Starting firewalld - dynamic firewall daemon...
646Mar 29 14:49:39 openEuler02 systemd[1]: Started firewalld - dynamic firewall daemon.
647Mar 29 15:10:38 openEuler02 systemd[1]: Stopping firewalld - dynamic firewall daemon...
648Mar 29 15:10:38 openEuler02 systemd[1]: firewalld.service: Deactivated successfully.
649Mar 29 15:10:38 openEuler02 systemd[1]: Stopped firewalld - dynamic firewall daemon.
650
651#==============================================================#
652禁用 SELinux
653#==============================================================#
654
655SELinux status: enabled
656SELinuxfs mount: /sys/fs/selinux
657SELinux root directory: /etc/selinux
658Loaded policy name: targeted
659Current mode: permissive
660Mode from config file: disabled
661Policy MLS status: enabled
662Policy deny_unknown status: allowed
663Memory protection checking: actual (secure)
664Max kernel policy version: 33
665
666#==============================================================#
667配置 nsysctl.conf
668#==============================================================#
669
670NOZEROCONF=yes
671
672#==============================================================#
673YUM 静默安装依赖包
674#==============================================================#
675
676bc-1.07.1-12.oe2203sp3.x86_64
677binutils-2.37-24.oe2203sp3.x86_64
678package compat-libcap1 is not installed
679gcc-10.3.1-49.oe2203sp3.x86_64
680gcc-c++-10.3.1-49.oe2203sp3.x86_64
681package elfutils-libelf is not installed
682package elfutils-libelf-devel is not installed
683glibc-2.34-143.oe2203sp3.x86_64
684glibc-devel-2.34-143.oe2203sp3.x86_64
685libaio-0.3.113-9.oe2203sp3.x86_64
686libaio-devel-0.3.113-9.oe2203sp3.x86_64
687libgcc-10.3.1-49.oe2203sp3.x86_64
688libstdc++-10.3.1-49.oe2203sp3.x86_64
689libstdc++-devel-10.3.1-49.oe2203sp3.x86_64
690libxcb-1.15-1.oe2203sp3.x86_64
691libX11-1.7.2-8.oe2203sp3.x86_64
692libXau-1.0.10-1.oe2203sp3.x86_64
693libXi-1.8-2.oe2203sp3.x86_64
694libXrender-0.9.10-12.oe2203sp3.x86_64
695make-4.3-4.oe2203sp3.x86_64
696net-tools-2.10-3.oe2203sp3.x86_64
697smartmontools-7.2-2.oe2203sp3.x86_64
698sysstat-12.5.4-9.oe2203sp3.x86_64
699e2fsprogs-1.46.4-24.oe2203sp3.x86_64
700package e2fsprogs-libs is not installed
701unzip-6.0-50.oe2203sp3.x86_64
702openssh-clients-8.8p1-23.oe2203sp3.x86_64
703readline-8.1-3.oe2203sp3.x86_64
704readline-devel-8.1-3.oe2203sp3.x86_64
705psmisc-23.5-2.oe2203sp3.x86_64
706ksh-2020.0.0-10.oe2203sp3.x86_64
707nfs-utils-2.5.4-15.oe2203sp3.x86_64
708tar-1.34-5.oe2203sp3.x86_64
709package device-mapper-multipath is not installed
710avahi-0.8-18.oe2203sp3.x86_64
711ntp-4.2.8p15-13.oe2203sp3.x86_64
712chrony-4.1-6.oe2203sp3.x86_64
713libXtst-1.2.4-1.oe2203sp3.x86_64
714libXrender-devel-0.9.10-12.oe2203sp3.x86_64
715fontconfig-devel-2.13.94-3.oe2203sp3.x86_64
716policycoreutils-3.3-8.oe2203sp3.x86_64
717package policycoreutils-python is not installed
718libcap-devel-2.61-6.oe2203sp3.x86_64
719xorg-x11-utils-7.5-31.oe2203sp3.x86_64
720xorg-x11-xauth-1.1.2-1.oe2203sp3.x86_64
721glibc-compat-2.17-2.34-143.oe2203sp3.x86_64
722elfutils-0.185-18.oe2203sp3.x86_64
723elfutils-devel-0.185-18.oe2203sp3.x86_64
724libnsl2-devel-2.0.0-5.oe2203sp3.x86_64
725package librdmacm is not installed
726libnsl-2.34-143.oe2203sp3.x86_64
727package libibverbs is not installed
728package compat-openssl10 is not installed
729policycoreutils-python-utils-3.3-8.oe2203sp3.noarch
730
731#==============================================================#
732配置主机名
733#==============================================================#
734
735openEuler02
736
737#==============================================================#
738配置 /etc/hosts 文件
739#==============================================================#
740
741127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
742::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
743192.168.6.130 openEuler01
744192.168.6.132 openEuler01-vip
7451.1.1.1 openEuler01-priv
746192.168.6.131 openEuler02
747192.168.6.133 openEuler02-vip
7481.1.1.2 openEuler02-priv
749192.168.6.134 openEuler-scan
750
751#==============================================================#
752创建用户和组
753#==============================================================#
754
755oracle 用户:
756
757uid=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)
758
759grid 用户:
760
761uid=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)
762
763
764#==============================================================#
765配置 Avahi-daemon 服务
766#==============================================================#
767
768○ avahi-daemon.service - Avahi mDNS/DNS-SD Stack
769 Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
770 Active: inactive (dead)
771TriggeredBy: ○ avahi-daemon.socket
772
773#==============================================================#
774配置透明大页 && NUMA && 磁盘 IO 调度器
775#==============================================================#
776
777args="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"
778-resume=/dev/mapper/openeuler-swap
779-args="ro
780args="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"
781-rhgb
782-crashkernel=512M
783
784#==============================================================#
785配置 sysctl.conf
786#==============================================================#
787
788kernel.sysrq = 0
789net.ipv4.ip_forward = 0
790net.ipv4.conf.all.send_redirects = 0
791net.ipv4.conf.default.send_redirects = 0
792net.ipv4.conf.all.accept_source_route = 0
793net.ipv4.conf.default.accept_source_route = 0
794net.ipv4.conf.all.accept_redirects = 0
795net.ipv4.conf.default.accept_redirects = 0
796net.ipv4.conf.all.secure_redirects = 0
797net.ipv4.conf.default.secure_redirects = 0
798net.ipv4.icmp_echo_ignore_broadcasts = 1
799net.ipv4.icmp_ignore_bogus_error_responses = 1
800net.ipv4.conf.all.rp_filter = 1
801net.ipv4.conf.default.rp_filter = 1
802net.ipv4.tcp_syncookies = 1
803kernel.dmesg_restrict = 1
804net.ipv6.conf.all.accept_redirects = 0
805net.ipv6.conf.default.accept_redirects = 0
806fs.aio-max-nr = 1048576
807fs.file-max = 6815744
808kernel.shmall = 2097152
809kernel.shmmax = 7795085311
810kernel.shmmni = 4096
811kernel.sem = 250 32000 100 128
812net.ipv4.ip_local_port_range = 9000 65500
813net.core.rmem_default = 262144
814net.core.rmem_max = 4194304
815net.core.wmem_default = 262144
816net.core.wmem_max = 1048576
817vm.min_free_kbytes = 30449
818net.ipv4.conf.ens33.rp_filter = 1
819vm.swappiness = 10
820kernel.panic_on_oops = 1
821kernel.randomize_va_space = 2
822kernel.numa_balancing = 0
823net.ipv4.conf.ens37.rp_filter = 2
824
825#==============================================================#
826配置 RemoveIPC
827#==============================================================#
828
829[Login]
830RemoveIPC=no
831
832#==============================================================#
833配置 /etc/security/limits.conf 和 /etc/pam.d/login
834#==============================================================#
835
836查看 /etc/security/limits.conf:
837
838oracle soft nofile 1024
839oracle hard nofile 65536
840oracle soft stack 10240
841oracle hard stack 32768
842oracle soft nproc 2047
843oracle hard nproc 16384
844oracle hard memlock unlimited
845oracle soft memlock unlimited
846grid soft nofile 1024
847grid hard nofile 65536
848grid soft stack 10240
849grid hard stack 32768
850grid soft nproc 2047
851grid hard nproc 16384
852
853查看 /etc/pam.d/login 文件:
854
855auth substack system-auth
856auth include postlogin
857account required pam_nologin.so
858account include system-auth
859password include system-auth
860session required pam_selinux.so close
861session required pam_loginuid.so
862session required pam_selinux.so open
863session required pam_namespace.so
864session optional pam_keyinit.so force revoke
865session include system-auth
866session include postlogin
867-session optional pam_ck_connector.so
868session required pam_limits.so
869session required /lib64/security/pam_limits.so
870
871#==============================================================#
872配置 /dev/shm
873#==============================================================#
874
875/dev/mapper/openeuler-root / ext4 defaults 1 1
876UUID=3b8b94fa-6595-453b-938d-16b973646ae1 /boot ext4 defaults 1 2
877/dev/mapper/openeuler-swap none swap defaults 0 0
878tmpfs /dev/shm tmpfs size=7612388k 0 0
879
880#==============================================================#
881安装 rlwrap 插件
882#==============================================================#
883
884成功安装 rlwrap: rlwrap 0.44
885
886#==============================================================#
887Root 用户环境变量
888#==============================================================#
889
890if [ -f ~/.bashrc ]; then
891 . ~/.bashrc
892fi
893PATH=$PATH:$HOME/bin
894export PATH
895alias so='su - oracle'
896export PS1="[`whoami`@`hostname`:"'$PWD]$ '
897alias sg='su - grid'
898alias crsctl='/u01/app/12.2.0/grid/bin/crsctl'
899alias srvctl='/u01/app/12.2.0/grid/bin/srvctl'
900
901#==============================================================#
902Oracle 用户环境变量
903#==============================================================#
904
905[ -f ~/.bashrc ] && . ~/.bashrc
906umask 022
907export TMP=/tmp
908export TMPDIR=$TMP
909export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
910export ORACLE_BASE=/u01/app/oracle
911export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
912export ORACLE_TERM=xterm
913export TNS_ADMIN=$ORACLE_HOME/network/admin
914export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
915export ORACLE_SID=lucifer2
916export PATH=/usr/sbin:$PATH
917export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
918export PERL5LIB=$ORACLE_HOME/perl/lib
919alias sas='sqlplus / as sysdba'
920alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
921alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
922alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
923export PS1="[`whoami`@`hostname`:"'$PWD]$ '
924export CV_ASSUME_DISTID=OL7
925alias sqlplus='rlwrap sqlplus'
926alias rman='rlwrap rman'
927alias adrci='rlwrap adrci'
928
929#==============================================================#
930Grid 用户环境变量
931#==============================================================#
932
933[ -f ~/.bashrc ] && . ~/.bashrc
934umask 022
935export TMP=/tmp
936export TMPDIR=$TMP
937export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
938export ORACLE_BASE=/u01/app/grid
939export ORACLE_HOME=/u01/app/12.2.0/grid
940export ORACLE_TERM=xterm
941export TNS_ADMIN=$ORACLE_HOME/network/admin
942export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
943export ORACLE_SID=+ASM2
944export PATH=/usr/sbin:$PATH
945export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
946alias sas='sqlplus / as sysasm'
947export PS1="[`whoami`@`hostname`:"'$PWD]$ '
948export CV_ASSUME_DISTID=OL7
949alias sqlplus='rlwrap sqlplus'
950alias asmcmd='rlwrap asmcmd'
951alias adrci='rlwrap adrci'
952
953#==============================================================#
954配置 multipath 多路径
955#==============================================================#
956
9571564.000791 | asm_ocr_1: addmap [0 20971520 multipath 0 0 1 1 service-time 0 1 1 8:16 1]
9581564.187547 | libdevmapper: ioctl/libdm-iface.c(1947): device-mapper: message ioctl on asm_ocr_1 failed: Invalid argument
9591564.187636 | dm_message: libdm task=17 error: Invalid argument
9601564.187652 | DM message failed [switch_group 1]
9611564.189160 | asm_data_1: addmap [0 104857600 multipath 0 0 1 1 service-time 0 1 1 8:32 1]
962create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET,IMAGEFILE
963size=10G features='0' hwhandler='0' wp=undef
964`-+- policy='service-time 0' prio=1 status=undef
965 `- 3:0:0:0 sdb 8:16 undef ready running
966create: asm_data_1 (2f218dae15b551c5d) undef ROCKET,IMAGEFILE
967size=50G features='0' hwhandler='0' wp=undef
968`-+- policy='service-time 0' prio=1 status=undef
969 `- 3:0:0:1 sdc 8:32 undef ready running
970
971#==============================================================#
972配置 UDEV 绑盘
973#==============================================================#
974
975KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2e87e4f535c397171",SYMLINK+="asm_ocr_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
976KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2f218dae15b551c5d",SYMLINK+="asm_data_1",OWNER="grid",GROUP="asmadmin",MODE="0660"
977
978/dev/asm_data_1
979/dev/asm_ocr_1
980
981UDEV 配置完成!
982
983配置 RAC 节点:192.168.6.131 结束!
984
985#==============================================================#
986配置 GRID 用户 SSH 互信
987#==============================================================#
988
989Generating public/private rsa key pair.
990Your identification has been saved in /home/grid/.ssh/id_rsa
991Your public key has been saved in /home/grid/.ssh/id_rsa.pub
992The key fingerprint is:
993SHA256:iwKgxCMVHvucYsYwdpdoMrJd5PXJI6Dajmhru5VBYz4 grid@openEuler01
994The key's randomart image is:
995+---[RSA 3072]----+
996| +.o . |
997|.o *.o.o . |
998|*B+Boo. = |
999|*XX+o. . . |
1000|+ OE+ S |
1001|.= o+ . . |
1002|o..o. . . |
1003|..o . |
1004|.+o |
1005+----[SHA256]-----+
1006
1007#==============================================================#
1008配置 ORACLE 用户 SSH 互信
1009#==============================================================#
1010
1011Generating public/private rsa key pair.
1012Your identification has been saved in /home/oracle/.ssh/id_rsa
1013Your public key has been saved in /home/oracle/.ssh/id_rsa.pub
1014The key fingerprint is:
1015SHA256:dhw7e3xRGIc9Iy1uaIdEzrUDNf56mgzlWlnBdALCV88 oracle@openEuler01
1016The key's randomart image is:
1017+---[RSA 3072]----+
1018| .ooo*=+o|
1019| +o=o*@o|
1020| o++++oE|
1021| . * +o..|
1022| S * o..o |
1023| . . +o +. |
1024| ..o=.. |
1025| .=.+ |
1026| . + |
1027+----[SHA256]-----+
1028
1029#==============================================================#
1030静默解压缩 Grid 软件包
1031#==============================================================#
1032
1033正在静默解压缩 Grid 软件包,请稍等:
1034
1035.---- -. -. . . . .
1036( .',----- - - ' ' ' __
1037 \_/ ;--:- __--------------------___ ____=========_||___
1038__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
1039c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
1040,_\___________'_|,L______],|______________________|_i,!________________!_i
1041/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
1042""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
1043
1044
1045静默解压 Grid 软件安装包: /soft/LINUX.X64_122010_grid_home.zip
1046
1047静默解压 OPatch 软件补丁包: /soft/p6880880_*.zip
1048
1049静默解压 Grid 软件补丁包: /soft/p33583921*.zip
1050
1051#==============================================================#
1052静默解压 Oracle 软件包
1053#==============================================================#
1054
1055正在静默解压缩 Oracle 软件包,请稍等:
1056
1057.---- -. -. . . . .
1058( .',----- - - ' ' ' __
1059 \_/ ;--:- __--------------------___ ____=========_||___
1060__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
1061c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
1062,_\___________'_|,L______],|______________________|_i,!________________!_i
1063/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
1064""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
1065
1066静默解压 Oracle 软件安装包: /soft/LINUX.X64_122010_db_home.zip
1067
1068静默解压 Oracle 软件补丁包: /soft/p33587128*.zip
1069
1070静默解压 OJVM 软件补丁包: /soft/p33561275*.zip
1071
1072#==============================================================#
1073Grid 安装静默文件
1074#==============================================================#
1075
1076INVENTORY_LOCATION=/u01/app/oraInventory
1077oracle.install.option=CRS_CONFIG
1078ORACLE_BASE=/u01/app/grid
1079oracle.install.asm.OSDBA=asmdba
1080oracle.install.asm.OSOPER=asmoper
1081oracle.install.asm.OSASM=asmadmin
1082oracle.install.crs.config.gpnp.scanName=openEuler-scan
1083oracle.install.crs.config.gpnp.scanPort=1521
1084oracle.install.crs.config.clusterName=openEuler-cls
1085oracle.install.crs.config.gpnp.configureGNS=false
1086oracle.install.crs.config.clusterNodes=openEuler01:openEuler01-vip:HUB,openEuler02:openEuler02-vip:HUB
1087oracle.install.crs.config.networkInterfaceList=ens33:192.168.6.0:1,ens37:1.1.1.0:5
1088oracle.install.crs.config.useIPMI=false
1089oracle.install.asm.SYSASMPassword=oracle
1090oracle.install.asm.diskGroup.name=OCR
1091oracle.install.asm.diskGroup.redundancy=EXTERNAL
1092oracle.install.asm.diskGroup.disks=/dev/asm_ocr_1
1093oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
1094oracle.install.asm.monitorPassword=oracle
1095oracle.install.crs.config.ClusterConfiguration=STANDALONE
1096oracle.install.crs.config.configureAsExtendedCluster=false
1097oracle.install.crs.configureGIMR=false
1098oracle.install.asm.storageOption=ASM
1099oracle.install.asm.diskGroup.AUSize=4
1100oracle.install.asm.configureAFD=false
1101oracle.install.crs.config.ignoreDownNodes=false
1102oracle.install.config.managementOption=NONE
1103oracle.install.crs.rootconfig.executeRootScript=false
1104oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v12.2.0
1105
1106#==============================================================#
1107静默安装 Grid 软件
1108#==============================================================#
1109
1110Preparing the home to patch...
1111Applying the patch /soft/33583921...
1112Successfully applied the patch.
1113The log can be found at: /tmp/GridSetupActions2024-03-29_03-22-23PM/installerPatchActions_2024-03-29_03-22-23PM.log
1114Launching Oracle Grid Infrastructure Setup Wizard...
1115
1116[WARNING] [INS-06009] SSH performance is detected to be slow, which may impact performance during remote node operations like copying the software and executing prerequisite checks.
1117 ACTION: Consider optimizing the ssh configuration.
1118[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
1119 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].
1120 ACTION: Provide a password that conforms to the Oracle recommended standards.
1121[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
1122 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].
1123 ACTION: Provide a password that conforms to the Oracle recommended standards.
1124You can find the log of this install session at:
1125 /tmp/GridSetupActions2024-03-29_03-22-23PM/gridSetupActions2024-03-29_03-22-23PM.log
1126
1127As a root user, execute the following script(s):
1128 1. /u01/app/oraInventory/orainstRoot.sh
1129 2. /u01/app/12.2.0/grid/root.sh
1130
1131Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
1132[openEuler01, openEuler02]
1133Execute /u01/app/12.2.0/grid/root.sh on the following nodes:
1134[openEuler01, openEuler02]
1135
1136Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.
1137
1138Successfully Setup Software.
1139As install user, execute the following command to complete the configuration.
1140 /u01/app/12.2.0/grid/gridSetup.sh -executeConfigTools -responseFile /soft/grid.rsp [-silent]
1141
1142
1143Moved the install session logs to:
1144 /u01/app/oraInventory/logs/GridSetupActions2024-03-29_03-22-23PM
1145
1146#==============================================================#
1147执行 root 脚本
1148#==============================================================#
1149
1150节点 192.168.6.130 :
1151
1152Changing permissions of /u01/app/oraInventory.
1153Adding read,write permissions for group.
1154Removing read,write,execute permissions for world.
1155
1156Changing groupname of /u01/app/oraInventory to oinstall.
1157The execution of the script is complete.
1158Check /u01/app/12.2.0/grid/install/root_openEuler01_2024-03-29_15-45-26-973924876.log for the output of root script
1159
1160节点 192.168.6.131 :
1161
1162Changing permissions of /u01/app/oraInventory.
1163Adding read,write permissions for group.
1164Removing read,write,execute permissions for world.
1165
1166Changing groupname of /u01/app/oraInventory to oinstall.
1167The execution of the script is complete.
1168Check /u01/app/12.2.0/grid/install/root_openEuler02_2024-03-29_16-00-08-717676645.log for the output of root script
1169
1170#==============================================================#
1171Grid 软件版本
1172#==============================================================#
1173
1174
1175SQL*Plus: Release 12.2.0.1.0 Production
1176
1177
1178#==============================================================#
1179Grid 补丁信息
1180#==============================================================#
1181
118233587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)
118333678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
118426839277;DBWLM RELEASE UPDATE 12.2.0.1.0(ID:170913) (26839277)
118533116894;ACFS JUL 2021 RELEASE UPDATE 12.2.0.1.210720 (33116894)
118633610989;TOMCAT RELEASE UPDATE 12.2.0.1.0(ID:RELEASE) (33610989)
1187
1188OPatch succeeded.
1189
1190
1191#==============================================================#
1192ASM 磁盘组创建
1193#==============================================================#
1194
1195State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
1196MOUNTED EXTERN N 512 512 4096 1048576 51200 51102 0 51102 0 N DATA/
1197MOUNTED EXTERN N 512 512 4096 4194304 10240 9904 0 9904 0 Y OCR/
1198
1199#==============================================================#
1200Oracle 安装静默文件
1201#==============================================================#
1202
1203oracle.install.option=INSTALL_DB_SWONLY
1204UNIX_GROUP_NAME=oinstall
1205INVENTORY_LOCATION=/u01/app/oraInventory
1206ORACLE_BASE=/u01/app/oracle
1207oracle.install.db.InstallEdition=EE
1208oracle.install.db.DBA_GROUP=dba
1209oracle.install.db.OPER_GROUP=oper
1210oracle.install.db.CLUSTER_NODES=openEuler01,openEuler02
1211oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
1212SELECTED_LANGUAGES=en,zh_CN
1213ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
1214oracle.install.db.OSBACKUPDBA_GROUP=backupdba
1215oracle.install.db.OSDGDBA_GROUP=dgdba
1216oracle.install.db.OSKMDBA_GROUP=kmdba
1217oracle.install.db.OSRACDBA_GROUP=racdba
1218
1219#==============================================================#
1220静默安装数据库软件
1221#==============================================================#
1222
1223Starting Oracle Universal Installer...
1224
1225Checking Temp space: must be greater than 500 MB. Actual 3697 MB Passed
1226Checking swap space: must be greater than 150 MB. Actual 8161 MB Passed
1227Preparing to launch Oracle Universal Installer from /tmp/OraInstall2024-03-29_04-12-09PM. Please wait ...You can find the log of this install session at:
1228 /u01/app/oraInventory/logs/installActions2024-03-29_04-12-09PM.log
1229
1230Prepare in progress.
1231.................................................. 7% Done.
1232
1233Prepare successful.
1234
1235Copy files in progress.
1236.................................................. 14% Done.
1237.................................................. 20% Done.
1238.................................................. 25% Done.
1239.................................................. 30% Done.
1240.................................................. 36% Done.
1241.................................................. 45% Done.
1242.................................................. 50% Done.
1243.................................................. 55% Done.
1244.................................................. 60% Done.
1245.................................................. 65% Done.
1246..........
1247Copy files successful.
1248
1249Link binaries in progress.
1250....................
1251Link binaries successful.
1252
1253Setup files in progress.
1254....................
1255Setup files successful.
1256
1257Setup Inventory in progress.
1258
1259Setup Inventory successful.
1260
1261Finish Setup successful.
1262The installation of Oracle Database 12c was successful.
1263Please check '/u01/app/oraInventory/logs/silentInstall2024-03-29_04-12-09PM.log' for more details.
1264
1265Copy Files to Remote Nodes in progress.
1266.................................................. 70% Done.
1267.................................................. 75% Done.
1268.................................................. 80% Done.
1269.................................................. 85% Done.
1270
1271Copy Files to Remote Nodes successful.
1272
1273Prepare in progress.
1274
1275Prepare successful.
1276..........
1277Setup in progress.
1278....................
1279Setup successful.
1280The Cluster Node Addition of /u01/app/oracle/product/12.2.0/db was successful.
1281Please check '/u01/app/oraInventory/logs/silentInstall2024-03-29_04-12-09PM.log' for more details.
1282
1283Setup Oracle Base in progress.
1284
1285Setup Oracle Base successful.
1286.................................................. 97% Done.
1287
1288As a root user, execute the following script(s):
1289 1. /u01/app/oracle/product/12.2.0/db/root.sh
1290
1291Execute /u01/app/oracle/product/12.2.0/db/root.sh on the following nodes:
1292[openEuler01, openEuler02]
1293
1294
1295.................................................. 100% Done.
1296Successfully Setup Software.
1297
1298#==============================================================#
1299执行 root 脚本
1300#==============================================================#
1301
1302节点 192.168.6.130 :
1303
1304Changing permissions of /u01/app/oraInventory.
1305Adding read,write permissions for group.
1306Removing read,write,execute permissions for world.
1307
1308Changing groupname of /u01/app/oraInventory to oinstall.
1309The execution of the script is complete.
1310Check /u01/app/oracle/product/12.2.0/db/install/root_openEuler01_2024-03-29_16-24-59-086809462.log for the output of root script
1311
1312节点 192.168.6.131 :
1313
1314Changing permissions of /u01/app/oraInventory.
1315Adding read,write permissions for group.
1316Removing read,write,execute permissions for world.
1317
1318Changing groupname of /u01/app/oraInventory to oinstall.
1319The execution of the script is complete.
1320Check /u01/app/oracle/product/12.2.0/db/install/root_openEuler02_2024-03-29_16-25-47-913124768.log for the output of root script
1321
1322#==============================================================#
1323Oracle 软件安装补丁
1324#==============================================================#
1325
1326节点 192.168.6.130 :
1327
1328Oracle Interim Patch Installer version 12.2.0.1.30
1329Copyright (c) 2024, Oracle Corporation. All rights reserved.
1330
1331PREREQ session
1332
1333Oracle Home : /u01/app/oracle/product/12.2.0/db
1334Central Inventory : /u01/app/oraInventory
1335 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1336OPatch version : 12.2.0.1.30
1337OUI version : 12.2.0.1.4
1338Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-25-10PM_1.log
1339
1340Invoking prereq "checkconflictagainstohwithdetail"
1341
1342Prereq "checkConflictAgainstOHWithDetail" passed.
1343
1344OPatch succeeded.
1345Oracle Interim Patch Installer version 12.2.0.1.30
1346Copyright (c) 2024, Oracle Corporation. All rights reserved.
1347
1348
1349Oracle Home : /u01/app/oracle/product/12.2.0/db
1350Central Inventory : /u01/app/oraInventory
1351 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1352OPatch version : 12.2.0.1.30
1353OUI version : 12.2.0.1.4
1354Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-25-13PM_1.log
1355
1356Verifying environment and performing prerequisite checks...
1357OPatch continues with these patches: 33587128
1358
1359Do you want to proceed? [y|n]
1360Y (auto-answered by -silent)
1361User Responded with: Y
1362All checks passed.
1363
1364Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
1365(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
1366
1367
1368Is the local system ready for patching? [y|n]
1369Y (auto-answered by -silent)
1370User Responded with: Y
1371Backing up files...
1372Applying interim patch '33587128' to OH '/u01/app/oracle/product/12.2.0/db'
1373ApplySession: Optional component(s) [ oracle.swd, 12.2.0.1.0 ] , [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] , [ oracle.network.gsm, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.cclient, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.ons.eons.bwcompat, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] not present in the Oracle Home or a higher version is found.
1374
1375Patching component oracle.rdbms.util, 12.2.0.1.0...
1376
1377Patching component oracle.rdbms, 12.2.0.1.0...
1378
1379Patching component oracle.network.rsf, 12.2.0.1.0...
1380
1381Patching component oracle.rdbms.rsf, 12.2.0.1.0...
1382
1383Patching component oracle.ctx, 12.2.0.1.0...
1384
1385Patching component oracle.has.common.cvu, 12.2.0.1.0...
1386
1387Patching component oracle.ldap.owm, 12.2.0.1.0...
1388
1389Patching component oracle.ldap.rsf, 12.2.0.1.0...
1390
1391Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
1392
1393Patching component oracle.oracore.rsf, 12.2.0.1.0...
1394
1395Patching component oracle.oraolap, 12.2.0.1.0...
1396
1397Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
1398
1399Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
1400
1401Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
1402
1403Patching component oracle.sdo, 12.2.0.1.0...
1404
1405Patching component oracle.sdo.locator, 12.2.0.1.0...
1406
1407Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...
1408
1409Patching component oracle.tfa, 12.2.0.1.0...
1410
1411Patching component oracle.ctx.rsf, 12.2.0.1.0...
1412
1413Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
1414
1415Patching component oracle.rdbms.install.common, 12.2.0.1.0...
1416
1417Patching component oracle.assistants.deconfig, 12.2.0.1.0...
1418
1419Patching component oracle.ons.ic, 12.2.0.1.0...
1420
1421Patching component oracle.rdbms.rman, 12.2.0.1.0...
1422
1423Patching component oracle.precomp.rsf, 12.2.0.1.0...
1424
1425Patching component oracle.install.deinstalltool, 12.2.0.1.0...
1426
1427Patching component oracle.assistants.acf, 12.2.0.1.0...
1428
1429Patching component oracle.rdbms.oci, 12.2.0.1.0...
1430
1431Patching component oracle.sqlplus.ic, 12.2.0.1.0...
1432
1433Patching component oracle.xdk.parser.java, 12.2.0.1.0...
1434
1435Patching component oracle.dbtoolslistener, 12.2.0.1.0...
1436
1437Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
1438
1439Patching component oracle.rdbms.dv, 12.2.0.1.0...
1440
1441Patching component oracle.rdbms.lbac, 12.2.0.1.0...
1442
1443Patching component oracle.ons, 12.2.0.1.0...
1444
1445Patching component oracle.ldap.client, 12.2.0.1.0...
1446
1447Patching component oracle.xdk, 12.2.0.1.0...
1448
1449Patching component oracle.xdk.rsf, 12.2.0.1.0...
1450
1451Patching component oracle.sqlplus, 12.2.0.1.0...
1452
1453Patching component oracle.assistants.server, 12.2.0.1.0...
1454
1455Patching component oracle.rdbms.crs, 12.2.0.1.0...
1456
1457Patching component oracle.precomp.common, 12.2.0.1.0...
1458
1459Patching component oracle.precomp.lang, 12.2.0.1.0...
1460
1461Patching component oracle.jdk, 1.8.0.91.0...
1462
1463OPatch found the word "error" in the stderr of the make command.
1464Please look at this stderr. You can re-run this make command.
1465Stderr output:
1466chmod: changing permissions of '/u01/app/oracle/product/12.2.0/db/bin/extjobO': Operation not permitted
1467make: [ins_rdbms.mk:533: iextjob] Error 1 (ignored)
1468
1469
1470Patch 33587128 successfully applied.
1471OPatch Session completed with warnings.
1472Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-25-13PM_1.log
1473
1474OPatch completed with warnings.
1475
1476节点 192.168.6.131 :
1477
1478Oracle Interim Patch Installer version 12.2.0.1.30
1479Copyright (c) 2024, Oracle Corporation. All rights reserved.
1480
1481PREREQ session
1482
1483Oracle Home : /u01/app/oracle/product/12.2.0/db
1484Central Inventory : /u01/app/oraInventory
1485 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1486OPatch version : 12.2.0.1.30
1487OUI version : 12.2.0.1.4
1488Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-33-34PM_1.log
1489
1490Invoking prereq "checkconflictagainstohwithdetail"
1491
1492Prereq "checkConflictAgainstOHWithDetail" passed.
1493
1494OPatch succeeded.
1495Oracle Interim Patch Installer version 12.2.0.1.30
1496Copyright (c) 2024, Oracle Corporation. All rights reserved.
1497
1498
1499Oracle Home : /u01/app/oracle/product/12.2.0/db
1500Central Inventory : /u01/app/oraInventory
1501 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1502OPatch version : 12.2.0.1.30
1503OUI version : 12.2.0.1.4
1504Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-33-37PM_1.log
1505
1506Verifying environment and performing prerequisite checks...
1507OPatch continues with these patches: 33587128
1508
1509Do you want to proceed? [y|n]
1510Y (auto-answered by -silent)
1511User Responded with: Y
1512All checks passed.
1513
1514Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
1515(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
1516
1517
1518Is the local system ready for patching? [y|n]
1519Y (auto-answered by -silent)
1520User Responded with: Y
1521Backing up files...
1522Applying interim patch '33587128' to OH '/u01/app/oracle/product/12.2.0/db'
1523ApplySession: Optional component(s) [ oracle.swd, 12.2.0.1.0 ] , [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] , [ oracle.network.gsm, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.cclient, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.ons.eons.bwcompat, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] not present in the Oracle Home or a higher version is found.
1524
1525Patching component oracle.rdbms.util, 12.2.0.1.0...
1526
1527Patching component oracle.rdbms, 12.2.0.1.0...
1528
1529Patching component oracle.network.rsf, 12.2.0.1.0...
1530
1531Patching component oracle.rdbms.rsf, 12.2.0.1.0...
1532
1533Patching component oracle.ctx, 12.2.0.1.0...
1534
1535Patching component oracle.has.common.cvu, 12.2.0.1.0...
1536
1537Patching component oracle.ldap.owm, 12.2.0.1.0...
1538
1539Patching component oracle.ldap.rsf, 12.2.0.1.0...
1540
1541Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
1542
1543Patching component oracle.oracore.rsf, 12.2.0.1.0...
1544
1545Patching component oracle.oraolap, 12.2.0.1.0...
1546
1547Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
1548
1549Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
1550
1551Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
1552
1553Patching component oracle.sdo, 12.2.0.1.0...
1554
1555Patching component oracle.sdo.locator, 12.2.0.1.0...
1556
1557Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...
1558
1559Patching component oracle.tfa, 12.2.0.1.0...
1560
1561Patching component oracle.ctx.rsf, 12.2.0.1.0...
1562
1563Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
1564
1565Patching component oracle.rdbms.install.common, 12.2.0.1.0...
1566
1567Patching component oracle.assistants.deconfig, 12.2.0.1.0...
1568
1569Patching component oracle.ons.ic, 12.2.0.1.0...
1570
1571Patching component oracle.rdbms.rman, 12.2.0.1.0...
1572
1573Patching component oracle.precomp.rsf, 12.2.0.1.0...
1574
1575Patching component oracle.install.deinstalltool, 12.2.0.1.0...
1576
1577Patching component oracle.assistants.acf, 12.2.0.1.0...
1578
1579Patching component oracle.rdbms.oci, 12.2.0.1.0...
1580
1581Patching component oracle.sqlplus.ic, 12.2.0.1.0...
1582
1583Patching component oracle.xdk.parser.java, 12.2.0.1.0...
1584
1585Patching component oracle.dbtoolslistener, 12.2.0.1.0...
1586
1587Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
1588
1589Patching component oracle.rdbms.dv, 12.2.0.1.0...
1590
1591Patching component oracle.rdbms.lbac, 12.2.0.1.0...
1592
1593Patching component oracle.ons, 12.2.0.1.0...
1594
1595Patching component oracle.ldap.client, 12.2.0.1.0...
1596
1597Patching component oracle.xdk, 12.2.0.1.0...
1598
1599Patching component oracle.xdk.rsf, 12.2.0.1.0...
1600
1601Patching component oracle.sqlplus, 12.2.0.1.0...
1602
1603Patching component oracle.assistants.server, 12.2.0.1.0...
1604
1605Patching component oracle.rdbms.crs, 12.2.0.1.0...
1606
1607Patching component oracle.precomp.common, 12.2.0.1.0...
1608
1609Patching component oracle.precomp.lang, 12.2.0.1.0...
1610
1611Patching component oracle.jdk, 1.8.0.91.0...
1612
1613OPatch found the word "error" in the stderr of the make command.
1614Please look at this stderr. You can re-run this make command.
1615Stderr output:
1616chmod: changing permissions of '/u01/app/oracle/product/12.2.0/db/bin/extjobO': Operation not permitted
1617make: [ins_rdbms.mk:533: iextjob] Error 1 (ignored)
1618
1619
1620Patch 33587128 successfully applied.
1621OPatch Session completed with warnings.
1622Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-33-37PM_1.log
1623
1624OPatch completed with warnings.
1625
1626#==============================================================#
1627OJVM 补丁安装
1628#==============================================================#
1629
1630节点 192.168.6.130 :
1631
1632Oracle Interim Patch Installer version 12.2.0.1.30
1633Copyright (c) 2024, Oracle Corporation. All rights reserved.
1634
1635PREREQ session
1636
1637Oracle Home : /u01/app/oracle/product/12.2.0/db
1638Central Inventory : /u01/app/oraInventory
1639 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1640OPatch version : 12.2.0.1.30
1641OUI version : 12.2.0.1.4
1642Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-40-44PM_1.log
1643
1644Invoking prereq "checkconflictagainstohwithdetail"
1645
1646Prereq "checkConflictAgainstOHWithDetail" passed.
1647
1648OPatch succeeded.
1649Oracle Interim Patch Installer version 12.2.0.1.30
1650Copyright (c) 2024, Oracle Corporation. All rights reserved.
1651
1652
1653Oracle Home : /u01/app/oracle/product/12.2.0/db
1654Central Inventory : /u01/app/oraInventory
1655 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1656OPatch version : 12.2.0.1.30
1657OUI version : 12.2.0.1.4
1658Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-40-49PM_1.log
1659
1660Verifying environment and performing prerequisite checks...
1661OPatch continues with these patches: 33561275
1662
1663Do you want to proceed? [y|n]
1664Y (auto-answered by -silent)
1665User Responded with: Y
1666All checks passed.
1667
1668Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
1669(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
1670
1671
1672Is the local system ready for patching? [y|n]
1673Y (auto-answered by -silent)
1674User Responded with: Y
1675Backing up files...
1676Applying interim patch '33561275' to OH '/u01/app/oracle/product/12.2.0/db'
1677
1678Patching component oracle.javavm.server, 12.2.0.1.0...
1679
1680Patching component oracle.javavm.server.core, 12.2.0.1.0...
1681
1682Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
1683
1684Patching component oracle.javavm.client, 12.2.0.1.0...
1685
1686Patching component oracle.rdbms, 12.2.0.1.0...
1687
1688Patching component oracle.dbjava.jdbc, 12.2.0.1.0...
1689
1690Patching component oracle.dbjava.ic, 12.2.0.1.0...
1691Patch 33561275 successfully applied.
1692Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-40-49PM_1.log
1693
1694OPatch succeeded.
1695
1696节点 192.168.6.131 :
1697
1698Oracle Interim Patch Installer version 12.2.0.1.30
1699Copyright (c) 2024, Oracle Corporation. All rights reserved.
1700
1701PREREQ session
1702
1703Oracle Home : /u01/app/oracle/product/12.2.0/db
1704Central Inventory : /u01/app/oraInventory
1705 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1706OPatch version : 12.2.0.1.30
1707OUI version : 12.2.0.1.4
1708Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-42-44PM_1.log
1709
1710Invoking prereq "checkconflictagainstohwithdetail"
1711
1712Prereq "checkConflictAgainstOHWithDetail" passed.
1713
1714OPatch succeeded.
1715Oracle Interim Patch Installer version 12.2.0.1.30
1716Copyright (c) 2024, Oracle Corporation. All rights reserved.
1717
1718
1719Oracle Home : /u01/app/oracle/product/12.2.0/db
1720Central Inventory : /u01/app/oraInventory
1721 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
1722OPatch version : 12.2.0.1.30
1723OUI version : 12.2.0.1.4
1724Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-42-47PM_1.log
1725
1726Verifying environment and performing prerequisite checks...
1727OPatch continues with these patches: 33561275
1728
1729Do you want to proceed? [y|n]
1730Y (auto-answered by -silent)
1731User Responded with: Y
1732All checks passed.
1733
1734Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
1735(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
1736
1737
1738Is the local system ready for patching? [y|n]
1739Y (auto-answered by -silent)
1740User Responded with: Y
1741Backing up files...
1742Applying interim patch '33561275' to OH '/u01/app/oracle/product/12.2.0/db'
1743
1744Patching component oracle.javavm.server, 12.2.0.1.0...
1745
1746Patching component oracle.javavm.server.core, 12.2.0.1.0...
1747
1748Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
1749
1750Patching component oracle.javavm.client, 12.2.0.1.0...
1751
1752Patching component oracle.rdbms, 12.2.0.1.0...
1753
1754Patching component oracle.dbjava.jdbc, 12.2.0.1.0...
1755
1756Patching component oracle.dbjava.ic, 12.2.0.1.0...
1757Patch 33561275 successfully applied.
1758Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-42-47PM_1.log
1759
1760OPatch succeeded.
1761
1762#==============================================================#
1763Oracle 软件版本
1764#==============================================================#
1765
1766
1767SQL*Plus: Release 12.2.0.1.0 Production
1768
1769
1770#==============================================================#
1771Oracle 补丁信息
1772#==============================================================#
1773
177433561275;OJVM RELEASE UPDATE 12.2.0.1.220118 (33561275)
177533587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)
1776
1777OPatch succeeded.
1778
1779
1780#==============================================================#
1781静默建库命令
1782#==============================================================#
1783
1784dbca -silent -createDatabase \
1785-ignorePrereqFailure \
1786-templateName General_Purpose.dbc \
1787-responseFile NO_VALUE \
1788-gdbName lucifer \
1789-sid lucifer \
1790-sysPassword oracle \
1791-systemPassword oracle \
1792-redoLogFileSize 100 \
1793-diskGroupName +DATA \
1794-storageType ASM -enableArchive true \
1795-archiveLogDest +DATA \
1796-databaseConfigType RAC \
1797-nodeinfo openEuler01,openEuler02 \
1798-characterset AL32UTF8 \
1799-nationalCharacterSet AL16UTF16 \
1800-emConfiguration NONE \
1801-automaticMemoryManagement false \
1802-totalMemory 3716 \
1803-databaseType OLTP \
1804-createAsContainerDatabase false
1805
1806#==============================================================#
1807创建数据库
1808#==============================================================#
1809
1810[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
1811 CAUSE:
1812a. 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].
1813b.The password entered is a keyword that Oracle does not recommend to be used as password
1814 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
1815[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
1816 CAUSE:
1817a. 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].
1818b.The password entered is a keyword that Oracle does not recommend to be used as password
1819 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
1820[WARNING] [DBT-09102] Target environment does not meet some optional requirements.
1821 CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oracle/cfgtoollogs/dbca/trace.log_2024-03-29_04-43-11-PM
1822 ACTION: Find the appropriate configuration from the log file or from the installation guide to meet the prerequisites and fix this manually.
1823Copying database files
18241% complete
18252% complete
182615% complete
182727% complete
1828Creating and starting Oracle instance
182929% complete
183032% complete
183136% complete
183240% complete
183341% complete
183443% complete
183545% complete
1836Creating cluster database views
183747% complete
183863% complete
1839Completing Database Creation
184064% complete
184165% complete
184268% complete
184370% complete
184472% complete
1845Executing Post Configuration Actions
1846100% complete
1847Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/lucifer/lucifer.log" for further details.
1848
1849#==============================================================#
1850配置 OMF && 优化 RMAN
1851#==============================================================#
1852
1853
1854Recovery Manager: Release 12.2.0.1.0 - Production on Fri Mar 29 17:00:00 2024
1855
1856Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
1857
1858connected to target database: LUCIFER (DBID=4020788558)
1859
1860RMAN>
1861using target database control file instead of recovery catalog
1862new RMAN configuration parameters:
1863CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_fdcdb1.f';
1864new RMAN configuration parameters are successfully stored
1865
1866RMAN>
1867
1868Recovery Manager complete.
1869
1870
1871#==============================================================#
1872配置控制文件复用
1873#==============================================================#
1874
1875
1876Recovery Manager: Release 12.2.0.1.0 - Production on Fri Mar 29 17:01:37 2024
1877
1878Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
1879
1880connected to target database: LUCIFER (not mounted)
1881
1882RMAN>
1883Starting restore at 29-MAR-24
1884using target database control file instead of recovery catalog
1885allocated channel: ORA_DISK_1
1886channel ORA_DISK_1: SID=623 instance=lucifer1 device type=DISK
1887
1888channel ORA_DISK_1: copied control file copy
1889Finished restore at 29-MAR-24
1890
1891
1892Recovery Manager complete.
1893
1894数据库控制文件:
1895
1896
1897NAME
1898----------------------------------------------------------------------------------------------------
1899+DATA/LUCIFER/CONTROLFILE/current.261.1164905295
1900+DATA/LUCIFER/CONTROLFILE/control02.ctl
1901
1902#==============================================================#
1903配置在线重做日志
1904#==============================================================#
1905
1906数据库在线重做日志文件:
1907
1908
1909 THREAD# GROUP# MEMBER size(M)
1910---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
1911 1 1 +DATA/LUCIFER/ONLINELOG/group_1.262.1164905297 100
1912 1 2 +DATA/LUCIFER/ONLINELOG/group_2.263.1164905297 100
1913 1 11 +DATA/LUCIFER/ONLINELOG/group_11.272.1164906167 100
1914 1 12 +DATA/LUCIFER/ONLINELOG/group_12.273.1164906171 100
1915 1 13 +DATA/LUCIFER/ONLINELOG/group_13.274.1164906173 100
1916 1 14 +DATA/LUCIFER/ONLINELOG/group_14.275.1164906175 100
1917 1 15 +DATA/LUCIFER/ONLINELOG/group_15.276.1164906179 100
1918 2 3 +DATA/LUCIFER/ONLINELOG/group_3.266.1164905873 100
1919 2 4 +DATA/LUCIFER/ONLINELOG/group_4.267.1164905875 100
1920 2 21 +DATA/LUCIFER/ONLINELOG/group_21.277.1164906183 100
1921 2 22 +DATA/LUCIFER/ONLINELOG/group_22.278.1164906185 100
1922 2 23 +DATA/LUCIFER/ONLINELOG/group_23.279.1164906187 100
1923 2 24 +DATA/LUCIFER/ONLINELOG/group_24.280.1164906191 100
1924 2 25 +DATA/LUCIFER/ONLINELOG/group_25.281.1164906193 100
1925
1926#==============================================================#
1927配置 RMAN 备份任务
1928#==============================================================#
1929
1930## OracleBegin
193100 02 * * * /home/oracle/scripts/del_arch.sh
1932#00 00 * * 0 /home/oracle/scripts/dbbackup_lv0.sh
1933#00 00 * * 1,2,3,4,5,6 /home/oracle/scripts/dbbackup_lv1.sh
1934
1935#==============================================================#
1936配置 glogin.sql
1937#==============================================================#
1938
1939define _editor=vi
1940set serveroutput on size 1000000
1941set pagesize 9999
1942set long 99999
1943set trimspool on
1944col name format a80
1945set termout off
1946define gname=idle
1947column global_name new_value gname
1948select 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 );
1949ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
1950set sqlprompt '&gname _DATE> '
1951set termout on
1952
1953#==============================================================#
1954优化数据库参数
1955#==============================================================#
1956
1957数据库参数:
1958
1959
1960NAME SID SPVALUE VALUE
1961-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
1962_b_tree_bitmap_plans * FALSE FALSE
1963_datafile_write_errors_crash_instance * FALSE FALSE
1964audit_file_dest * /u01/app/oracle/admin/lucifer/adump /u01/app/oracle/admin/lucifer/adump
1965audit_trail * NONE DB
1966cluster_database * true TRUE
1967compatible * 12.2.0 12.2.0
1968control_file_record_keep_time * 31 31
1969db_block_size * 8192 8192
1970db_create_file_dest * +DATA +DATA
1971db_file_multiblock_read_count * 128
1972db_files * 5000 200
1973db_name * lucifer lucifer
1974db_writer_processes * 1
1975deferred_segment_creation * FALSE FALSE
1976diagnostic_dest * /u01/app/oracle /u01/app/oracle
1977dispatchers * (PROTOCOL=TCP) (SERVICE=luciferXDB) (PROTOCOL=TCP) (SERVICE=luciferXDB)
1978event * 10949 trace name context forever,level 1
1979event * 28401 trace name context forever,level 1
1980fast_start_parallel_rollback * LOW
1981instance_mode * read-only READ-WRITE
1982log_archive_dest_1 * location=+DATA location=+DATA
1983log_archive_format * %t_%s_%r.dbf %t_%s_%r.dbf
1984max_dump_file_size * unlimited
1985max_string_size * STANDARD
1986nls_language * AMERICAN AMERICAN
1987nls_territory * AMERICA AMERICA
1988open_cursors * 1000 300
1989optimizer_adaptive_plans * TRUE
1990optimizer_adaptive_statistics * FALSE
1991optimizer_index_caching * 0
1992optimizer_mode * ALL_ROWS
1993parallel_force_local * TRUE FALSE
1994parallel_max_servers * 64 64
1995pga_aggregate_target * 1246756864 780140544
1996processes * 2000 640
1997remote_login_passwordfile * exclusive EXCLUSIVE
1998session_cached_cursors * 300 50
1999sessions * 984
2000sga_max_size * 4988076032 3120562176
2001sga_target * 4988076032 3120562176
2002spfile * +DATA/LUCIFER/PARAMETERFILE/spfile.269.1164905879
2003statistics_level * TYPICAL
2004undo_retention * 10800 900
2005
2006恭喜!Oracle RAC 安装成功,现在是否重启主机:[Y/N] Y