1 ███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
2 ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
3 ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
4░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
5░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
6░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
7 ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
8 ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
9
10
11请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : si
12
13数据库安装模式: single
14
15请选择数据库版本 [11/12/19/21] : 12
16
17数据库版本: 12
18
19#==============================================================#
20配置本地 YUM 源
21#==============================================================#
22
23Adding repository 'sles' [...done]
24Repository 'sles' successfully added
25
26URI : dir:/mnt/Module-Basesystem
27Enabled : Yes
28GPG Check : Yes
29Autorefresh : Yes
30Priority : 99 (default priority)
31
32Repository priorities are without effect. All enabled repositories share the same priority.
33Adding repository 'sles-Legacy' [...done]
34Repository 'sles-Legacy' successfully added
35
36URI : dir:/mnt/Module-Legacy
37Enabled : Yes
38GPG Check : Yes
39Autorefresh : Yes
40Priority : 99 (default priority)
41
42Repository priorities are without effect. All enabled repositories share the same priority.
43Adding repository 'sles-Tools' [...done]
44Repository 'sles-Tools' successfully added
45
46URI : dir:/mnt/Module-Development-Tools
47Enabled : Yes
48GPG Check : Yes
49Autorefresh : Yes
50Priority : 99 (default priority)
51
52Repository priorities are without effect. All enabled repositories share the same priority.
53
54#==============================================================#
55禁用防火墙
56#==============================================================#
57
58○ firewalld.service - firewalld - dynamic firewall daemon
59 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: disabled)
60 Active: inactive (dead)
61 Docs: man:firewalld(1)
62
63Mar 25 16:02:33 localhost systemd[1]: Starting firewalld - dynamic firewall daemon...
64Mar 25 16:02:37 localhost systemd[1]: Started firewalld - dynamic firewall daemon.
65Mar 27 13:41:21 suse15 systemd[1]: Stopping firewalld - dynamic firewall daemon...
66Mar 27 13:41:22 suse15 systemd[1]: firewalld.service: Deactivated successfully.
67Mar 27 13:41:22 suse15 systemd[1]: Stopped firewalld - dynamic firewall daemon.
68
69#==============================================================#
70YUM 静默安装依赖包
71#==============================================================#
72
73bc-1.07.1-11.37.x86_64
74binutils-2.39-150100.7.40.1.x86_64
75package compat-libcap1 is not installed
76gcc-7-3.9.1.x86_64
77gcc-c++-7-3.9.1.x86_64
78package elfutils-libelf is not installed
79package elfutils-libelf-devel is not installed
80glibc-2.31-150300.46.1.x86_64
81glibc-devel-2.31-150300.46.1.x86_64
82package libaio is not installed
83libaio-devel-0.3.109-1.25.x86_64
84package libgcc is not installed
85package libstdc++ is not installed
86libstdc++-devel-7-3.9.1.x86_64
87package libxcb is not installed
88package libX11 is not installed
89package libXau is not installed
90package libXi is not installed
91package libXrender is not installed
92make-4.2.1-7.3.2.x86_64
93net-tools-2.0+git20170221.479bb4a-3.11.x86_64
94smartmontools-7.2-150300.8.8.1.x86_64
95sysstat-12.0.2-3.33.1.x86_64
96e2fsprogs-1.46.4-150400.3.3.1.x86_64
97package e2fsprogs-libs is not installed
98unzip-6.00-150000.4.11.1.x86_64
99openssh-clients-8.4p1-150300.3.18.2.x86_64
100package readline is not installed
101readline-devel-7.0-150400.25.22.x86_64
102psmisc-23.0-150000.6.22.1.x86_64
103package ksh is not installed
104package nfs-utils is not installed
105tar-1.34-150000.3.31.1.x86_64
106package device-mapper-multipath is not installed
107avahi-0.8-150400.7.3.1.x86_64
108ntp-4.2.8p15-150000.4.22.1.x86_64
109chrony-4.1-150400.19.4.x86_64
110package libXtst is not installed
111libXrender-devel-0.9.10-1.30.x86_64
112fontconfig-devel-2.13.1-150400.1.4.x86_64
113policycoreutils-3.1-150400.1.5.x86_64
114package policycoreutils-python is not installed
115insserv-compat-0.1-4.6.1.noarch
116libXext-devel-1.3.3-1.30.x86_64
117libXi-devel-1.7.9-3.2.1.x86_64
118libcap-ng-utils-0.7.9-4.37.x86_64
119libcap-progs-2.63-150400.1.7.x86_64
120libcap1-1.97-1.15.x86_64
121libpcap1-1.10.1-150400.1.7.x86_64
122libpcre16-0-8.45-150000.20.13.1.x86_64
123pixz-1.0.6-1.13.x86_64
124rdma-core-devel-42.0-150500.1.3.x86_64
125xorg-x11-libs-7.6.1-1.16.noarch
126compat-libpthread-nonshared-0-150300.3.6.1.x86_64
127package librdmacm is not installed
128package libnsl* is not installed
129libibverbs-42.0-150500.1.3.x86_64
130package compat-openssl10 is not installed
131policycoreutils-python-utils-3.1-150400.1.5.noarch
132package elfutils* is not installed
133glibc-2.31-150300.46.1.x86_64
134
135#==============================================================#
136配置主机名
137#==============================================================#
138
139suse15
140
141#==============================================================#
142配置 /etc/hosts 文件
143#==============================================================#
144
145127.0.0.1 localhost
146::1 localhost ipv6-localhost ipv6-loopback
147fe00::0 ipv6-localnet
148ff00::0 ipv6-mcastprefix
149ff02::1 ipv6-allnodes
150ff02::2 ipv6-allrouters
151ff02::3 ipv6-allhosts
152192.168.6.138 suse15
153
154#==============================================================#
155创建用户和组
156#==============================================================#
157
158oracle 用户:
159
160uid=54321(oracle) gid=54321(oinstall) groups=54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba),54321(oinstall)
161
162
163#==============================================================#
164配置 Avahi-daemon 服务
165#==============================================================#
166
167○ avahi-daemon.service - Avahi mDNS/DNS-SD Stack
168 Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
169 Active: inactive (dead)
170TriggeredBy: ○ avahi-daemon.socket
171
172#==============================================================#
173配置透明大页 && NUMA && 磁盘 IO 调度器
174#==============================================================#
175
176Generating grub configuration file ...
177Found theme: /boot/grub2/themes/SLE/theme.txt
178Found linux image: /boot/vmlinuz-5.14.21-150500.53-default
179Found initrd image: /boot/initrd-5.14.21-150500.53-default
180Adding boot menu entry for UEFI Firmware Settings ...
181done
182
183#==============================================================#
184配置 sysctl.conf
185#==============================================================#
186
187fs.aio-max-nr = 1048576
188fs.file-max = 6815744
189kernel.shmall = 2097152
190kernel.shmmax = 8332693503
191kernel.shmmni = 4096
192kernel.sem = 250 32000 100 128
193net.ipv4.ip_local_port_range = 9000 65500
194net.core.rmem_default = 262144
195net.core.rmem_max = 4194304
196net.core.wmem_default = 262144
197net.core.wmem_max = 1048576
198vm.min_free_kbytes = 32549
199net.ipv4.conf.eth0.rp_filter = 1
200vm.swappiness = 10
201kernel.panic_on_oops = 1
202kernel.randomize_va_space = 2
203kernel.numa_balancing = 0
204
205#==============================================================#
206配置 RemoveIPC
207#==============================================================#
208
209[Login]
210
211#==============================================================#
212配置 /etc/security/limits.conf 和 /etc/pam.d/login
213#==============================================================#
214
215查看 /etc/security/limits.conf:
216
217oracle soft nofile 1024
218oracle hard nofile 65536
219oracle soft stack 10240
220oracle hard stack 32768
221oracle soft nproc 2047
222oracle hard nproc 16384
223oracle hard memlock unlimited
224oracle soft memlock unlimited
225
226查看 /etc/pam.d/login 文件:
227
228auth requisite pam_nologin.so
229auth include common-auth
230account include common-account
231password include common-password
232session required pam_loginuid.so
233session optional pam_keyinit.so force revoke
234session include common-session
235session optional pam_mail.so standard
236session required pam_limits.so
237session required /lib64/security/pam_limits.so
238
239#==============================================================#
240配置 /dev/shm
241#==============================================================#
242
243/dev/rootgv/rootlv / xfs defaults 0 0
244UUID=e16e4a70-ce93-4f3e-9103-7b9243fcabcc /boot xfs defaults 0 0
245UUID=CBDD-C51E /boot/efi vfat utf8 0 2
246/dev/rootgv/swaplv swap swap defaults 0 0
247tmpfs /dev/shm tmpfs size=8137396k 0 0
248
249#==============================================================#
250安装 rlwrap 插件
251#==============================================================#
252
253成功安装 rlwrap: rlwrap 0.44
254
255#==============================================================#
256Root 用户环境变量
257#==============================================================#
258
259alias so='su - oracle'
260export PS1="[`whoami`@`hostname`:"'$PWD]$ '
261
262#==============================================================#
263Oracle 用户环境变量
264#==============================================================#
265
266umask 022
267export TMP=/tmp
268export TMPDIR=$TMP
269export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
270export ORACLE_BASE=/u01/app/oracle
271export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
272export ORACLE_TERM=xterm
273export TNS_ADMIN=$ORACLE_HOME/network/admin
274export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
275export ORACLE_SID=lucifer
276export PATH=/usr/sbin:$PATH
277export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
278export PERL5LIB=$ORACLE_HOME/perl/lib
279alias sas='sqlplus / as sysdba'
280alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
281alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
282alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
283export PS1="[`whoami`@`hostname`:"'$PWD]$ '
284export CV_ASSUME_DISTID=OL7
285alias sqlplus='rlwrap sqlplus'
286alias rman='rlwrap rman'
287alias adrci='rlwrap adrci'
288
289#==============================================================#
290静默解压 Oracle 软件包
291#==============================================================#
292
293正在静默解压缩 Oracle 软件包,请稍等:
294
295.---- -. -. . . . .
296( .',----- - - ' ' ' __
297 \_/ ;--:- __--------------------___ ____=========_||___
298__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
299c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
300,_\___________'_|,L______],|______________________|_i,!________________!_i
301/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
302""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
303
304静默解压 Oracle 软件安装包: /soft/LINUX.X64_122010_db_home.zip
305
306静默解压 Oracle 软件补丁包: /soft/p33587128*.zip
307
308静默解压 OJVM 软件补丁包: /soft/p33561275*.zip
309
310#==============================================================#
311Oracle 安装静默文件
312#==============================================================#
313
314oracle.install.option=INSTALL_DB_SWONLY
315UNIX_GROUP_NAME=oinstall
316INVENTORY_LOCATION=/u01/app/oraInventory
317ORACLE_BASE=/u01/app/oracle
318oracle.install.db.InstallEdition=EE
319oracle.install.db.DBA_GROUP=dba
320oracle.install.db.OPER_GROUP=oper
321oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
322SELECTED_LANGUAGES=en,zh_CN
323ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
324oracle.install.db.OSBACKUPDBA_GROUP=backupdba
325oracle.install.db.OSDGDBA_GROUP=dgdba
326oracle.install.db.OSKMDBA_GROUP=kmdba
327oracle.install.db.OSRACDBA_GROUP=racdba
328
329#==============================================================#
330静默安装数据库软件
331#==============================================================#
332
333Starting Oracle Universal Installer...
334
335Checking Temp space: must be greater than 500 MB. Actual 77573 MB Passed
336Checking swap space: must be greater than 150 MB. Actual 8191 MB Passed
337Preparing to launch Oracle Universal Installer from /tmp/OraInstall2024-03-27_01-46-17PM. Please wait ...You can find the log of this install session at:
338 /u01/app/oraInventory/logs/installActions2024-03-27_01-46-17PM.log
339
340Prepare in progress.
341.................................................. 8% Done.
342
343Prepare successful.
344
345Copy files in progress.
346.................................................. 17% Done.
347.................................................. 22% Done.
348.................................................. 27% Done.
349.................................................. 32% Done.
350.................................................. 40% Done.
351.................................................. 45% Done.
352.................................................. 50% Done.
353.................................................. 55% Done.
354.................................................. 60% Done.
355.................................................. 65% Done.
356.................................................. 70% Done.
357.................................................. 75% Done.
358.................................................. 80% Done.
359....................
360Copy files successful.
361
362Link binaries in progress.
363..........
364Link binaries successful.
365
366Setup files in progress.
367..............................
368Setup files successful.
369
370Setup Inventory in progress.
371
372Setup Inventory successful.
373
374Finish Setup successful.
375The installation of Oracle Database 12c was successful.
376Please check '/u01/app/oraInventory/logs/silentInstall2024-03-27_01-46-17PM.log' for more details.
377
378Setup Oracle Base in progress.
379
380Setup Oracle Base successful.
381.................................................. 95% Done.
382
383As a root user, execute the following script(s):
384 1. /u01/app/oraInventory/orainstRoot.sh
385 2. /u01/app/oracle/product/12.2.0/db/root.sh
386
387
388
389.................................................. 100% Done.
390Successfully Setup Software.
391
392#==============================================================#
393执行 root 脚本
394#==============================================================#
395
396Changing permissions of /u01/app/oraInventory.
397Adding read,write permissions for group.
398Removing read,write,execute permissions for world.
399
400Changing groupname of /u01/app/oraInventory to oinstall.
401The execution of the script is complete.
402Check /u01/app/oracle/product/12.2.0/db/install/root_suse15_2024-03-27_13-54-58-046457064.log for the output of root script
403
404#==============================================================#
405Oracle 软件安装补丁
406#==============================================================#
407
408Oracle Interim Patch Installer version 12.2.0.1.30
409Copyright (c) 2024, Oracle Corporation. All rights reserved.
410
411PREREQ session
412
413Oracle Home : /u01/app/oracle/product/12.2.0/db
414Central Inventory : /u01/app/oraInventory
415 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
416OPatch version : 12.2.0.1.30
417OUI version : 12.2.0.1.4
418Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-27_13-55-05PM_1.log
419
420Invoking prereq "checkconflictagainstohwithdetail"
421
422Prereq "checkConflictAgainstOHWithDetail" passed.
423
424OPatch succeeded.
425Oracle Interim Patch Installer version 12.2.0.1.30
426Copyright (c) 2024, Oracle Corporation. All rights reserved.
427
428
429Oracle Home : /u01/app/oracle/product/12.2.0/db
430Central Inventory : /u01/app/oraInventory
431 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
432OPatch version : 12.2.0.1.30
433OUI version : 12.2.0.1.4
434Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-27_13-55-07PM_1.log
435
436Verifying environment and performing prerequisite checks...
437OPatch continues with these patches: 33587128
438
439Do you want to proceed? [y|n]
440Y (auto-answered by -silent)
441User Responded with: Y
442All checks passed.
443
444Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
445(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
446
447
448Is the local system ready for patching? [y|n]
449Y (auto-answered by -silent)
450User Responded with: Y
451Backing up files...
452Applying interim patch '33587128' to OH '/u01/app/oracle/product/12.2.0/db'
453ApplySession: 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.
454
455Patching component oracle.rdbms.util, 12.2.0.1.0...
456
457Patching component oracle.rdbms, 12.2.0.1.0...
458
459Patching component oracle.network.rsf, 12.2.0.1.0...
460
461Patching component oracle.rdbms.rsf, 12.2.0.1.0...
462
463Patching component oracle.ctx, 12.2.0.1.0...
464
465Patching component oracle.has.common.cvu, 12.2.0.1.0...
466
467Patching component oracle.ldap.owm, 12.2.0.1.0...
468
469Patching component oracle.ldap.rsf, 12.2.0.1.0...
470
471Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
472
473Patching component oracle.oracore.rsf, 12.2.0.1.0...
474
475Patching component oracle.oraolap, 12.2.0.1.0...
476
477Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
478
479Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
480
481Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
482
483Patching component oracle.sdo, 12.2.0.1.0...
484
485Patching component oracle.sdo.locator, 12.2.0.1.0...
486
487Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...
488
489Patching component oracle.tfa, 12.2.0.1.0...
490
491Patching component oracle.ctx.rsf, 12.2.0.1.0...
492
493Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
494
495Patching component oracle.rdbms.install.common, 12.2.0.1.0...
496
497Patching component oracle.assistants.deconfig, 12.2.0.1.0...
498
499Patching component oracle.ons.ic, 12.2.0.1.0...
500
501Patching component oracle.rdbms.rman, 12.2.0.1.0...
502
503Patching component oracle.precomp.rsf, 12.2.0.1.0...
504
505Patching component oracle.install.deinstalltool, 12.2.0.1.0...
506
507Patching component oracle.assistants.acf, 12.2.0.1.0...
508
509Patching component oracle.rdbms.oci, 12.2.0.1.0...
510
511Patching component oracle.sqlplus.ic, 12.2.0.1.0...
512
513Patching component oracle.xdk.parser.java, 12.2.0.1.0...
514
515Patching component oracle.dbtoolslistener, 12.2.0.1.0...
516
517Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
518
519Patching component oracle.rdbms.dv, 12.2.0.1.0...
520
521Patching component oracle.rdbms.lbac, 12.2.0.1.0...
522
523Patching component oracle.ons, 12.2.0.1.0...
524
525Patching component oracle.ldap.client, 12.2.0.1.0...
526
527Patching component oracle.xdk, 12.2.0.1.0...
528
529Patching component oracle.xdk.rsf, 12.2.0.1.0...
530
531Patching component oracle.sqlplus, 12.2.0.1.0...
532
533Patching component oracle.assistants.server, 12.2.0.1.0...
534
535Patching component oracle.rdbms.crs, 12.2.0.1.0...
536
537Patching component oracle.precomp.common, 12.2.0.1.0...
538
539Patching component oracle.precomp.lang, 12.2.0.1.0...
540
541Patching component oracle.jdk, 1.8.0.91.0...
542
543OPatch found the word "error" in the stderr of the make command.
544Please look at this stderr. You can re-run this make command.
545Stderr output:
546chmod: changing permissions of '/u01/app/oracle/product/12.2.0/db/bin/extjobO': Operation not permitted
547make: [ins_rdbms.mk:533: iextjob] Error 1 (ignored)
548
549
550Patch 33587128 successfully applied.
551OPatch Session completed with warnings.
552Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-27_13-55-07PM_1.log
553
554OPatch completed with warnings.
555
556#==============================================================#
557OJVM 补丁安装
558#==============================================================#
559
560Oracle Interim Patch Installer version 12.2.0.1.30
561Copyright (c) 2024, Oracle Corporation. All rights reserved.
562
563PREREQ session
564
565Oracle Home : /u01/app/oracle/product/12.2.0/db
566Central Inventory : /u01/app/oraInventory
567 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
568OPatch version : 12.2.0.1.30
569OUI version : 12.2.0.1.4
570Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-27_14-02-48PM_1.log
571
572Invoking prereq "checkconflictagainstohwithdetail"
573
574Prereq "checkConflictAgainstOHWithDetail" passed.
575
576OPatch succeeded.
577Oracle Interim Patch Installer version 12.2.0.1.30
578Copyright (c) 2024, Oracle Corporation. All rights reserved.
579
580
581Oracle Home : /u01/app/oracle/product/12.2.0/db
582Central Inventory : /u01/app/oraInventory
583 from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
584OPatch version : 12.2.0.1.30
585OUI version : 12.2.0.1.4
586Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-27_14-02-50PM_1.log
587
588Verifying environment and performing prerequisite checks...
589OPatch continues with these patches: 33561275
590
591Do you want to proceed? [y|n]
592Y (auto-answered by -silent)
593User Responded with: Y
594All checks passed.
595
596Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
597(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
598
599
600Is the local system ready for patching? [y|n]
601Y (auto-answered by -silent)
602User Responded with: Y
603Backing up files...
604Applying interim patch '33561275' to OH '/u01/app/oracle/product/12.2.0/db'
605
606Patching component oracle.javavm.server, 12.2.0.1.0...
607
608Patching component oracle.javavm.server.core, 12.2.0.1.0...
609
610Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
611
612Patching component oracle.javavm.client, 12.2.0.1.0...
613
614Patching component oracle.rdbms, 12.2.0.1.0...
615
616Patching component oracle.dbjava.jdbc, 12.2.0.1.0...
617
618Patching component oracle.dbjava.ic, 12.2.0.1.0...
619Patch 33561275 successfully applied.
620Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-03-27_14-02-50PM_1.log
621
622OPatch succeeded.
623
624#==============================================================#
625Oracle 软件版本
626#==============================================================#
627
628
629SQL*Plus: Release 12.2.0.1.0 Production
630
631
632#==============================================================#
633Oracle 补丁信息
634#==============================================================#
635
63633561275;OJVM RELEASE UPDATE 12.2.0.1.220118 (33561275)
63733587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)
638
639OPatch succeeded.
640
641
642#==============================================================#
643配置监听
644#==============================================================#
645
646
647Parsing command line arguments:
648 Parameter "silent" = true
649 Parameter "responsefile" = /u01/app/oracle/product/12.2.0/db/assistants/netca/netca.rsp
650Done parsing command line arguments.
651Oracle Net Services Configuration:
652Profile configuration complete.
653Oracle Net Listener Startup:
654 Running Listener Control:
655 /u01/app/oracle/product/12.2.0/db/bin/lsnrctl start LISTENER
656 Listener Control complete.
657 Listener started successfully.
658Listener configuration complete.
659Oracle Net Services configuration successful. The exit code is 0
660
661检查监听状态:
662
663
664LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 27-MAR-2024 14:04:14
665
666Copyright (c) 1991, 2016, Oracle. All rights reserved.
667
668Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=suse15)(PORT=1521)))
669STATUS of the LISTENER
670------------------------
671Alias LISTENER
672Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
673Start Date 27-MAR-2024 14:04:14
674Uptime 0 days 0 hr. 0 min. 0 sec
675Trace Level off
676Security ON: Local OS Authentication
677SNMP OFF
678Listener Parameter File /u01/app/oracle/product/12.2.0/db/network/admin/listener.ora
679Listener Log File /u01/app/oracle/diag/tnslsnr/suse15/listener/alert/log.xml
680Listening Endpoints Summary...
681 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=suse15)(PORT=1521)))
682 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
683The listener supports no services
684The command completed successfully
685
686#==============================================================#
687静默建库命令
688#==============================================================#
689
690dbca -silent -createDatabase \
691-ignorePrereqFailure \
692-templateName General_Purpose.dbc \
693-responseFile NO_VALUE \
694-gdbName lucifer \
695-sid lucifer \
696-sysPassword oracle \
697-systemPassword oracle \
698-redoLogFileSize 100 \
699-datafileDestination /oradata \
700-storageType FS \
701-enableArchive true \
702-archiveLogDest /oradata \
703-databaseConfigType SINGLE \
704-characterset AL32UTF8 \
705-nationalCharacterSet AL16UTF16 \
706-emConfiguration NONE \
707-automaticMemoryManagement false \
708-totalMemory 3973 \
709-databaseType OLTP \
710-createAsContainerDatabase false
711
712#==============================================================#
713创建数据库
714#==============================================================#
715
716[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
717 CAUSE:
718a. 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].
719b.The password entered is a keyword that Oracle does not recommend to be used as password
720 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
721[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
722 CAUSE:
723a. 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].
724b.The password entered is a keyword that Oracle does not recommend to be used as password
725 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
726Copying database files
7271% complete
7282% complete
72918% complete
73033% complete
731Creating and starting Oracle instance
73235% complete
73340% complete
73444% complete
73549% complete
73650% complete
73753% complete
73855% complete
739Completing Database Creation
74056% complete
74157% complete
74258% complete
74362% complete
74465% complete
74566% complete
746Executing Post Configuration Actions
747100% complete
748Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/lucifer/lucifer.log" for further details.
749
750#==============================================================#
751配置在线重做日志
752#==============================================================#
753
754数据库在线重做日志文件:
755
756
757 THREAD# GROUP# MEMBER size(M)
758---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
759 1 1 /oradata/lucifer/redo01.log 100
760 1 2 /oradata/lucifer/redo02.log 100
761 1 3 /oradata/lucifer/redo03.log 100
762 1 11 /oradata/LUCIFER/onlinelog/o1_mf_11_m07gbjnj_.log 100
763 1 12 /oradata/LUCIFER/onlinelog/o1_mf_12_m07gbjr3_.log 100
764 1 13 /oradata/LUCIFER/onlinelog/o1_mf_13_m07gbjv4_.log 100
765 1 14 /oradata/LUCIFER/onlinelog/o1_mf_14_m07gbjyr_.log 100
766 1 15 /oradata/LUCIFER/onlinelog/o1_mf_15_m07gbk4n_.log 100
767
768#==============================================================#
769配置 RMAN 备份任务
770#==============================================================#
771
772## OracleBegin
77300 02 * * * /home/oracle/scripts/del_arch.sh
774#00 00 * * 0 /home/oracle/scripts/dbbackup_lv0.sh
775#00 00 * * 1,2,3,4,5,6 /home/oracle/scripts/dbbackup_lv1.sh
776
777#==============================================================#
778配置 glogin.sql
779#==============================================================#
780
781define _editor=vi
782set serveroutput on size 1000000
783set pagesize 9999
784set long 99999
785set trimspool on
786col name format a80
787set termout off
788define gname=idle
789column global_name new_value gname
790select 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 );
791ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
792set sqlprompt '&gname _DATE> '
793set termout on
794
795#==============================================================#
796优化数据库参数
797#==============================================================#
798
799数据库参数:
800
801
802NAME SID SPVALUE VALUE
803-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
804_b_tree_bitmap_plans * FALSE FALSE
805_datafile_write_errors_crash_instance * FALSE FALSE
806audit_file_dest * /u01/app/oracle/admin/lucifer/adump /u01/app/oracle/admin/lucifer/adump
807audit_trail * NONE DB
808compatible * 12.2.0 12.2.0
809control_file_record_keep_time * 31 31
810db_block_size * 8192 8192
811db_create_file_dest * /oradata /oradata
812db_file_multiblock_read_count * 128
813db_files * 5000 200
814db_name * lucifer lucifer
815db_writer_processes * 1
816deferred_segment_creation * FALSE FALSE
817diagnostic_dest * /u01/app/oracle /u01/app/oracle
818dispatchers * (PROTOCOL=TCP) (SERVICE=luciferXDB) (PROTOCOL=TCP) (SERVICE=luciferXDB)
819event * 10949 trace name context forever,level 1
820event * 28401 trace name context forever,level 1
821fast_start_parallel_rollback * LOW
822log_archive_dest_1 * location=/oradata/archivelog location=/oradata/archivelog
823log_archive_format * %t_%s_%r.dbf %t_%s_%r.dbf
824max_dump_file_size * unlimited
825max_string_size * STANDARD
826nls_language * AMERICAN AMERICAN
827nls_territory * AMERICA AMERICA
828open_cursors * 1000 300
829optimizer_adaptive_plans * TRUE
830optimizer_adaptive_statistics * FALSE
831optimizer_index_caching * 0
832optimizer_mode * ALL_ROWS
833parallel_force_local * FALSE
834parallel_max_servers * 64 64
835pga_aggregate_target * 1332740096 833617920
836processes * 2000 640
837remote_login_passwordfile * EXCLUSIVE EXCLUSIVE
838session_cached_cursors * 300 50
839sessions * 984
840sga_max_size * 5332008960 3338665984
841sga_target * 5332008960 3338665984
842spfile * /u01/app/oracle/product/12.2.0/db/dbs/spfilelucifer.ora
843statistics_level * TYPICAL
844undo_retention * 10800 900
845
846恭喜!Oracle 单机安装成功,现在是否重启主机:[Y/N] Y