无人值守安装Oracle 11GR2 RAC集群,只需要1.5小时?没错,通过脚本静默安装,只需要1.5小时,包括安装补丁,建库。

脚本下载链接SHELL脚本进行oracle数据库一键安装,实现真正的无人值守安装

GitHubhttps://github.com/pc-study/InstallOracleshell

一、主机准备

节点 主机版本 主机内存 主机磁盘空间 主机网卡 ASM盘
rac01 redhat 7.9 8G 50G eth0,eth1 OCR:/dev/sdb,/dev/sdc,/dev/sdd DATA:/dev/sde,/dev/sdf
rac02 redhat 7.9 8G 50G eth0,eth1

注意:

1.主机内存不得低于2G

2.磁盘空间不得低于50G

节点 主机IP
rac01 10.211.55.100,10.10.1.1(PRIVIP),10.211.55.102(Vip),10.211.55.105(SCANIP)
rac02 10.211.55.101,10.10.1.2(PRIVIP),10.211.55.103(Vip),10.211.55.105(SCANIP)

节点一:

1.5小时,一键部署Oracle 11GR2 RAC 集群

节点二:

ASM盘通过共享存储之–StarWind高级配置方式配置ISCSI共享存储。(两个节点都需要配置ISCSI共享存储

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图2

二、安装前准备

1.挂载ISO镜像源(两个节点都需要挂载)

1
2
3
4
5
6
7
1. ##1.通过cdrom挂载
2. mount /dev/cdrom /mnt

4. ##2.通过安装镜像源挂载
5. mount -o loop /soft/rhel-server-7.9-x86_64-dvd.iso /mnt

AI写代码bash

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图3

2.创建目录并上传安装介质(节点一上传即可)

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
1. ##1.创建安装介质上传目录
2. mkdir /soft
3. [root@localhost ~]# cd /soft/

5. ##2.上传安装介质
6. [root@localhost soft]# du -sh *
7. ##linux7系统缺少补丁包
8. 192K compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
9. ##无人值守shell脚本(包括互信脚本)
10. 140K OracleShellInstall.sh
11. ##oracle 11GR2官方DB 安装包
12. 1.3G p13390677_112040_Linux-x86-64_1of7.zip
13. 1.1G p13390677_112040_Linux-x86-64_2of7.zip
14. ##oracle 11GR2官方GRID 安装包
15. 1.2G p13390677_112040_Linux-x86-64_3of7.zip
16. ##oracle 11GR2 GRID PSU 最终版补丁包+6880880 OPatch补丁包
17. 1.3G p31718723_112040_Linux-x86-64.zip
18. 118M p6880880_112000_Linux-x86-64.zip
19. ##RAC GRID On Linux7 需要打补丁修复OHAS
20. 175M p18370031_112040_Linux-x86-64.zip

22. ##上下文切换软件(可选)
23. 276K rlwrap-0.42.tar.gz

25. ##3.授权脚本执行权限
26. chmod +x OracleShellInstall.sh

AI写代码bash

三、安装

注意:可通过./OracleShellInstall.sh –help查看命令帮助

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图5

安装命令如下:

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
1. ##节点一执行即可
2. cd /soft
3. ./OracleShellInstall.sh -i 10.211.55.100 `#Public ip`\
4. -n rac11g `# hostname`\
5. -o rac11g `# oraclesid`\
6. -rs oracle `# root password`\
7. -op oracle `# oracle password`\
8. -gp oracle `# grid password`\
9. -b /u01/app `# install basedir`\
10. -s AL32UTF8 `# characterset`\
11. -pb1 10.211.55.100 -pb2 10.211.55.101 `# node public ip`\
12. -vi1 10.211.55.102 -vi2 10.211.55.103 `# node virtual ip`\
13. -pi1 10.10.1.1 -pi2 10.10.1.2 `# node private ip`\
14. -si 10.211.55.105 `# scan ip`\
15. -dd /dev/sde,/dev/sdf `# asm data disk`\
16. -od /dev/sdb,/dev/sdc,/dev/sdd `# asm ocr disk`\
17. -or EXTERNAL `# asm ocr redundancy`\
18. -dr EXTERNAL `# asm data redundancy`\
19. -on OCR `# asm ocr diskgroupname`\
20. -dn DATA `# asm data diskgroupname`\
21. -puf eth0 -prf eth1 `# network fcname`\
22. -ts 10.211.55.18 `# timeserver`\
23. -gpa 31718723 `# Grid PSU NUMBER`

AI写代码bash

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图7

敲下回车将开始无人值守安装……

开始时间:04:10

执行过程太多…..略

安装日志记录在两个节点的/soft目录下:oracleAllSilent_*.log,在文末展示安装日志。

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图8

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图9

安装结束后,将自动创建好上述指定实例名为rac11g的数据库rac集群实例(rac11g01,rac11g02),并安装上传补丁31718723。

等待安装结束…….

结束时间:05:40

安装结束。

总耗时:1小时30分钟。

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图10

1.5小时,一键部署Oracle 11GR2 RAC 集群 - 图11

安装日志如下:

节点一:

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
1. [root@rac11g01 soft]# cat oracleAllSilent_20210506030459.log
2. ####################################################################################

4. # Installation Logging

6. ####################################################################################

8. ####################################################################################

10. # OS Version

12. ####################################################################################

14. OS Version :

16. linux7

18. ####################################################################################

20. # DB Version

22. ####################################################################################

24. DB Version :

26. 11.2.0.4

28. ####################################################################################

30. # HOSTNAME

32. ####################################################################################

34. HOSTNAME :

36. rac11g01

38. ####################################################################################

40. # RPM Check

42. ####################################################################################

44. RPM Check :

46. bc-1.06.95-13.el7.x86_64
47. binutils-2.27-44.base.el7.x86_64
48. compat-libcap1-1.10-7.el7.x86_64
49. compat-libstdc++-33-3.2.3-72.el7.x86_64
50. gcc-4.8.5-44.el7.x86_64
51. gcc-c++-4.8.5-44.el7.x86_64
52. elfutils-libelf-0.176-5.el7.x86_64
53. elfutils-libelf-devel-0.176-5.el7.x86_64
54. glibc-2.17-317.el7.x86_64
55. glibc-devel-2.17-317.el7.x86_64
56. ksh-20120801-142.el7.x86_64
57. libaio-0.3.109-13.el7.x86_64
58. libaio-devel-0.3.109-13.el7.x86_64
59. libgcc-4.8.5-44.el7.x86_64
60. libstdc++-4.8.5-44.el7.x86_64
61. libstdc++-devel-4.8.5-44.el7.x86_64
62. libxcb-1.13-1.el7.x86_64
63. libX11-1.6.7-2.el7.x86_64
64. libXau-1.0.8-2.1.el7.x86_64
65. libXi-1.7.9-1.el7.x86_64
66. libXtst-1.2.3-1.el7.x86_64
67. libXrender-0.9.10-1.el7.x86_64
68. libXrender-devel-0.9.10-1.el7.x86_64
69. make-3.82-24.el7.x86_64
70. net-tools-2.0-0.25.20131004git.el7.x86_64
71. nfs-utils-1.3.0-0.68.el7.x86_64
72. smartmontools-7.0-2.el7.x86_64
73. sysstat-10.1.5-19.el7.x86_64
74. e2fsprogs-1.42.9-19.el7.x86_64
75. e2fsprogs-libs-1.42.9-19.el7.x86_64
76. fontconfig-devel-2.13.0-4.3.el7.x86_64
77. expect-5.45-14.el7_1.x86_64
78. unzip-6.0-21.el7.x86_64
79. openssh-clients-7.4p1-21.el7.x86_64
80. readline-6.2-11.el7.x86_64

82. ####################################################################################

84. # /etc/hosts

86. ####################################################################################

88. /etc/hosts :

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

93. ##Public IP
94. 10.211.55.100 rac11g01
95. 10.211.55.101 rac11g02

97. ##Private IP
98. 10.10.1.1 rac11g01-priv
99. 10.10.1.2 rac11g02-priv

101. ##Virtual IP
102. 10.211.55.102 rac11g01-vip
103. 10.211.55.103 rac11g02-vip

105. ##Scan IP
106. 10.211.55.105 rac11g-scan

108. ####################################################################################

110. # Create user and groups(grid)

112. ####################################################################################

114. Create user and groups(grid) :

116. uid=11012(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54330(racdba),54327(asmdba),54328(asmoper),54329(asmadmin)

118. ####################################################################################

120. # Create user and groups(oracle)

122. ####################################################################################

124. Create user and groups(oracle) :

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

128. ####################################################################################

130. # multipath info:

132. ####################################################################################

134. multipath info: :

136. data_2 (2c7a3296d077abc19) dm-7 ROCKET ,IMAGEFILE
137. size=10G features='0' hwhandler='0' wp=rw
138. `-+- policy='service-time 0' prio=1 status=active
139. `- 8:0:0:4 sdf 8:80 active ready running
140. ocr_3 (26db11f226db16dbc) dm-5 ROCKET ,IMAGEFILE
141. size=15G features='0' hwhandler='0' wp=rw
142. `-+- policy='service-time 0' prio=1 status=active
143. `- 8:0:0:2 sdd 8:48 active ready running
144. data_1 (20726af970fe9d02e) dm-6 ROCKET ,IMAGEFILE
145. size=10G features='0' hwhandler='0' wp=rw
146. `-+- policy='service-time 0' prio=1 status=active
147. `- 8:0:0:3 sde 8:64 active ready running
148. ocr_2 (2a3131d89cdb898cd) dm-4 ROCKET ,IMAGEFILE
149. size=15G features='0' hwhandler='0' wp=rw
150. `-+- policy='service-time 0' prio=1 status=active
151. `- 8:0:0:1 sdc 8:32 active ready running
152. ocr_1 (27dddccfeca91227d) dm-3 ROCKET ,IMAGEFILE
153. size=15G features='0' hwhandler='0' wp=rw
154. `-+- policy='service-time 0' prio=1 status=active
155. `- 8:0:0:0 sdb 8:16 active ready running

157. ####################################################################################

159. # udev asm info:

161. ####################################################################################

163. udev asm info: :

165. /dev/asm_data_1
166. /dev/asm_data_2
167. /dev/asm_ocr_1
168. /dev/asm_ocr_2
169. /dev/asm_ocr_3

171. ####################################################################################

173. # chronyd

175. ####################################################################################

177. chronyd :

179. ● chronyd.service - NTP client/server
180. Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
181. Active: inactive (dead)
182. Docs: man:chronyd(8)
183. man:chrony.conf(5)

185. May 06 14:23:54 localhost.localdomain systemd[1]: Starting NTP client/server...
186. May 06 14:23:54 localhost.localdomain chronyd[731]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
187. May 06 14:23:54 localhost.localdomain systemd[1]: Started NTP client/server.
188. May 06 15:06:54 rac11g01 systemd[1]: Stopping NTP client/server...
189. May 06 15:06:54 rac11g01 chronyd[731]: chronyd exiting
190. May 06 15:06:54 rac11g01 systemd[1]: Stopped NTP client/server.

192. ####################################################################################

194. # Time ntpdate

196. ####################################################################################

198. Time ntpdate :

200. ##For ntpupdate
201. #OracleBegin
202. 00 12 * * * /usr/sbin/ntpdate -u 10.211.55.18 && /usr/sbin/hwclock -w
203. #OracleEnd

205. ####################################################################################

207. # Time dependent

209. ####################################################################################

211. Time dependent :

213. Sun May 9 04:11:14 CST 2021

215. ####################################################################################

217. # avahi-daemon

219. ####################################################################################

221. avahi-daemon :

224. ####################################################################################

226. # Firewalld

228. ####################################################################################

230. Firewalld :

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

237. May 06 14:23:54 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
238. May 06 14:23:55 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
239. May 06 14:23:55 localhost.localdomain firewalld[750]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
240. May 09 04:11:14 rac11g01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
241. May 09 04:11:15 rac11g01 systemd[1]: Stopped firewalld - dynamic firewall daemon.

243. ####################################################################################

245. # SELINUX

247. ####################################################################################

249. SELINUX :

251. Permissive

253. ####################################################################################

255. # /etc/default/grub

257. ####################################################################################

259. /etc/default/grub :

261. GRUB_TIMEOUT=5
262. GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
263. GRUB_DEFAULT=saved
264. GRUB_DISABLE_SUBMENU=true
265. GRUB_TERMINAL_OUTPUT="console"
266. GRUB_CMDLINE_LINUX="spectre_v2=retpoline rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet transparent_hugepage=never numa=off"
267. GRUB_DISABLE_RECOVERY="true"

269. ####################################################################################

271. # Transparent_hugepages

273. ####################################################################################

275. Transparent_hugepages :

277. [always] madvise never

279. ####################################################################################

281. # NUMA

283. ####################################################################################

285. NUMA :

287. BOOT_IMAGE=/vmlinuz-3.10.0-1160.el7.x86_64 root=/dev/mapper/rhel-root ro spectre_v2=retpoline rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8

289. ####################################################################################

291. # NetworkManager

293. ####################################################################################

295. NetworkManager :

297. ● NetworkManager.service - Network Manager
298. Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled)
299. Active: inactive (dead) since Sun 2021-05-09 04:11:17 CST; 137ms ago
300. Docs: man:NetworkManager(8)
301. Main PID: 771 (code=exited, status=0/SUCCESS)

303. May 06 14:43:52 localhost.localdomain NetworkManager[771]: <info> [1620283432.5700] device (eth1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
304. May 06 14:43:52 localhost.localdomain NetworkManager[771]: <info> [1620283432.5703] device (eth1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
305. May 06 14:43:52 localhost.localdomain NetworkManager[771]: <info> [1620283432.5722] device (eth1): Activation: successful, device activated.
306. May 06 15:05:34 rac11g01 NetworkManager[771]: <info> [1620284734.4530] hostname: hostname changed from "localhost.localdomain" to "rac11g01"
307. May 06 15:05:34 rac11g01 NetworkManager[771]: <info> [1620284734.4538] policy: set-hostname: set hostname to 'rac11g01' (from system configuration)
308. May 09 04:11:17 rac11g01 NetworkManager[771]: <info> [1620504677.4001] caught SIGTERM, shutting down normally.
309. May 09 04:11:17 rac11g01 systemd[1]: Stopping Network Manager...
310. May 09 04:11:17 rac11g01 NetworkManager[771]: <info> [1620504677.4082] manager: NetworkManager state is now CONNECTED_SITE
311. May 09 04:11:17 rac11g01 NetworkManager[771]: <info> [1620504677.4096] exiting (success)
312. May 09 04:11:17 rac11g01 systemd[1]: Stopped Network Manager.

314. ####################################################################################

316. # rlwrap

318. ####################################################################################

320. rlwrap :

322. rlwrap 0.42

324. ####################################################################################

326. # /etc/sysctl.conf

328. ####################################################################################

330. /etc/sysctl.conf :

332. fs.aio-max-nr = 1048576
333. fs.file-max = 6815744
334. kernel.shmall = 2097152
335. kernel.shmmax = 8365367295
336. kernel.shmmni = 4096
337. kernel.sem = 250 32000 100 128
338. net.ipv4.ip_local_port_range = 9000 65500
339. net.core.rmem_default = 262144
340. net.core.rmem_max = 4194304
341. net.core.wmem_default = 262144
342. net.core.wmem_max = 1048576

344. ####################################################################################

346. # NOZEROCONF

348. ####################################################################################

350. NOZEROCONF :

352. # Created by anaconda
353. #OracleBegin
354. NOZEROCONF=yes
355. #OracleEnd

357. ####################################################################################

359. # /etc/security/limits.d/20-nproc.conf

361. ####################################################################################

363. /etc/security/limits.d/20-nproc.conf :

365. # Default limit for number of user's processes to prevent
366. # accidental fork bombs.
367. # See rhbz #432903 for reasoning.

369. * - nproc 16384
370. root soft nproc unlimited

372. ####################################################################################

374. # /etc/security/limits.conf

376. ####################################################################################

378. /etc/security/limits.conf :

380. # /etc/security/limits.conf
381. #
382. #This file sets the resource limits for the users logged in via PAM.
383. #It does not affect resource limits of the system services.
384. #
385. #Also note that configuration files in /etc/security/limits.d directory,
386. #which are read in alphabetical order, override the settings in this
387. #file in case the domain is the same or more specific.
388. #That means for example that setting a limit for wildcard domain here
389. #can be overriden with a wildcard setting in a config file in the
390. #subdirectory, but a user specific setting here can be overriden only
391. #with a user specific setting in the subdirectory.
392. #
393. #Each line describes a limit for a user in the form:
394. #
395. #<domain> <type> <item> <value>
396. #
397. #Where:
398. #<domain> can be:
399. # - a user name
400. # - a group name, with @group syntax
401. # - the wildcard *, for default entry
402. # - the wildcard %, can be also used with %group syntax,
403. # for maxlogin limit
404. #
405. #<type> can have the two values:
406. # - "soft" for enforcing the soft limits
407. # - "hard" for enforcing hard limits
408. #
409. #<item> can be one of the following:
410. # - core - limits the core file size (KB)
411. # - data - max data size (KB)
412. # - fsize - maximum filesize (KB)
413. # - memlock - max locked-in-memory address space (KB)
414. # - nofile - max number of open file descriptors
415. # - rss - max resident set size (KB)
416. # - stack - max stack size (KB)
417. # - cpu - max CPU time (MIN)
418. # - nproc - max number of processes
419. # - as - address space limit (KB)
420. # - maxlogins - max number of logins for this user
421. # - maxsyslogins - max number of logins on the system
422. # - priority - the priority to run user process with
423. # - locks - max number of file locks the user can hold
424. # - sigpending - max number of pending signals
425. # - msgqueue - max memory used by POSIX message queues (bytes)
426. # - nice - max nice priority allowed to raise to values: [-20, 19]
427. # - rtprio - max realtime priority
428. #
429. #<domain> <type> <item> <value>
430. #

432. #* soft core 0
433. #* hard rss 10000
434. #@student hard nproc 20
435. #@faculty soft nproc 20
436. #@faculty hard nproc 50
437. #ftp hard nproc 0
438. #@student - maxlogins 4

440. # End of file
441. #OracleBegin
442. oracle soft nofile 1024
443. oracle hard nofile 65536
444. oracle soft stack 10240
445. oracle hard stack 32768
446. oracle soft nproc 2047
447. oracle hard nproc 16384
448. oracle hard memlock 134217728
449. oracle soft memlock 134217728

451. grid soft nofile 1024
452. grid hard nofile 65536
453. grid soft stack 10240
454. grid hard stack 32768
455. grid soft nproc 2047
456. grid hard nproc 16384
457. #OracleEnd

459. ####################################################################################

461. # /etc/pam.d/login

463. ####################################################################################

465. /etc/pam.d/login :

467. #%PAM-1.0
468. auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
469. auth substack system-auth
470. auth include postlogin
471. account required pam_nologin.so
472. account include system-auth
473. password include system-auth
474. # pam_selinux.so close should be the first session rule
475. session required pam_selinux.so close
476. session required pam_loginuid.so
477. session optional pam_console.so
478. # pam_selinux.so open should only be followed by sessions to be executed in the user context
479. session required pam_selinux.so open
480. session required pam_namespace.so
481. session optional pam_keyinit.so force revoke
482. session include system-auth
483. session include postlogin
484. -session optional pam_ck_connector.so
485. #OracleBegin
486. session required pam_limits.so
487. session required /lib64/security/pam_limits.so
488. #OracleEnd

490. ####################################################################################

492. # /dev/shm

494. ####################################################################################

496. /dev/shm :

499. #
500. # /etc/fstab
501. # Created by anaconda on Thu May 6 02:11:47 2021
502. #
503. # Accessible filesystems, by reference, are maintained under '/dev/disk'
504. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
505. #
506. /dev/mapper/rhel-root / xfs defaults 0 0
507. UUID=32cd2453-e3e4-4e58-a3c5-d7eb092d7469 /boot xfs defaults 0 0
508. /dev/mapper/rhel-home /home xfs defaults 0 0
509. /dev/mapper/rhel-swap swap swap defaults 0 0
510. /swapfile swap swap defaults 0 0
511. tmpfs /dev/shm tmpfs size=8169304k 0 0

513. ####################################################################################

515. # df -hP

517. ####################################################################################

519. df -hP :

521. Filesystem Size Used Avail Use% Mounted on
522. devtmpfs 3.9G 4.0K 3.9G 1% /dev
523. tmpfs 7.8G 0 7.8G 0% /dev/shm
524. tmpfs 3.9G 9.2M 3.9G 1% /run
525. tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
526. /dev/mapper/rhel-root 39G 8.5G 30G 23% /
527. /dev/sda1 1014M 137M 878M 14% /boot
528. /dev/mapper/rhel-home 19G 33M 19G 1% /home
529. tmpfs 798M 0 798M 0% /run/user/0
530. /dev/sr0 4.3G 4.3G 0 100% /mnt

532. ####################################################################################

534. # Oracle Profile

536. ####################################################################################

538. Oracle Profile :

540. # .bash_profile

542. # Get the aliases and functions
543. if [ -f ~/.bashrc ]; then
544. . ~/.bashrc
545. fi

547. # User specific environment and startup programs

549. PATH=$PATH:$HOME/.local/bin:$HOME/bin

551. export PATH
552. ################OracleBegin#########################
553. umask 022
554. export TMP=/tmp
555. export TMPDIR=$TMP
556. export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 #AL32UTF8,ZHS16GBK
557. export ORACLE_BASE=/u01/app/oracle
558. export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
559. export ORACLE_HOSTNAME=rac11g01
560. export ORACLE_TERM=xterm
561. export TNS_ADMIN=$ORACLE_HOME/network/admin
562. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
563. export ORACLE_SID=rac11g1
564. export PATH=/usr/sbin:$PATH
565. export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
566. alias sas='sqlplus / as sysdba'
567. alias alert='tail -500f $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert_$ORACLE_SID.log|more'
568. export PS1="[`whoami`@`hostname`:"'$PWD]$ '
569. alias sqlplus='rlwrap sqlplus'
570. alias rman='rlwrap rman'
571. alias lsnrctl='rlwrap lsnrctl'
572. alias asmcmd='rlwrap asmcmd'
573. alias adrci='rlwrap adrci'
574. alias ggsci='rlwrap ggsci'
575. alias dgmgrl='rlwrap dgmgrl'
576. ################OracleEnd###########################

578. ####################################################################################

580. # Grid Profile

582. ####################################################################################

584. Grid Profile :

586. # .bash_profile

588. # Get the aliases and functions
589. if [ -f ~/.bashrc ]; then
590. . ~/.bashrc
591. fi

593. # User specific environment and startup programs

595. PATH=$PATH:$HOME/.local/bin:$HOME/bin

597. export PATH
598. ################OracleBegin#########################
599. umask 022
600. export TMP=/tmp
601. export TMPDIR=$TMP
602. export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 #AL32UTF8,ZHS16GBK
603. export ORACLE_BASE=/u01/app/grid
604. export ORACLE_HOME=/u01/app/11.2.0/grid
605. export ORACLE_TERM=xterm
606. export TNS_ADMIN=$ORACLE_HOME/network/admin
607. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
608. export ORACLE_SID=+ASM1
609. export PATH=/usr/sbin:$PATH
610. export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
611. alias sas='sqlplus / as sysasm'
612. export PS1="[`whoami`@`hostname`:"'$PWD]$ '
613. alias sqlplus='rlwrap sqlplus'
614. alias rman='rlwrap rman'
615. alias lsnrctl='rlwrap lsnrctl'
616. alias asmcmd='rlwrap asmcmd'
617. alias adrci='rlwrap adrci'
618. ################OracleEnd###########################

620. ####################################################################################

622. # /soft/grid.rsp

624. ####################################################################################

626. /soft/grid.rsp :

628. oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
629. ORACLE_HOSTNAME=rac11g01
630. INVENTORY_LOCATION=/u01/app/oraInventory
631. SELECTED_LANGUAGES=en
632. oracle.install.option=CRS_CONFIG
633. ORACLE_BASE=/u01/app/grid
634. ORACLE_HOME=/u01/app/11.2.0/grid
635. oracle.install.asm.OSDBA=asmdba
636. oracle.install.asm.OSOPER=asmoper
637. oracle.install.asm.OSASM=asmadmin
638. oracle.install.crs.config.gpnp.scanName=rac11g-scan
639. oracle.install.crs.config.gpnp.scanPort=1521
640. oracle.install.crs.config.clusterName=rac11g-cluster
641. oracle.install.crs.config.gpnp.configureGNS=false
642. oracle.install.crs.config.gpnp.gnsSubDomain=
643. oracle.install.crs.config.gpnp.gnsVIPAddress=
644. oracle.install.crs.config.autoConfigureClusterNodeVIP=false
645. oracle.install.crs.config.clusterNodes=rac11g01:rac11g01-vip,rac11g02:rac11g02-vip
646. oracle.install.crs.config.networkInterfaceList=eth0:10.211.55.0:1,eth1:10.10.1.0:2
647. oracle.install.crs.config.storageOption=ASM_STORAGE
648. oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=
649. oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
650. oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=NORMAL
651. oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
652. oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=NORMAL
653. oracle.install.crs.config.useIPMI=false
654. oracle.install.crs.config.ipmi.bmcUsername=
655. oracle.install.crs.config.ipmi.bmcPassword=
656. oracle.install.asm.SYSASMPassword=oracle
657. oracle.install.asm.diskGroup.name=OCR
658. oracle.install.asm.diskGroup.redundancy=EXTERNAL
659. oracle.install.asm.diskGroup.AUSize=1
660. oracle.install.asm.diskGroup.disks=/dev/asm_ocr_1,/dev/asm_ocr_2,/dev/asm_ocr_3
661. oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
662. oracle.install.asm.monitorPassword=oracle
663. oracle.install.crs.upgrade.clusterNodes=
664. oracle.install.asm.upgradeASM=false
665. oracle.installer.autoupdates.option=SKIP_UPDATES
666. oracle.installer.autoupdates.downloadUpdatesLoc=
667. AUTOUPDATES_MYORACLESUPPORT_USERNAME=
668. AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
669. PROXY_HOST=
670. PROXY_PORT=0
671. PROXY_USER=
672. PROXY_PWD=
673. PROXY_REALM=

675. ####################################################################################

677. # Grid OPatch Version

679. ####################################################################################

681. Grid OPatch Version :

683. OPatch Version: 11.2.0.3.4

685. OPatch succeeded.

687. ####################################################################################

689. # Grid RDBMS

691. ####################################################################################

693. Grid RDBMS :

696. SQL*Plus: Release 11.2.0.4.0 Production

699. ####################################################################################

701. # Grid Status

703. ####################################################################################

705. Grid Status :

707. --------------------------------------------------------------------------------
708. NAME TARGET STATE SERVER STATE_DETAILS
709. --------------------------------------------------------------------------------
710. Local Resources
711. --------------------------------------------------------------------------------
712. ora.LISTENER.lsnr
713. ONLINE ONLINE rac11g01
714. ONLINE ONLINE rac11g02
715. ora.OCR.dg
716. ONLINE ONLINE rac11g01
717. ONLINE ONLINE rac11g02
718. ora.asm
719. ONLINE ONLINE rac11g01 Started
720. ONLINE ONLINE rac11g02 Started
721. ora.gsd
722. OFFLINE OFFLINE rac11g01
723. OFFLINE OFFLINE rac11g02
724. ora.net1.network
725. ONLINE ONLINE rac11g01
726. ONLINE ONLINE rac11g02
727. ora.ons
728. ONLINE ONLINE rac11g01
729. ONLINE ONLINE rac11g02
730. --------------------------------------------------------------------------------
731. Cluster Resources
732. --------------------------------------------------------------------------------
733. ora.LISTENER_SCAN1.lsnr
734. 1 ONLINE ONLINE rac11g01
735. ora.cvu
736. 1 ONLINE ONLINE rac11g01
737. ora.oc4j
738. 1 ONLINE ONLINE rac11g01
739. ora.rac11g01.vip
740. 1 ONLINE ONLINE rac11g01
741. ora.rac11g02.vip
742. 1 ONLINE ONLINE rac11g02
743. ora.scan1.vip
744. 1 ONLINE ONLINE rac11g01

746. ####################################################################################

748. # OPatch lspatches

750. ####################################################################################

752. OPatch lspatches :

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

758. OPatch succeeded.

760. ####################################################################################

762. # ASM CHECK

764. ####################################################################################

766. ASM CHECK :

769. SQL*Plus: Release 11.2.0.4.0 Production on Sun May 9 05:05:08 2021

771. Copyright (c) 1982, 2013, Oracle. All rights reserved.

774. Connected to:
775. Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
776. With the Real Application Clusters and Automatic Storage Management options

779. NAME TOTAL/G FREE/G PER_FREE STATE
780. -------------------- ---------- ---------- -------------------- --------------------
781. OCR 45 44.609375 99% MOUNTED
782. DATA 20 19.9052734 100% MOUNTED

785. MODE_STATUS NAME STATE PATH
786. --------------------- -------------------- -------------------- ------------------------------------------------------------
787. ONLINE OCR_0001 NORMAL /dev/asm_ocr_2
788. ONLINE OCR_0000 NORMAL /dev/asm_ocr_1
789. ONLINE DATA_0000 NORMAL /dev/asm_data_1
790. ONLINE OCR_0002 NORMAL /dev/asm_ocr_3
791. ONLINE DATA_0001 NORMAL /dev/asm_data_2

793. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
794. With the Real Application Clusters and Automatic Storage Management options

796. ####################################################################################

798. # /soft/db.rsp

800. ####################################################################################

802. /soft/db.rsp :

804. oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
805. oracle.install.option=INSTALL_DB_SWONLY
806. ORACLE_HOSTNAME=rac11g01
807. UNIX_GROUP_NAME=oinstall
808. INVENTORY_LOCATION=/u01/app/oraInventory
809. SELECTED_LANGUAGES=en,zh_CN
810. ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
811. ORACLE_BASE=/u01/app/oracle
812. oracle.install.db.InstallEdition=EE
813. oracle.install.db.DBA_GROUP=dba
814. oracle.install.db.OPER_GROUP=oper
815. oracle.install.db.CLUSTER_NODES=rac11g01,rac11g02
816. DECLINE_SECURITY_UPDATES=true
817. oracle.installer.autoupdates.option=SKIP_UPDATES

819. ####################################################################################

821. # Oracle RDBMS

823. ####################################################################################

825. Oracle RDBMS :

828. SQL*Plus: Release 11.2.0.4.0 Production

831. ####################################################################################

833. # Oracle OPatch Version

835. ####################################################################################

837. Oracle OPatch Version :

839. OPatch Version: 11.2.0.3.28

841. OPatch succeeded.

843. ####################################################################################

845. # OPatch lspatches

847. ####################################################################################

849. OPatch lspatches :

851. 31537677;Database Patch Set Update : 11.2.0.4.201020 (31537677)
852. 29938455;OCW Patch Set Update : 11.2.0.4.191015 (29938455)

854. OPatch succeeded.

856. ####################################################################################

858. # ORACLE Instance

860. ####################################################################################

862. ORACLE Instance :

865. LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 09-MAY-2021 05:38:06

867. Copyright (c) 1991, 2013, Oracle. All rights reserved.

869. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
870. STATUS of the LISTENER
871. ------------------------
872. Alias LISTENER
873. Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
874. Start Date 09-MAY-2021 04:52:49
875. Uptime 0 days 0 hr. 45 min. 17 sec
876. Trace Level off
877. Security ON: Local OS Authentication
878. SNMP OFF
879. Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
880. Listener Log File /u01/app/grid/diag/tnslsnr/rac11g01/listener/alert/log.xml
881. Listening Endpoints Summary...
882. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
883. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.211.55.100)(PORT=1521)))
884. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.211.55.102)(PORT=1521)))
885. Services Summary...
886. Service "+ASM" has 1 instance(s).
887. Instance "+ASM1", status READY, has 1 handler(s) for this service...
888. Service "rac11g" has 1 instance(s).
889. Instance "rac11g1", status READY, has 1 handler(s) for this service...
890. Service "rac11gXDB" has 1 instance(s).
891. Instance "rac11g1", status READY, has 1 handler(s) for this service...
892. The command completed successfully

