前言

Oracle 一键安装脚本,演示 openEuler 22.03 LTS SP3 一键安装 Oracle 12CR2 RAC(220118) 过程(全程无需人工干预):(脚本包括 ORALCE PSU/OJVM 等补丁自动安装

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

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

安装准备

  • 1、安装好操作系统,建议安装图形化
  • 2、配置好网络
  • 3、挂载本地 ISO 镜像源
  • 4、上传软件安装包(安装基础包,补丁包:33583921、33587128、33561275、6880880)
  • 5、上传一键安装脚本:OracleShellInstall

✨ 偷懒可以直接下载本文安装包合集:openEuler 22.03 LTS SP3 安装 Oracle 12CR2 RAC(220118)安装包合集(包含补丁!!!)


注意:由于 openEuler 22.03 LTS SP3 安装 12CR2 RAC 时,DB 打补丁使用 opatchauto 有 BUG,且未找到解决方案:

1
2
3
4
5
6
7
8
System initialization log file is /<GRID_HOME>/cfgtoollogs/opatchautodb/systemconfigAM.log.

OPATCHAUTO-72050: System instance creation failed.
OPATCHAUTO-72050: Failed while retrieving system information.
OPATCHAUTO-72050: Please check log file for more details.

OPatchauto session completed
Time taken to complete the session 0 minute, 14 seconds

故必须要指定 -opa 参数,使用 opatch apply 方式安装补丁。


演示环境信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# 主机版本
[root@openEuler01 soft]# cat /etc/openEuler-release
openEuler release 22.03 (LTS-SP3)

# 网络信息
## 节点一
[root@openEuler01 soft]# ip a
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:51:f8:ca brd ff:ff:ff:ff:ff:ff
inet 192.168.6.130/24 brd 192.168.6.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fe80::6bae:9840:87e5:b777/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:51:f8:de brd ff:ff:ff:ff:ff:ff
inet 1.1.1.1/24 brd 1.1.1.255 scope global noprefixroute ens37
valid_lft forever preferred_lft forever
inet6 fe80::7590:c66c:2046:880c/64 scope link noprefixroute
valid_lft forever preferred_lft forever

## 节点二
[root@openEuler02 ~]# ip a
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:6e:b2:2c brd ff:ff:ff:ff:ff:ff
inet 192.168.6.131/24 brd 192.168.6.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe6e:b22c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:6e:b2:40 brd ff:ff:ff:ff:ff:ff
inet 1.1.1.2/24 brd 1.1.1.255 scope global noprefixroute ens37
valid_lft forever preferred_lft forever
inet6 fe80::683c:1c48:9251:7df7/64 scope link noprefixroute
valid_lft forever preferred_lft forever

# 挂载本地 ISO 镜像
## 节点一
[root@openEuler01 soft]# mount | grep iso | grep -v "/run/media"
/dev/sr0 on /mnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
[root@openEuler01 soft]# df -h|grep /mnt
/dev/sr0 18G 18G 0 100% /mnt

## 节点二
[root@openEuler02 soft]# mount | grep iso | grep -v "/run/media"
/dev/sr0 on /mnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
[root@openEuler02 soft]# df -h|grep /mnt
/dev/sr0 18G 18G 0 100% /mnt

# starwind 共享磁盘挂载(有存储就不需要使用 starwind,直接存储上划盘挂载就可)
yum install -y iscsi-initiator-utils*
systemctl start iscsid.service
systemctl enable iscsid.service
iscsiadm -m discovery -t st -p 192.168.6.188
## 挂载 ASM 磁盘
iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:192.168.6.188-lucifer -p 192.168.6.188 -l
## 配置开机自动挂载
iscsiadm -m node –T iqn.2008-08.com.starwindsoftware:192.168.6.188-lucifer -p 192.168.6.188 --op update -n node.startup -v automatic

## 节点一
[root@openEuler01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 99G 0 part
├─openeuler-root 253:0 0 91G 0 lvm /
└─openeuler-swap 253:1 0 8G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sdc 8:32 0 50G 0 disk
sr0 11:0 1 17.1G 0 rom /mnt

## 节点二
[root@openEuler02 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 99G 0 part
├─openeuler-root 253:0 0 91G 0 lvm /
└─openeuler-swap 253:1 0 8G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sdc 8:32 0 50G 0 disk
sr0 11:0 1 17.1G 0 rom /mnt

# 安装包存放在 /soft 目录下
[root@openEuler01 ~]# cd /soft/
[root@openEuler01 soft]# ll
-rwxr-xr-x. 1 root root 1307484 Mar 29 14:33 compat-glibc-2.12-4.el7.centos.x86_64.rpm
-rwx------. 1 root root 3453696911 Mar 29 14:29 LINUX.X64_122010_db_home.zip
-rwx------. 1 root root 2994687209 Mar 29 14:29 LINUX.X64_122010_grid_home.zip
-rwxr-xr-x. 1 root root 173098 Mar 29 14:56 OracleShellInstall
-rwxr-xr-x. 1 root root 138022236 Mar 29 14:28 p33561275_122010_Linux-x86-64.zip
-rwx------. 1 root root 2393137641 Mar 29 14:31 p33583921_122010_Linux-x86-64.zip
-rwx------. 1 root root 1020001457 Mar 29 14:57 p33587128_122010_Linux-x86-64.zip
-rwx------. 1 root root 124109254 Mar 29 14:28 p6880880_122010_Linux-x86-64.zip
-rwx------. 1 root root 321590 Mar 20 13:58 rlwrap-0.44.tar.gz

## 注意这个必须要,否则无法安装,报错:
## jskm.c:(.text+0x4081): undefined reference to `stat'
## eobtl.c:(.text+0x914): undefined reference to `fstat'
## 下载:https://mirrors.ustc.edu.cn/centos/7/os/x86_64/Packages/compat-glibc-2.12-4.el7.centos.x86_64.rpm
-rwxr-xr-x. 1 root root 1307484 Mar 27 15:55 compat-glibc-2.12-4.el7.centos.x86_64.rpm

# 修改 root 密码,脚本不支持特殊字符,例如 @ 符号
# 去除密码复杂度
sed -i 's/^password\+[[:space:]]\+requisite[[:space:]]\+pam_pwquality.so/#&/g' /etc/pam.d/system-auth
sed -i 's/use_authtok$//' /etc/pam.d/system-auth
# 修改 root 密码
[root@openEuler01 soft]# passwd root
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

[root@openEuler02 ~]# passwd root
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

以上配置完成后,建议重启两台主机,重启后记得再次挂载 ISO:

1
2
3
4
5
[root@openEuler01:/soft]$ mount /dev/cdrom /mnt/
mount: /mnt: WARNING: source write-protected, mounted read-only.

[root@openEuler02:/root]$ mount /dev/cdrom /mnt/
mount: /mnt: WARNING: source write-protected, mounted read-only.

确保安装环境准备完成后,即可执行一键安装。


📢注意: 如果安装过程中 GRID 安装报错(一般是因为 ASM 磁盘没有配置好,可能是 openEuler 不适配的原因):

1
2
3
4
5
6
7
[FATAL] [INS-30508] Invalid ASM disks.
CAUSE: The disks [/dev/asm_ocr_1] were not valid.
ACTION: Please choose or enter valid ASM disks.
[FATAL] [INS-30515] Insufficient space available in the selected disks.
CAUSE: Insufficient space available in the selected Disks. At least, 1,164 MB of free space is required.
ACTION: Choose additional disks such that the total size should be at least 1,164 MB.
抱歉,Grid 软件安装失败,请检查!

则需要重启两台主机,确认 ASM 磁盘已经如下挂载成功后再次执行安装命令:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@openEuler01:/root]$ lsblk 
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 99G 0 part
├─openeuler-root 253:0 0 91G 0 lvm /
└─openeuler-swap 253:1 0 8G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
└─asm_ocr_1 253:3 0 10G 0 mpath
sdc 8:32 0 50G 0 disk
└─asm_data_1 253:2 0 50G 0 mpath
sr0 11:0 1 17.1G 0 rom

[root@openEuler02:/root]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 99G 0 part
├─openeuler-root 253:0 0 91G 0 lvm /
└─openeuler-swap 253:1 0 8G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
└─asm_ocr_1 253:3 0 10G 0 mpath
sdc 8:32 0 50G 0 disk
└─asm_data_1 253:2 0 50G 0 mpath
sr0 11:0 1 17.1G 0 rom

安装命令

使用标准生产环境安装参数(安装过程若失败,脚本支持重复执行安装):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 根据脚本 README 或者 -h 命令提示,编辑好一键安装命令,进入 /soft 目录执行安装:
./OracleShellInstall -n openEuler `# hostname prefix`\
-hn openEuler01,openEuler02 `# rac node hostname`\
-cn openEuler-cls `# cluster_name`\
-rp oracle `# root password`\
-gp oracle `# grid password`\
-op oracle `# oracle password`\
-lf ens33 `# local ip ifname`\
-pf ens37 `# rac private ip ifname`\
-ri 192.168.6.130,192.168.6.131 `# rac node public ip`\
-vi 192.168.6.132,192.168.6.133 `# rac virtual ip`\
-si 192.168.6.134 `# rac scan ip`\
-od /dev/sdb `# rac ocr asm disk`\
-dd /dev/sdc `# rac data asm disk`\
-o lucifer `# dbname`\
-ds AL32UTF8 `# database character`\
-ns AL16UTF16 `# national character`\
-redo 100 `# redo size`\
-dp oracle `# sys/system password`\
-gpa 33583921 `# grid PSU/RU`\
-opa 33587128 `# db PSU/RU`\
-jpa 33561275 `# OJVM PSU/RU`\
-opd Y `# optimize db`

选择需要安装的模式以及版本,即可开始安装:

安装过程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
    ███████                             ██          ████████ ██               ██  ██ ██                    ██              ██  ██
██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░


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

数据库安装模式: rac

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

数据库版本: 12

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

[openEuler]
name=openEuler
baseurl=file:////mnt
enabled=1
gpgcheck=1
gpgkey=file:////mnt/RPM-GPG-KEY-openEuler

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

格式化 OCR 磁盘:/dev/sdb

1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.0126392 s, 81.0 kB/s

OCR磁盘组的磁盘UUID: 2e87e4f535c397171

格式化 DATA 磁盘:/dev/sdc

1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.00779187 s, 131 kB/s

DATA磁盘组的磁盘UUID: 2f218dae15b551c5d

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

Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:+J/iECLEmrafHqwjHxZHcrzj2TiwoBWFWZmjFtNwESA root@openEuler01
The key's randomart image is:
+---[RSA 3072]----+
|E oB*= |
| o=+= |
| =++. |
| +o= . . |
|+o= = o S |
|oooB * o |
|..+o= o . |
|.oo.o. ... . |
|.o++ ...o |
+----[SHA256]-----+

#==============================================================#
打印系统信息
#==============================================================#

服务器时间:

Fri Mar 29 03:04:26 PM CST 2024

操作系统版本:

NAME="openEuler"
VERSION="22.03 (LTS-SP3)"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 (LTS-SP3)"
ANSI_COLOR="0;31"


内核信息:

Linux 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

服务器属性:

vmware

cpu信息:

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 43 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
BIOS Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
BIOS Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
CPU family: 6
Model: 62
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 8
Stepping: 4
BogoMIPS: 5187.49
Flags: 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
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 256 KiB (8 instances)
L1i cache: 256 KiB (8 instances)
L2 cache: 2 MiB (8 instances)
L3 cache: 120 MiB (8 instances)
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: KVM: Mitigation: VMX unsupported
Vulnerability L1tf: Mitigation; PTE Inversion
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Unknown: No mitigations
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

内存信息:

total used free shared buff/cache available
Mem: 7433 464 5788 8 1447 6969
Swap: 8187 0 8187
total used free shared buff/cache available
Mem: 7.3Gi 464Mi 5.7Gi 8.7Mi 1.4Gi 6.8Gi
Swap: 8.0Gi 0B 8.0Gi

挂载信息:

/dev/mapper/openeuler-root / ext4 defaults 1 1
UUID=07e6a80f-f2f4-42f8-a1ad-df05bd354960 /boot ext4 defaults 1 2
/dev/mapper/openeuler-swap none swap defaults 0 0

目录信息:

Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 3.7G 0 3.7G 0% /dev/shm
tmpfs 1.5G 8.8M 1.5G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/mapper/openeuler-root 90G 12G 73G 14% /
tmpfs 3.7G 0 3.7G 0% /tmp
/dev/sda1 974M 174M 733M 20% /boot
/dev/sr0 18G 18G 0 100% /mnt

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

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

Mar 29 14:49:36 openEuler01 systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 29 14:49:38 openEuler01 systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 29 15:04:26 openEuler01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Mar 29 15:04:27 openEuler01 systemd[1]: firewalld.service: Deactivated successfully.
Mar 29 15:04:27 openEuler01 systemd[1]: Stopped firewalld - dynamic firewall daemon.

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

SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: disabled
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 33

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

NOZEROCONF=yes

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

bc-1.07.1-12.oe2203sp3.x86_64
binutils-2.37-24.oe2203sp3.x86_64
package compat-libcap1 is not installed
gcc-10.3.1-49.oe2203sp3.x86_64
gcc-c++-10.3.1-49.oe2203sp3.x86_64
package elfutils-libelf is not installed
package elfutils-libelf-devel is not installed
glibc-2.34-143.oe2203sp3.x86_64
glibc-devel-2.34-143.oe2203sp3.x86_64
libaio-0.3.113-9.oe2203sp3.x86_64
libaio-devel-0.3.113-9.oe2203sp3.x86_64
libgcc-10.3.1-49.oe2203sp3.x86_64
libstdc++-10.3.1-49.oe2203sp3.x86_64
libstdc++-devel-10.3.1-49.oe2203sp3.x86_64
libxcb-1.15-1.oe2203sp3.x86_64
libX11-1.7.2-8.oe2203sp3.x86_64
libXau-1.0.10-1.oe2203sp3.x86_64
libXi-1.8-2.oe2203sp3.x86_64
libXrender-0.9.10-12.oe2203sp3.x86_64
make-4.3-4.oe2203sp3.x86_64
net-tools-2.10-3.oe2203sp3.x86_64
smartmontools-7.2-2.oe2203sp3.x86_64
sysstat-12.5.4-9.oe2203sp3.x86_64
e2fsprogs-1.46.4-24.oe2203sp3.x86_64
package e2fsprogs-libs is not installed
unzip-6.0-50.oe2203sp3.x86_64
openssh-clients-8.8p1-23.oe2203sp3.x86_64
readline-8.1-3.oe2203sp3.x86_64
readline-devel-8.1-3.oe2203sp3.x86_64
psmisc-23.5-2.oe2203sp3.x86_64
ksh-2020.0.0-10.oe2203sp3.x86_64
nfs-utils-2.5.4-15.oe2203sp3.x86_64
tar-1.34-5.oe2203sp3.x86_64
package device-mapper-multipath is not installed
avahi-0.8-18.oe2203sp3.x86_64
ntp-4.2.8p15-13.oe2203sp3.x86_64
chrony-4.1-6.oe2203sp3.x86_64
libXtst-1.2.4-1.oe2203sp3.x86_64
libXrender-devel-0.9.10-12.oe2203sp3.x86_64
fontconfig-devel-2.13.94-3.oe2203sp3.x86_64
policycoreutils-3.3-8.oe2203sp3.x86_64
package policycoreutils-python is not installed
libcap-devel-2.61-6.oe2203sp3.x86_64
xorg-x11-utils-7.5-31.oe2203sp3.x86_64
xorg-x11-xauth-1.1.2-1.oe2203sp3.x86_64
glibc-compat-2.17-2.34-143.oe2203sp3.x86_64
elfutils-0.185-18.oe2203sp3.x86_64
elfutils-devel-0.185-18.oe2203sp3.x86_64
libnsl2-devel-2.0.0-5.oe2203sp3.x86_64
package librdmacm is not installed
libnsl-2.34-143.oe2203sp3.x86_64
package libibverbs is not installed
package compat-openssl10 is not installed
policycoreutils-python-utils-3.3-8.oe2203sp3.noarch

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

openEuler01

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

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.6.130 openEuler01
192.168.6.132 openEuler01-vip
1.1.1.1 openEuler01-priv
192.168.6.131 openEuler02
192.168.6.133 openEuler02-vip
1.1.1.2 openEuler02-priv
192.168.6.134 openEuler-scan

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

oracle 用户:

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

grid 用户:

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


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

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

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

args="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"
-resume=/dev/mapper/openeuler-swap
-args="ro
args="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"
-rhgb
-crashkernel=512M

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

kernel.sysrq = 0
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
kernel.dmesg_restrict = 1
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 7795097599
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.min_free_kbytes = 30449
net.ipv4.conf.ens33.rp_filter = 1
vm.swappiness = 10
kernel.panic_on_oops = 1
kernel.randomize_va_space = 2
kernel.numa_balancing = 0
net.ipv4.conf.ens37.rp_filter = 2

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

[Login]
RemoveIPC=no

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

查看 /etc/security/limits.conf:

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

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

auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
-session optional pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so

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

/dev/mapper/openeuler-root / ext4 defaults 1 1
UUID=07e6a80f-f2f4-42f8-a1ad-df05bd354960 /boot ext4 defaults 1 2
/dev/mapper/openeuler-swap none swap defaults 0 0
tmpfs /dev/shm tmpfs size=7612400k 0 0

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

成功安装 rlwrap: rlwrap 0.44

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

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

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

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

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

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

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

1194.236780 | asm_ocr_1: addmap [0 20971520 multipath 0 0 1 1 service-time 0 1 1 8:16 1]
1194.403395 | libdevmapper: ioctl/libdm-iface.c(1947): device-mapper: message ioctl on asm_ocr_1 failed: Invalid argument
1194.403786 | dm_message: libdm task=17 error: Invalid argument
1194.403807 | DM message failed [switch_group 1]
1194.405732 | asm_data_1: addmap [0 104857600 multipath 0 0 1 1 service-time 0 1 1 8:32 1]
create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET,IMAGEFILE
size=10G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
`- 3:0:0:0 sdb 8:16 undef ready running
create: asm_data_1 (2f218dae15b551c5d) undef ROCKET,IMAGEFILE
size=50G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
`- 3:0:0:1 sdc 8:32 undef ready running

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

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

/dev/asm_data_1
/dev/asm_ocr_1

UDEV 配置完成!

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

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

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


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

[openEuler]
name=openEuler
baseurl=file:////mnt
enabled=1
gpgcheck=1
gpgkey=file:////mnt/RPM-GPG-KEY-openEuler

#==============================================================#
打印系统信息
#==============================================================#

服务器时间:

Fri Mar 29 03:10:37 PM CST 2024

操作系统版本:

NAME="openEuler"
VERSION="22.03 (LTS-SP3)"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 (LTS-SP3)"
ANSI_COLOR="0;31"


内核信息:

Linux 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

服务器属性:

vmware

cpu信息:

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 43 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
BIOS Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
BIOS Model name: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
CPU family: 6
Model: 62
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 8
Stepping: 4
BogoMIPS: 5187.49
Flags: 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
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 256 KiB (8 instances)
L1i cache: 256 KiB (8 instances)
L2 cache: 2 MiB (8 instances)
L3 cache: 120 MiB (8 instances)
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: KVM: Mitigation: VMX unsupported
Vulnerability L1tf: Mitigation; PTE Inversion
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Unknown: No mitigations
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

内存信息:

total used free shared buff/cache available
Mem: 7433 445 6795 8 447 6988
Swap: 8187 0 8187
total used free shared buff/cache available
Mem: 7.3Gi 445Mi 6.6Gi 8.7Mi 447Mi 6.8Gi
Swap: 8.0Gi 0B 8.0Gi

挂载信息:

/dev/mapper/openeuler-root / ext4 defaults 1 1
UUID=3b8b94fa-6595-453b-938d-16b973646ae1 /boot ext4 defaults 1 2
/dev/mapper/openeuler-swap none swap defaults 0 0

目录信息:

Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 3.7G 0 3.7G 0% /dev/shm
tmpfs 1.5G 8.8M 1.5G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/mapper/openeuler-root 90G 2.3G 83G 3% /
tmpfs 3.7G 0 3.7G 0% /tmp
/dev/sda1 974M 174M 733M 20% /boot
/dev/sr0 18G 18G 0 100% /mnt

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

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

Mar 29 14:49:38 openEuler02 systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 29 14:49:39 openEuler02 systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 29 15:10:38 openEuler02 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Mar 29 15:10:38 openEuler02 systemd[1]: firewalld.service: Deactivated successfully.
Mar 29 15:10:38 openEuler02 systemd[1]: Stopped firewalld - dynamic firewall daemon.

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

SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: disabled
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 33

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

NOZEROCONF=yes

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

bc-1.07.1-12.oe2203sp3.x86_64
binutils-2.37-24.oe2203sp3.x86_64
package compat-libcap1 is not installed
gcc-10.3.1-49.oe2203sp3.x86_64
gcc-c++-10.3.1-49.oe2203sp3.x86_64
package elfutils-libelf is not installed
package elfutils-libelf-devel is not installed
glibc-2.34-143.oe2203sp3.x86_64
glibc-devel-2.34-143.oe2203sp3.x86_64
libaio-0.3.113-9.oe2203sp3.x86_64
libaio-devel-0.3.113-9.oe2203sp3.x86_64
libgcc-10.3.1-49.oe2203sp3.x86_64
libstdc++-10.3.1-49.oe2203sp3.x86_64
libstdc++-devel-10.3.1-49.oe2203sp3.x86_64
libxcb-1.15-1.oe2203sp3.x86_64
libX11-1.7.2-8.oe2203sp3.x86_64
libXau-1.0.10-1.oe2203sp3.x86_64
libXi-1.8-2.oe2203sp3.x86_64
libXrender-0.9.10-12.oe2203sp3.x86_64
make-4.3-4.oe2203sp3.x86_64
net-tools-2.10-3.oe2203sp3.x86_64
smartmontools-7.2-2.oe2203sp3.x86_64
sysstat-12.5.4-9.oe2203sp3.x86_64
e2fsprogs-1.46.4-24.oe2203sp3.x86_64
package e2fsprogs-libs is not installed
unzip-6.0-50.oe2203sp3.x86_64
openssh-clients-8.8p1-23.oe2203sp3.x86_64
readline-8.1-3.oe2203sp3.x86_64
readline-devel-8.1-3.oe2203sp3.x86_64
psmisc-23.5-2.oe2203sp3.x86_64
ksh-2020.0.0-10.oe2203sp3.x86_64
nfs-utils-2.5.4-15.oe2203sp3.x86_64
tar-1.34-5.oe2203sp3.x86_64
package device-mapper-multipath is not installed
avahi-0.8-18.oe2203sp3.x86_64
ntp-4.2.8p15-13.oe2203sp3.x86_64
chrony-4.1-6.oe2203sp3.x86_64
libXtst-1.2.4-1.oe2203sp3.x86_64
libXrender-devel-0.9.10-12.oe2203sp3.x86_64
fontconfig-devel-2.13.94-3.oe2203sp3.x86_64
policycoreutils-3.3-8.oe2203sp3.x86_64
package policycoreutils-python is not installed
libcap-devel-2.61-6.oe2203sp3.x86_64
xorg-x11-utils-7.5-31.oe2203sp3.x86_64
xorg-x11-xauth-1.1.2-1.oe2203sp3.x86_64
glibc-compat-2.17-2.34-143.oe2203sp3.x86_64
elfutils-0.185-18.oe2203sp3.x86_64
elfutils-devel-0.185-18.oe2203sp3.x86_64
libnsl2-devel-2.0.0-5.oe2203sp3.x86_64
package librdmacm is not installed
libnsl-2.34-143.oe2203sp3.x86_64
package libibverbs is not installed
package compat-openssl10 is not installed
policycoreutils-python-utils-3.3-8.oe2203sp3.noarch

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

openEuler02

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

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.6.130 openEuler01
192.168.6.132 openEuler01-vip
1.1.1.1 openEuler01-priv
192.168.6.131 openEuler02
192.168.6.133 openEuler02-vip
1.1.1.2 openEuler02-priv
192.168.6.134 openEuler-scan

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

oracle 用户:

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

grid 用户:

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


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

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

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

args="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"
-resume=/dev/mapper/openeuler-swap
-args="ro
args="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"
-rhgb
-crashkernel=512M

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

kernel.sysrq = 0
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
kernel.dmesg_restrict = 1
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 7795085311
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.min_free_kbytes = 30449
net.ipv4.conf.ens33.rp_filter = 1
vm.swappiness = 10
kernel.panic_on_oops = 1
kernel.randomize_va_space = 2
kernel.numa_balancing = 0
net.ipv4.conf.ens37.rp_filter = 2

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

[Login]
RemoveIPC=no

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

查看 /etc/security/limits.conf:

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

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

auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
-session optional pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so

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

/dev/mapper/openeuler-root / ext4 defaults 1 1
UUID=3b8b94fa-6595-453b-938d-16b973646ae1 /boot ext4 defaults 1 2
/dev/mapper/openeuler-swap none swap defaults 0 0
tmpfs /dev/shm tmpfs size=7612388k 0 0

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

成功安装 rlwrap: rlwrap 0.44

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

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

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

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

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

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

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

1564.000791 | asm_ocr_1: addmap [0 20971520 multipath 0 0 1 1 service-time 0 1 1 8:16 1]
1564.187547 | libdevmapper: ioctl/libdm-iface.c(1947): device-mapper: message ioctl on asm_ocr_1 failed: Invalid argument
1564.187636 | dm_message: libdm task=17 error: Invalid argument
1564.187652 | DM message failed [switch_group 1]
1564.189160 | asm_data_1: addmap [0 104857600 multipath 0 0 1 1 service-time 0 1 1 8:32 1]
create: asm_ocr_1 (2e87e4f535c397171) undef ROCKET,IMAGEFILE
size=10G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
`- 3:0:0:0 sdb 8:16 undef ready running
create: asm_data_1 (2f218dae15b551c5d) undef ROCKET,IMAGEFILE
size=50G features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
`- 3:0:0:1 sdc 8:32 undef ready running

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

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

/dev/asm_data_1
/dev/asm_ocr_1

UDEV 配置完成!

配置 RAC 节点:192.168.6.131 结束!

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

Generating public/private rsa key pair.
Your identification has been saved in /home/grid/.ssh/id_rsa
Your public key has been saved in /home/grid/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:iwKgxCMVHvucYsYwdpdoMrJd5PXJI6Dajmhru5VBYz4 grid@openEuler01
The key's randomart image is:
+---[RSA 3072]----+
| +.o . |
|.o *.o.o . |
|*B+Boo. = |
|*XX+o. . . |
|+ OE+ S |
|.= o+ . . |
|o..o. . . |
|..o . |
|.+o |
+----[SHA256]-----+

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

Generating public/private rsa key pair.
Your identification has been saved in /home/oracle/.ssh/id_rsa
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:dhw7e3xRGIc9Iy1uaIdEzrUDNf56mgzlWlnBdALCV88 oracle@openEuler01
The key's randomart image is:
+---[RSA 3072]----+
| .ooo*=+o|
| +o=o*@o|
| o++++oE|
| . * +o..|
| S * o..o |
| . . +o +. |
| ..o=.. |
| .=.+ |
| . + |
+----[SHA256]-----+

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

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

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


静默解压 Grid 软件安装包: /soft/LINUX.X64_122010_grid_home.zip

静默解压 OPatch 软件补丁包: /soft/p6880880_*.zip

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

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

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

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

静默解压 Oracle 软件安装包: /soft/LINUX.X64_122010_db_home.zip

静默解压 Oracle 软件补丁包: /soft/p33587128*.zip

静默解压 OJVM 软件补丁包: /soft/p33561275*.zip

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

INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=openEuler-scan
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.clusterName=openEuler-cls
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.clusterNodes=openEuler01:openEuler01-vip:HUB,openEuler02:openEuler02-vip:HUB
oracle.install.crs.config.networkInterfaceList=ens33:192.168.6.0:1,ens37:1.1.1.0:5
oracle.install.crs.config.useIPMI=false
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.disks=/dev/asm_ocr_1
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
oracle.install.asm.monitorPassword=oracle
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.configureGIMR=false
oracle.install.asm.storageOption=ASM
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.configureAFD=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.crs.rootconfig.executeRootScript=false
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v12.2.0

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

Preparing the home to patch...
Applying the patch /soft/33583921...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2024-03-29_03-22-23PM/installerPatchActions_2024-03-29_03-22-23PM.log
Launching Oracle Grid Infrastructure Setup Wizard...

[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.
ACTION: Consider optimizing the ssh configuration.
[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
You can find the log of this install session at:
/tmp/GridSetupActions2024-03-29_03-22-23PM/gridSetupActions2024-03-29_03-22-23PM.log

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

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[openEuler01, openEuler02]
Execute /u01/app/12.2.0/grid/root.sh on the following nodes:
[openEuler01, openEuler02]

Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.

Successfully Setup Software.
As install user, execute the following command to complete the configuration.
/u01/app/12.2.0/grid/gridSetup.sh -executeConfigTools -responseFile /soft/grid.rsp [-silent]


Moved the install session logs to:
/u01/app/oraInventory/logs/GridSetupActions2024-03-29_03-22-23PM

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

节点 192.168.6.130 :

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

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/12.2.0/grid/install/root_openEuler01_2024-03-29_15-45-26-973924876.log for the output of root script

节点 192.168.6.131 :

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

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/12.2.0/grid/install/root_openEuler02_2024-03-29_16-00-08-717676645.log for the output of root script

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


SQL*Plus: Release 12.2.0.1.0 Production


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

33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
26839277;DBWLM RELEASE UPDATE 12.2.0.1.0(ID:170913) (26839277)
33116894;ACFS JUL 2021 RELEASE UPDATE 12.2.0.1.210720 (33116894)
33610989;TOMCAT RELEASE UPDATE 12.2.0.1.0(ID:RELEASE) (33610989)

OPatch succeeded.


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

State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 51200 51102 0 51102 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 10240 9904 0 9904 0 Y OCR/

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

oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=openEuler01,openEuler02
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba

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

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB. Actual 3697 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8161 MB Passed
Preparing 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:
/u01/app/oraInventory/logs/installActions2024-03-29_04-12-09PM.log

Prepare in progress.
.................................................. 7% Done.

Prepare successful.

Copy files in progress.
.................................................. 14% Done.
.................................................. 20% Done.
.................................................. 25% Done.
.................................................. 30% Done.
.................................................. 36% Done.
.................................................. 45% Done.
.................................................. 50% Done.
.................................................. 55% Done.
.................................................. 60% Done.
.................................................. 65% Done.
..........
Copy files successful.

Link binaries in progress.
....................
Link binaries successful.

Setup files in progress.
....................
Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.

Finish Setup successful.
The installation of Oracle Database 12c was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2024-03-29_04-12-09PM.log' for more details.

Copy Files to Remote Nodes in progress.
.................................................. 70% Done.
.................................................. 75% Done.
.................................................. 80% Done.
.................................................. 85% Done.

Copy Files to Remote Nodes successful.

Prepare in progress.

Prepare successful.
..........
Setup in progress.
....................
Setup successful.
The Cluster Node Addition of /u01/app/oracle/product/12.2.0/db was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2024-03-29_04-12-09PM.log' for more details.

Setup Oracle Base in progress.

Setup Oracle Base successful.
.................................................. 97% Done.

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

Execute /u01/app/oracle/product/12.2.0/db/root.sh on the following nodes:
[openEuler01, openEuler02]


.................................................. 100% Done.
Successfully Setup Software.

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

节点 192.168.6.130 :

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

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/oracle/product/12.2.0/db/install/root_openEuler01_2024-03-29_16-24-59-086809462.log for the output of root script

节点 192.168.6.131 :

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

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/oracle/product/12.2.0/db/install/root_openEuler02_2024-03-29_16-25-47-913124768.log for the output of root script

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

节点 192.168.6.130 :

Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-25-10PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-25-13PM_1.log

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

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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0/db')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '33587128' to OH '/u01/app/oracle/product/12.2.0/db'
ApplySession: 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.

Patching component oracle.rdbms.util, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.network.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.rsf, 12.2.0.1.0...

Patching component oracle.ctx, 12.2.0.1.0...

Patching component oracle.has.common.cvu, 12.2.0.1.0...

Patching component oracle.ldap.owm, 12.2.0.1.0...

Patching component oracle.ldap.rsf, 12.2.0.1.0...

Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...

Patching component oracle.oracore.rsf, 12.2.0.1.0...

Patching component oracle.oraolap, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.rdbms.deconfig, 12.2.0.1.0...

Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...

Patching component oracle.sdo, 12.2.0.1.0...

Patching component oracle.sdo.locator, 12.2.0.1.0...

Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...

Patching component oracle.tfa, 12.2.0.1.0...

Patching component oracle.ctx.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...

Patching component oracle.rdbms.install.common, 12.2.0.1.0...

Patching component oracle.assistants.deconfig, 12.2.0.1.0...

Patching component oracle.ons.ic, 12.2.0.1.0...

Patching component oracle.rdbms.rman, 12.2.0.1.0...

Patching component oracle.precomp.rsf, 12.2.0.1.0...

Patching component oracle.install.deinstalltool, 12.2.0.1.0...

Patching component oracle.assistants.acf, 12.2.0.1.0...

Patching component oracle.rdbms.oci, 12.2.0.1.0...

Patching component oracle.sqlplus.ic, 12.2.0.1.0...

Patching component oracle.xdk.parser.java, 12.2.0.1.0...

Patching component oracle.dbtoolslistener, 12.2.0.1.0...

Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...

Patching component oracle.rdbms.dv, 12.2.0.1.0...

Patching component oracle.rdbms.lbac, 12.2.0.1.0...

Patching component oracle.ons, 12.2.0.1.0...

Patching component oracle.ldap.client, 12.2.0.1.0...

Patching component oracle.xdk, 12.2.0.1.0...

Patching component oracle.xdk.rsf, 12.2.0.1.0...

Patching component oracle.sqlplus, 12.2.0.1.0...

Patching component oracle.assistants.server, 12.2.0.1.0...

Patching component oracle.rdbms.crs, 12.2.0.1.0...

Patching component oracle.precomp.common, 12.2.0.1.0...

Patching component oracle.precomp.lang, 12.2.0.1.0...

Patching component oracle.jdk, 1.8.0.91.0...

OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of '/u01/app/oracle/product/12.2.0/db/bin/extjobO': Operation not permitted
make: [ins_rdbms.mk:533: iextjob] Error 1 (ignored)


Patch 33587128 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-25-13PM_1.log

OPatch completed with warnings.

节点 192.168.6.131 :

Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-33-34PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-33-37PM_1.log

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

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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0/db')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '33587128' to OH '/u01/app/oracle/product/12.2.0/db'
ApplySession: 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.

Patching component oracle.rdbms.util, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.network.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.rsf, 12.2.0.1.0...

Patching component oracle.ctx, 12.2.0.1.0...

Patching component oracle.has.common.cvu, 12.2.0.1.0...

Patching component oracle.ldap.owm, 12.2.0.1.0...

Patching component oracle.ldap.rsf, 12.2.0.1.0...

Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...

Patching component oracle.oracore.rsf, 12.2.0.1.0...

Patching component oracle.oraolap, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.rdbms.deconfig, 12.2.0.1.0...

Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...

Patching component oracle.sdo, 12.2.0.1.0...

Patching component oracle.sdo.locator, 12.2.0.1.0...

Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...

Patching component oracle.tfa, 12.2.0.1.0...

Patching component oracle.ctx.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...

Patching component oracle.rdbms.install.common, 12.2.0.1.0...

Patching component oracle.assistants.deconfig, 12.2.0.1.0...

Patching component oracle.ons.ic, 12.2.0.1.0...

Patching component oracle.rdbms.rman, 12.2.0.1.0...

Patching component oracle.precomp.rsf, 12.2.0.1.0...

Patching component oracle.install.deinstalltool, 12.2.0.1.0...

Patching component oracle.assistants.acf, 12.2.0.1.0...

Patching component oracle.rdbms.oci, 12.2.0.1.0...

Patching component oracle.sqlplus.ic, 12.2.0.1.0...

Patching component oracle.xdk.parser.java, 12.2.0.1.0...

Patching component oracle.dbtoolslistener, 12.2.0.1.0...

Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...

Patching component oracle.rdbms.dv, 12.2.0.1.0...

Patching component oracle.rdbms.lbac, 12.2.0.1.0...

Patching component oracle.ons, 12.2.0.1.0...

Patching component oracle.ldap.client, 12.2.0.1.0...

Patching component oracle.xdk, 12.2.0.1.0...

Patching component oracle.xdk.rsf, 12.2.0.1.0...

Patching component oracle.sqlplus, 12.2.0.1.0...

Patching component oracle.assistants.server, 12.2.0.1.0...

Patching component oracle.rdbms.crs, 12.2.0.1.0...

Patching component oracle.precomp.common, 12.2.0.1.0...

Patching component oracle.precomp.lang, 12.2.0.1.0...

Patching component oracle.jdk, 1.8.0.91.0...

OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of '/u01/app/oracle/product/12.2.0/db/bin/extjobO': Operation not permitted
make: [ins_rdbms.mk:533: iextjob] Error 1 (ignored)


Patch 33587128 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-33-37PM_1.log

OPatch completed with warnings.

#==============================================================#
OJVM 补丁安装
#==============================================================#

节点 192.168.6.130 :

Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-40-44PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-40-49PM_1.log

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

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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0/db')


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

Patching component oracle.javavm.server, 12.2.0.1.0...

Patching component oracle.javavm.server.core, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.javavm.client, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.dbjava.jdbc, 12.2.0.1.0...

Patching component oracle.dbjava.ic, 12.2.0.1.0...
Patch 33561275 successfully applied.
Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-40-49PM_1.log

OPatch succeeded.

节点 192.168.6.131 :

Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-42-44PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-42-47PM_1.log

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

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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0/db')


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

Patching component oracle.javavm.server, 12.2.0.1.0...

Patching component oracle.javavm.server.core, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.javavm.client, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.dbjava.jdbc, 12.2.0.1.0...

Patching component oracle.dbjava.ic, 12.2.0.1.0...
Patch 33561275 successfully applied.
Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-29_16-42-47PM_1.log

OPatch succeeded.

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


SQL*Plus: Release 12.2.0.1.0 Production


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

33561275;OJVM RELEASE UPDATE 12.2.0.1.220118 (33561275)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)

OPatch succeeded.


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

dbca -silent -createDatabase \
-ignorePrereqFailure \
-templateName General_Purpose.dbc \
-responseFile NO_VALUE \
-gdbName lucifer \
-sid lucifer \
-sysPassword oracle \
-systemPassword oracle \
-redoLogFileSize 100 \
-diskGroupName +DATA \
-storageType ASM -enableArchive true \
-archiveLogDest +DATA \
-databaseConfigType RAC \
-nodeinfo openEuler01,openEuler02 \
-characterset AL32UTF8 \
-nationalCharacterSet AL16UTF16 \
-emConfiguration NONE \
-automaticMemoryManagement false \
-totalMemory 3716 \
-databaseType OLTP \
-createAsContainerDatabase false

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

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. 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].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. 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].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-09102] Target environment does not meet some optional requirements.
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
ACTION: Find the appropriate configuration from the log file or from the installation guide to meet the prerequisites and fix this manually.
Copying database files
1% complete
2% complete
15% complete
27% complete
Creating and starting Oracle instance
29% complete
32% complete
36% complete
40% complete
41% complete
43% complete
45% complete
Creating cluster database views
47% complete
63% complete
Completing Database Creation
64% complete
65% complete
68% complete
70% complete
72% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/lucifer/lucifer.log" for further details.

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


