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