894. ####################################################################################

896. # Oracle Implied parameters

898. ####################################################################################

900. Oracle Implied parameters :

903. SQL*Plus: Release 11.2.0.4.0 Production on Sun May 9 05:38:07 2021

905. Copyright (c) 1982, 2013, Oracle. All rights reserved.

908. Connected to:
909. Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
910. With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
911. Data Mining and Real Application Testing options

914. NAME TYPE VALUE
915. ------------------------------------ ----------- ------------------------------
916. audit_trail string NONE

918. NAME TYPE VALUE
919. ------------------------------------ ----------- ------------------------------
920. deferred_segment_creation boolean FALSE

922. NAME TYPE VALUE
923. ------------------------------------ ----------- ------------------------------
924. result_cache_max_size big integer 0

926. NAME VALUE DESCRIB
927. ---------------------------------------- ---------- ------------------------------------------------------------
928. _use_adaptive_log_file_sync TRUE Adaptively switch between post/wait and polling
929. _optimizer_cartesian_enabled FALSE optimizer cartesian join enabled

931. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
932. With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
933. Data Mining and Real Application Testing options

AI写代码bash

节点二:

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
1. [root@rac11g02 soft]# cat oracleAllSilent_20210506025134.log
2. ####################################################################################

4. # Installation Logging