Recovery Manager: Release 12.2.0.1.0 - Production on Fri Mar 29 17:00:00 2024

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

connected to target database: LUCIFER (DBID=4020788558)

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

RMAN>

Recovery Manager complete.


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


Recovery Manager: Release 12.2.0.1.0 - Production on Fri Mar 29 17:01:37 2024

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

connected to target database: LUCIFER (not mounted)

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

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


Recovery Manager complete.

数据库控制文件:


NAME
----------------------------------------------------------------------------------------------------
+DATA/LUCIFER/CONTROLFILE/current.261.1164905295
+DATA/LUCIFER/CONTROLFILE/control02.ctl

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

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


THREAD# GROUP# MEMBER size(M)
---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
1 1 +DATA/LUCIFER/ONLINELOG/group_1.262.1164905297 100
1 2 +DATA/LUCIFER/ONLINELOG/group_2.263.1164905297 100
1 11 +DATA/LUCIFER/ONLINELOG/group_11.272.1164906167 100
1 12 +DATA/LUCIFER/ONLINELOG/group_12.273.1164906171 100
1 13 +DATA/LUCIFER/ONLINELOG/group_13.274.1164906173 100
1 14 +DATA/LUCIFER/ONLINELOG/group_14.275.1164906175 100
1 15 +DATA/LUCIFER/ONLINELOG/group_15.276.1164906179 100
2 3 +DATA/LUCIFER/ONLINELOG/group_3.266.1164905873 100
2 4 +DATA/LUCIFER/ONLINELOG/group_4.267.1164905875 100
2 21 +DATA/LUCIFER/ONLINELOG/group_21.277.1164906183 100
2 22 +DATA/LUCIFER/ONLINELOG/group_22.278.1164906185 100
2 23 +DATA/LUCIFER/ONLINELOG/group_23.279.1164906187 100
2 24 +DATA/LUCIFER/ONLINELOG/group_24.280.1164906191 100
2 25 +DATA/LUCIFER/ONLINELOG/group_25.281.1164906193 100

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

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

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

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

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