6. ####################################################################################

8. ####################################################################################

10. # OS Version

12. ####################################################################################

14. OS Version :

16. linux7

18. ####################################################################################

20. # DB Version

22. ####################################################################################

24. DB Version :

26. 11.2.0.4

28. ####################################################################################

30. # HOSTNAME

32. ####################################################################################

34. HOSTNAME :

36. rac11g02

38. ####################################################################################

40. # RPM Check

42. ####################################################################################

44. RPM Check :

46. bc-1.06.95-13.el7.x86_64
47. binutils-2.27-44.base.el7.x86_64
48. compat-libcap1-1.10-7.el7.x86_64
49. package compat-libstdc++-33 is not installed
50. gcc-4.8.5-44.el7.x86_64
51. gcc-c++-4.8.5-44.el7.x86_64
52. elfutils-libelf-0.176-5.el7.x86_64
53. elfutils-libelf-devel-0.176-5.el7.x86_64
54. glibc-2.17-317.el7.x86_64
55. glibc-devel-2.17-317.el7.x86_64
56. ksh-20120801-142.el7.x86_64
57. libaio-0.3.109-13.el7.x86_64
58. libaio-devel-0.3.109-13.el7.x86_64
59. libgcc-4.8.5-44.el7.x86_64
60. libstdc++-4.8.5-44.el7.x86_64
61. libstdc++-devel-4.8.5-44.el7.x86_64
62. libxcb-1.13-1.el7.x86_64
63. libX11-1.6.7-2.el7.x86_64
64. libXau-1.0.8-2.1.el7.x86_64
65. libXi-1.7.9-1.el7.x86_64
66. libXtst-1.2.3-1.el7.x86_64
67. libXrender-0.9.10-1.el7.x86_64
68. libXrender-devel-0.9.10-1.el7.x86_64
69. make-3.82-24.el7.x86_64
70. net-tools-2.0-0.25.20131004git.el7.x86_64
71. nfs-utils-1.3.0-0.68.el7.x86_64
72. smartmontools-7.0-2.el7.x86_64
73. sysstat-10.1.5-19.el7.x86_64
74. e2fsprogs-1.42.9-19.el7.x86_64
75. e2fsprogs-libs-1.42.9-19.el7.x86_64
76. fontconfig-devel-2.13.0-4.3.el7.x86_64
77. expect-5.45-14.el7_1.x86_64
78. unzip-6.0-21.el7.x86_64
79. openssh-clients-7.4p1-21.el7.x86_64
80. readline-6.2-11.el7.x86_64