数据库参数:


NAME SID SPVALUE VALUE
-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
_b_tree_bitmap_plans * FALSE FALSE
_datafile_write_errors_crash_instance * FALSE FALSE
audit_file_dest * /u01/app/oracle/admin/lucifer/adump /u01/app/oracle/admin/lucifer/adump
audit_trail * NONE DB
cluster_database * true TRUE
compatible * 12.2.0 12.2.0
control_file_record_keep_time * 31 31
db_block_size * 8192 8192
db_create_file_dest * +DATA +DATA
db_file_multiblock_read_count * 128
db_files * 5000 200
db_name * lucifer lucifer
db_writer_processes * 1
deferred_segment_creation * FALSE FALSE
diagnostic_dest * /u01/app/oracle /u01/app/oracle
dispatchers * (PROTOCOL=TCP) (SERVICE=luciferXDB) (PROTOCOL=TCP) (SERVICE=luciferXDB)
event * 10949 trace name context forever,level 1
event * 28401 trace name context forever,level 1
fast_start_parallel_rollback * LOW
instance_mode * read-only READ-WRITE
log_archive_dest_1 * location=+DATA location=+DATA
log_archive_format * %t_%s_%r.dbf %t_%s_%r.dbf
max_dump_file_size * unlimited
max_string_size * STANDARD
nls_language * AMERICAN AMERICAN
nls_territory * AMERICA AMERICA
open_cursors * 1000 300
optimizer_adaptive_plans * TRUE
optimizer_adaptive_statistics * FALSE
optimizer_index_caching * 0
optimizer_mode * ALL_ROWS
parallel_force_local * TRUE FALSE
parallel_max_servers * 64 64
pga_aggregate_target * 1246756864 780140544
processes * 2000 640
remote_login_passwordfile * exclusive EXCLUSIVE
session_cached_cursors * 300 50
sessions * 984
sga_max_size * 4988076032 3120562176
sga_target * 4988076032 3120562176
spfile * +DATA/LUCIFER/PARAMETERFILE/spfile.269.1164905879
statistics_level * TYPICAL
undo_retention * 10800 900

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