82. ####################################################################################

84. # /etc/hosts

86. ####################################################################################

88. /etc/hosts :

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

93. ##Public IP
94. 10.211.55.100 rac11g01
95. 10.211.55.101 rac11g02

97. ##Private IP
98. 10.10.1.1 rac11g01-priv
99. 10.10.1.1 rac11g02-priv

101. ##Virtual IP
102. 10.211.55.102 rac11g01-vip
103. 10.211.55.103 rac11g02-vip

105. ##Scan IP
106. 10.211.55.105 rac11g-scan

108. ####################################################################################

110. # Create user and groups(grid)

112. ####################################################################################

114. Create user and groups(grid) :

116. uid=11012(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54330(racdba),54327(asmdba),54328(asmoper),54329(asmadmin)

118. ####################################################################################

120. # Create user and groups(oracle)

122. ####################################################################################

124. Create user and groups(oracle) :

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

128. ####################################################################################

130. # multipath info:

132. ####################################################################################

134. multipath info: :

136. data_2 (2c7a3296d077abc19) dm-7 ROCKET ,IMAGEFILE
137. size=10G features='0' hwhandler='0' wp=rw
138. `-+- policy='service-time 0' prio=1 status=active
139. `- 8:0:0:4 sdf 8:80 active ready running
140. ocr_3 (26db11f226db16dbc) dm-5 ROCKET ,IMAGEFILE
141. size=15G features='0' hwhandler='0' wp=rw
142. `-+- policy='service-time 0' prio=1 status=active
143. `- 8:0:0:2 sdd 8:48 active ready running
144. data_1 (20726af970fe9d02e) dm-6 ROCKET ,IMAGEFILE
145. size=10G features='0' hwhandler='0' wp=rw
146. `-+- policy='service-time 0' prio=1 status=active
147. `- 8:0:0:3 sde 8:64 active ready running
148. ocr_2 (2a3131d89cdb898cd) dm-4 ROCKET ,IMAGEFILE
149. size=15G features='0' hwhandler='0' wp=rw
150. `-+- policy='service-time 0' prio=1 status=active
151. `- 8:0:0:1 sdc 8:32 active ready running
152. ocr_1 (27dddccfeca91227d) dm-3 ROCKET ,IMAGEFILE
153. size=15G features='0' hwhandler='0' wp=rw
154. `-+- policy='service-time 0' prio=1 status=active
155. `- 8:0:0:0 sdb 8:16 active ready running

157. ####################################################################################

159. # udev asm info:

161. ####################################################################################

163. udev asm info: :

165. /dev/asm_data_1
166. /dev/asm_data_2
167. /dev/asm_ocr_1
168. /dev/asm_ocr_2
169. /dev/asm_ocr_3

171. ####################################################################################

173. # chronyd

175. ####################################################################################

177. chronyd :

179. ● chronyd.service - NTP client/server
180. Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
181. Active: inactive (dead)
182. Docs: man:chronyd(8)
183. man:chrony.conf(5)

185. May 06 14:23:55 localhost.localdomain systemd[1]: Starting NTP client/server...
186. May 06 14:23:55 localhost.localdomain chronyd[725]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
187. May 06 14:23:55 localhost.localdomain systemd[1]: Started NTP client/server.
188. May 06 14:52:16 rac11g02 systemd[1]: Stopping NTP client/server...
189. May 06 14:52:16 rac11g02 chronyd[725]: chronyd exiting
190. May 06 14:52:16 rac11g02 systemd[1]: Stopped NTP client/server.

192. ####################################################################################

194. # Time dependent

196. ####################################################################################

198. Time dependent :

200. Thu May 6 14:52:16 CST 2021

202. ####################################################################################

204. # avahi-daemon

206. ####################################################################################

208. avahi-daemon :

211. ####################################################################################

213. # Firewalld

215. ####################################################################################

217. Firewalld :

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

224. May 06 14:23:55 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
225. May 06 14:23:56 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
226. May 06 14:23:56 localhost.localdomain firewalld[753]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
227. May 06 14:52:16 rac11g02 systemd[1]: Stopping firewalld - dynamic firewall daemon...
228. May 06 14:52:17 rac11g02 systemd[1]: Stopped firewalld - dynamic firewall daemon.

230. ####################################################################################

232. # SELINUX

234. ####################################################################################

236. SELINUX :

238. Permissive

240. ####################################################################################

242. # /etc/default/grub

244. ####################################################################################

246. /etc/default/grub :

248. GRUB_TIMEOUT=5
249. GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
250. GRUB_DEFAULT=saved
251. GRUB_DISABLE_SUBMENU=true
252. GRUB_TERMINAL_OUTPUT="console"
253. GRUB_CMDLINE_LINUX="spectre_v2=retpoline rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet transparent_hugepage=never numa=off"
254. GRUB_DISABLE_RECOVERY="true"

256. ####################################################################################

258. # Transparent_hugepages

260. ####################################################################################

262. Transparent_hugepages :

264. [always] madvise never

266. ####################################################################################

268. # NUMA

270. ####################################################################################

272. NUMA :

274. BOOT_IMAGE=/vmlinuz-3.10.0-1160.el7.x86_64 root=/dev/mapper/rhel-root ro spectre_v2=retpoline rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8

276. ####################################################################################

278. # NetworkManager

280. ####################################################################################

282. NetworkManager :

284. ● NetworkManager.service - Network Manager
285. Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled)
286. Active: inactive (dead) since Thu 2021-05-06 14:52:19 CST; 122ms ago
287. Docs: man:NetworkManager(8)
288. Main PID: 774 (code=exited, status=0/SUCCESS)

290. May 06 14:45:41 localhost.localdomain NetworkManager[774]: <info> [1620283541.8760] device (eth1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
291. May 06 14:45:41 localhost.localdomain NetworkManager[774]: <info> [1620283541.8765] device (eth1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
292. May 06 14:45:41 localhost.localdomain NetworkManager[774]: <info> [1620283541.8786] device (eth1): Activation: successful, device activated.
293. May 06 14:52:06 rac11g02 NetworkManager[774]: <info> [1620283926.6518] hostname: hostname changed from "localhost.localdomain" to "rac11g02"
294. May 06 14:52:06 rac11g02 NetworkManager[774]: <info> [1620283926.6524] policy: set-hostname: set hostname to 'rac11g02' (from system configuration)
295. May 06 14:52:19 rac11g02 NetworkManager[774]: <info> [1620283939.7413] caught SIGTERM, shutting down normally.
296. May 06 14:52:19 rac11g02 systemd[1]: Stopping Network Manager...
297. May 06 14:52:19 rac11g02 NetworkManager[774]: <info> [1620283939.8680] manager: NetworkManager state is now CONNECTED_SITE
298. May 06 14:52:19 rac11g02 NetworkManager[774]: <info> [1620283939.8693] exiting (success)
299. May 06 14:52:19 rac11g02 systemd[1]: Stopped Network Manager.

301. ####################################################################################

303. # /etc/sysctl.conf

305. ####################################################################################

307. /etc/sysctl.conf :

309. fs.aio-max-nr = 1048576
310. fs.file-max = 6815744
311. kernel.shmall = 2097152
312. kernel.shmmax = 8365367295
313. kernel.shmmni = 4096
314. kernel.sem = 250 32000 100 128
315. net.ipv4.ip_local_port_range = 9000 65500
316. net.core.rmem_default = 262144
317. net.core.rmem_max = 4194304
318. net.core.wmem_default = 262144
319. net.core.wmem_max = 1048576

321. ####################################################################################

323. # NOZEROCONF

325. ####################################################################################

327. NOZEROCONF :

329. # Created by anaconda
330. #OracleBegin
331. NOZEROCONF=yes
332. #OracleEnd

334. ####################################################################################

336. # /etc/security/limits.d/20-nproc.conf

338. ####################################################################################

340. /etc/security/limits.d/20-nproc.conf :

342. # Default limit for number of user's processes to prevent
343. # accidental fork bombs.
344. # See rhbz #432903 for reasoning.

346. * - nproc 16384
347. root soft nproc unlimited

349. ####################################################################################

351. # /etc/security/limits.conf

353. ####################################################################################

355. /etc/security/limits.conf :

357. # /etc/security/limits.conf
358. #
359. #This file sets the resource limits for the users logged in via PAM.
360. #It does not affect resource limits of the system services.
361. #
362. #Also note that configuration files in /etc/security/limits.d directory,
363. #which are read in alphabetical order, override the settings in this
364. #file in case the domain is the same or more specific.
365. #That means for example that setting a limit for wildcard domain here
366. #can be overriden with a wildcard setting in a config file in the
367. #subdirectory, but a user specific setting here can be overriden only
368. #with a user specific setting in the subdirectory.
369. #
370. #Each line describes a limit for a user in the form:
371. #
372. #<domain> <type> <item> <value>
373. #
374. #Where:
375. #<domain> can be:
376. # - a user name
377. # - a group name, with @group syntax
378. # - the wildcard *, for default entry
379. # - the wildcard %, can be also used with %group syntax,
380. # for maxlogin limit
381. #
382. #<type> can have the two values:
383. # - "soft" for enforcing the soft limits
384. # - "hard" for enforcing hard limits
385. #
386. #<item> can be one of the following:
387. # - core - limits the core file size (KB)
388. # - data - max data size (KB)
389. # - fsize - maximum filesize (KB)
390. # - memlock - max locked-in-memory address space (KB)
391. # - nofile - max number of open file descriptors
392. # - rss - max resident set size (KB)
393. # - stack - max stack size (KB)
394. # - cpu - max CPU time (MIN)
395. # - nproc - max number of processes
396. # - as - address space limit (KB)
397. # - maxlogins - max number of logins for this user
398. # - maxsyslogins - max number of logins on the system
399. # - priority - the priority to run user process with
400. # - locks - max number of file locks the user can hold
401. # - sigpending - max number of pending signals
402. # - msgqueue - max memory used by POSIX message queues (bytes)
403. # - nice - max nice priority allowed to raise to values: [-20, 19]
404. # - rtprio - max realtime priority
405. #
406. #<domain> <type> <item> <value>
407. #

409. #* soft core 0
410. #* hard rss 10000
411. #@student hard nproc 20
412. #@faculty soft nproc 20
413. #@faculty hard nproc 50
414. #ftp hard nproc 0
415. #@student - maxlogins 4

417. # End of file
418. #OracleBegin
419. oracle soft nofile 1024
420. oracle hard nofile 65536
421. oracle soft stack 10240
422. oracle hard stack 32768
423. oracle soft nproc 2047
424. oracle hard nproc 16384
425. oracle hard memlock 134217728
426. oracle soft memlock 134217728

428. grid soft nofile 1024
429. grid hard nofile 65536
430. grid soft stack 10240
431. grid hard stack 32768
432. grid soft nproc 2047
433. grid hard nproc 16384
434. #OracleEnd

436. ####################################################################################

438. # /etc/pam.d/login

440. ####################################################################################

442. /etc/pam.d/login :

444. #%PAM-1.0
445. auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
446. auth substack system-auth
447. auth include postlogin
448. account required pam_nologin.so
449. account include system-auth
450. password include system-auth
451. # pam_selinux.so close should be the first session rule
452. session required pam_selinux.so close
453. session required pam_loginuid.so
454. session optional pam_console.so
455. # pam_selinux.so open should only be followed by sessions to be executed in the user context
456. session required pam_selinux.so open
457. session required pam_namespace.so
458. session optional pam_keyinit.so force revoke
459. session include system-auth
460. session include postlogin
461. -session optional pam_ck_connector.so
462. #OracleBegin
463. session required pam_limits.so
464. session required /lib64/security/pam_limits.so
465. #OracleEnd

467. ####################################################################################

469. # /dev/shm

471. ####################################################################################

473. /dev/shm :

476. #
477. # /etc/fstab
478. # Created by anaconda on Thu May 6 02:12:34 2021
479. #
480. # Accessible filesystems, by reference, are maintained under '/dev/disk'
481. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
482. #
483. /dev/mapper/rhel-root / xfs defaults 0 0
484. UUID=83d7450b-04c8-46e8-9625-a3787297621e /boot xfs defaults 0 0
485. /dev/mapper/rhel-home /home xfs defaults 0 0
486. /dev/mapper/rhel-swap swap swap defaults 0 0
487. /swapfile swap swap defaults 0 0
488. tmpfs /dev/shm tmpfs size=8169304k 0 0

490. ####################################################################################

492. # df -hP

494. ####################################################################################

496. df -hP :

498. Filesystem Size Used Avail Use% Mounted on
499. devtmpfs 3.9G 4.0K 3.9G 1% /dev
500. tmpfs 7.8G 0 7.8G 0% /dev/shm
501. tmpfs 3.9G 9.1M 3.9G 1% /run
502. tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
503. /dev/mapper/rhel-root 39G 3.6G 35G 10% /
504. /dev/sda1 1014M 137M 878M 14% /boot
505. /dev/mapper/rhel-home 19G 33M 19G 1% /home
506. tmpfs 798M 0 798M 0% /run/user/0
507. /dev/sr0 4.3G 4.3G 0 100% /mnt

509. ####################################################################################

511. # Oracle Profile

513. ####################################################################################

515. Oracle Profile :

517. # .bash_profile

519. # Get the aliases and functions
520. if [ -f ~/.bashrc ]; then
521. . ~/.bashrc
522. fi

524. # User specific environment and startup programs

526. PATH=$PATH:$HOME/.local/bin:$HOME/bin

528. export PATH
529. ################OracleBegin#########################
530. umask 022
531. export TMP=/tmp
532. export TMPDIR=$TMP
533. export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 #AL32UTF8,ZHS16GBK
534. export ORACLE_BASE=/u01/app/oracle
535. export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
536. export ORACLE_HOSTNAME=rac11g02
537. export ORACLE_TERM=xterm
538. export TNS_ADMIN=$ORACLE_HOME/network/admin
539. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
540. export ORACLE_SID=rac11g2
541. export PATH=/usr/sbin:$PATH
542. export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
543. alias sas='sqlplus / as sysdba'
544. alias alert='tail -500f $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert_$ORACLE_SID.log|more'
545. export PS1="[`whoami`@`hostname`:"'$PWD]$ '
546. ################OracleEnd###########################

548. ####################################################################################

550. # Grid Profile

552. ####################################################################################

554. Grid Profile :

556. # .bash_profile

558. # Get the aliases and functions
559. if [ -f ~/.bashrc ]; then
560. . ~/.bashrc
561. fi

563. # User specific environment and startup programs

565. PATH=$PATH:$HOME/.local/bin:$HOME/bin

567. export PATH
568. ################OracleBegin#########################
569. umask 022
570. export TMP=/tmp
571. export TMPDIR=$TMP
572. export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 #AL32UTF8,ZHS16GBK
573. export ORACLE_BASE=/u01/app/grid
574. export ORACLE_HOME=/u01/app/11.2.0/grid
575. export ORACLE_TERM=xterm
576. export TNS_ADMIN=$ORACLE_HOME/network/admin
577. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
578. export ORACLE_SID=+ASM2
579. export PATH=/usr/sbin:$PATH
580. export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
581. alias sas='sqlplus / as sysasm'
582. export PS1="[`whoami`@`hostname`:"'$PWD]$ '
583. ################OracleEnd###########################

AI写代码bash