Oracle 一鍵安裝腳本,演示 麒麟 V10 一鍵安裝 Oracle 12CR2(220118)單機版過程(全程無需人工干預):(腳本包括 ORALCE PSU/OJVM 等補丁自動安裝)
?? 腳本下載地址:Shell腳本安裝Oracle數據庫
腳本第三代支持 N 節點一鍵安裝,不限制節點數!

安裝準備
- 1、安裝好操作系統,建議安裝圖形化
- 2、配置好網絡
- 3、掛載本地 ISO 鏡像源
- 4、上傳必須軟件安裝包(安裝基礎包,補丁包:35926646、35943157、6880880)
- 5、上傳一鍵安裝腳本:OracleShellInstall
? 偷懶可以直接下載本文安裝包合集:麒麟 V10 安裝 Oracle Oracle 12CR2(220118)單機版安裝包合集(包含補丁!!!)
演示環境信息
# 主機版本
[root@kylin soft]# cat /etc/os-release
NAME="Kylin Linux Advanced Server"
VERSION="V10 (Lance)"
ID="kylin"
VERSION_ID="V10"
PRETTY_NAME="Kylin Linux Advanced Server V10 (Lance)"
ANSI_COLOR="0;31"
# 網絡信息
[root@kylin soft]# ip a
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:62:a0:e5 brd ff:ff:ff:ff:ff:ff
inet 192.168.6.222/24 brd 192.168.6.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fe80::735:5307:2e5e:803c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
# 掛載本地 ISO 鏡像
[root@kylin soft]# mount | grep iso9660 | grep -v "/run/media"
/dev/sr0 on /mnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
[root@kylin soft]# df -h|grep /mnt
/dev/sr0 4.3G 4.3G 0 100% /mnt
# 安裝包存放在 /soft 目錄下
[root@kylin ~]# cd /soft/
[root@kylin soft]# ll
-rwx------ 1 root root 3453696911 2月 26 14:04 LINUX.X64_122010_db_home.zip
-rwxr-xr-x 1 root root 169044 2月 26 14:03 OracleShellInstall
-rwxr-xr-x 1 root root 138022236 2月 26 14:03 p33561275_122010_Linux-x86-64.zip
-rwx------ 1 root root 1020001457 2月 26 14:04 p33587128_122010_Linux-x86-64.zip
-rwx------ 1 root root 124109254 2月 26 14:03 p6880880_122010_Linux-x86-64.zip
-rwxr-xr-x 1 root root 321590 2月 26 13:31 rlwrap-0.44.tar.gz
確保安裝環境準備完成后,即可執行一鍵安裝。
安裝命令
使用標準生產環境安裝參數:
# 根據腳本 README 或者 -h 命令提示,編輯好一鍵安裝命令,進入 /soft 目錄執行安裝:
./OracleShellInstall -lf ens33 `# local ip ifname`\
-n kylin `# hostname`\
-op oracle `# oracle password`\
-d /u01 `# software base dir`\
-ord /oradata `# data dir`\
-o lucifer `# dbname`\
-dp oracle `# sys/system password`\
-ds AL32UTF8 `# database character`\
-ns AL16UTF16 `# national character`\
-redo 100 `# redo size`\
-opa 33587128 `# oracle PSU/RU`\
-jpa 33561275 `# OJVM PSU/RU`\
-opd Y `# optimize db`
選擇需要安裝的模式以及版本,即可開始安裝:

安裝過程
███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
██?????██ ?██ ██?????? ?██ ?██ ?██?██ ?██ ?██ ?██
██ ??██ ██████ ██████ █████ ?██ █████ ?██ ?██ █████ ?██ ?██?██ ███████ ██████ ██████ ██████ ?██ ?██
?██ ?██??██??█ ??????██ ██???██ ?██ ██???██?█████████?██████ ██???██ ?██ ?██?██??██???██ ██???? ???██? ??????██ ?██ ?██
?██ ?██ ?██ ? ███████ ?██ ?? ?██?███████????????██?██???██?███████ ?██ ?██?██ ?██ ?██??█████ ?██ ███████ ?██ ?██
??██ ██ ?██ ██????██ ?██ ██ ?██?██???? ?██?██ ?██?██???? ?██ ?██?██ ?██ ?██ ?????██ ?██ ██????██ ?██ ?██
??███████ ?███ ??████████??█████ ███??██████ ████████ ?██ ?██??██████ ███ ███?██ ███ ?██ ██████ ??██ ??████████ ███ ███
??????? ??? ???????? ????? ??? ?????? ???????? ?? ?? ?????? ??? ??? ?? ??? ?? ?????? ?? ???????? ??? ???
請選擇安裝模式 [單機(si)/單機ASM(sa)/集群(rac)] : si
數據庫安裝模式: single
請選擇數據庫版本 [11/12/19/21] : 12
數據庫版本: 12
#==============================================================#
配置本地 YUM 源
#==============================================================#
[server]
name=server
baseurl=file:///mnt
enabled=1
gpgcheck=0
#==============================================================#
禁用防火墻
#==============================================================#
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
2月 26 13:11:07 kylin systemd[1]: Starting firewalld - dynamic firewall daemon...
2月 26 13:11:09 kylin systemd[1]: Started firewalld - dynamic firewall daemon.
2月 26 14:08:40 kylin systemd[1]: Stopping firewalld - dynamic firewall daemon...
2月 26 14:08:41 kylin systemd[1]: firewalld.service: Succeeded.
2月 26 14:08:41 kylin systemd[1]: Stopped firewalld - dynamic firewall daemon.
#==============================================================#
禁用 SELinux
#==============================================================#
SELinux status: disabled
#==============================================================#
配置 nsysctl.conf
#==============================================================#
NOZEROCONF=yes
#==============================================================#
YUM 靜默安裝依賴包
#==============================================================#
bc-1.07.1-11.ky10.x86_64
binutils-2.34-19.p01.ky10.x86_64
未安裝軟件包 compat-libcap1
gcc-7.3.0-20220207.45.ky10.x86_64
gcc-c++-7.3.0-20220207.45.ky10.x86_64
未安裝軟件包 elfutils-libelf
未安裝軟件包 elfutils-libelf-devel
glibc-2.28-88.p06.ky10.x86_64
glibc-devel-2.28-88.p06.ky10.x86_64
libaio-0.3.112-1.p01.ky10.x86_64
libaio-devel-0.3.112-1.p01.ky10.x86_64
libgcc-7.3.0-20220207.45.ky10.x86_64
libstdc++-7.3.0-20220207.45.ky10.x86_64
libstdc++-devel-7.3.0-20220207.45.ky10.x86_64
libxcb-1.14-1.ky10.x86_64
libX11-1.6.9-5.ky10.x86_64
libXau-1.0.9-2.ky10.x86_64
libXi-1.7.10-1.ky10.x86_64
libXrender-0.9.10-10.ky10.x86_64
make-4.3-1.ky10.x86_64
net-tools-2.0-0.54.ky10.x86_64
smartmontools-7.1-1.ky10.x86_64
sysstat-12.2.1-1.p00.ky10.x86_64
e2fsprogs-1.45.6-8.ky10.x86_64
未安裝軟件包 e2fsprogs-libs
unzip-6.0-47.ky10.x86_64
openssh-clients-8.2p1-16.p04.ky10.x86_64
readline-8.0-3.ky10.x86_64
readline-devel-8.0-3.ky10.x86_64
psmisc-23.3-2.ky10.x86_64
ksh-2020.0.0-4.ky10.x86_64
nfs-utils-2.5.1-5.ky10.x86_64
tar-1.32-2.ky10.x86_64
未安裝軟件包 device-mapper-multipath
avahi-0.8-8.ky10.x86_64
ntp-4.2.8p14-5.ky10.x86_64
chrony-3.5-3.p01.ky10.x86_64
libXtst-1.2.3-10.ky10.x86_64
libXrender-devel-0.9.10-10.ky10.x86_64
fontconfig-devel-2.13.92-1.ky10.x86_64
policycoreutils-3.1-7.p01.ky10.x86_64
未安裝軟件包 policycoreutils-python
未安裝軟件包 librdmacm
未安裝軟件包 libnsl*
未安裝軟件包 libibverbs
未安裝軟件包 compat-openssl10
policycoreutils-python-utils-3.1-7.p01.ky10.noarch
未安裝軟件包 elfutils*
glibc-2.28-88.p06.ky10.x86_64
#==============================================================#
配置主機名
#==============================================================#
kylin
#==============================================================#
配置 /etc/hosts 文件
#==============================================================#
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.6.222 kylin
#==============================================================#
創建用戶和組
#==============================================================#
oracle 用戶:
用戶id=54321(oracle) 組id=54321(oinstall) 組=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
#==============================================================#
配置 Avahi-daemon 服務
#==============================================================#
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: enabled)
Active: inactive (dead)
#==============================================================#
配置透明大頁 && NUMA && 磁盤 IO 調度器
#==============================================================#
args="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"
-resume=/dev/mapper/klas-swap
-args="ro
args="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"
-audit=0
-crashkernel=1024M,high
#==============================================================#
配置 sysctl.conf
#==============================================================#
kernel.sysrq = 0
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
kernel.dmesg_restrict = 1
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 7010422783
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.min_free_kbytes = 27384
net.ipv4.conf.ens33.rp_filter = 1
vm.swappiness = 10
kernel.panic_on_oops = 1
kernel.randomize_va_space = 2
kernel.numa_balancing = 0
#==============================================================#
配置 RemoveIPC
#==============================================================#
[Login]
RemoveIPC=no
#==============================================================#
配置 /etc/security/limits.conf 和 /etc/pam.d/login
#==============================================================#
查看 /etc/security/limits.conf:
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft nproc 2047
oracle hard nproc 16384
oracle hard memlock unlimited
oracle soft memlock unlimited
查看 /etc/pam.d/login 文件:
auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
-session optional pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so
#==============================================================#
配置 /dev/shm
#==============================================================#
/dev/mapper/klas-root / xfs defaults 0 0
UUID=c8e47a65-11c4-4e4e-84ce-95f9f618be7e /boot xfs defaults 0 0
/dev/mapper/klas-swap none swap defaults 0 0
tmpfs /dev/shm tmpfs size=6846116k 0 0
#==============================================================#
安裝 rlwrap 插件
#==============================================================#
成功安裝 rlwrap: rlwrap 0.44
#==============================================================#
Root 用戶環境變量
#==============================================================#
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
alias so='su - oracle'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
#==============================================================#
Oracle 用戶環境變量
#==============================================================#
[ -f ~/.bashrc ] && . ~/.bashrc
umask 022
export TMP=/tmp
export TMPDIR=$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=lucifer
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
export PERL5LIB=$ORACLE_HOME/perl/lib
alias sas='sqlplus / as sysdba'
alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
export PS1="[`whoami`@`hostname`:"'$PWD]$ '
export CV_ASSUME_DISTID=OL7
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias adrci='rlwrap adrci'
#==============================================================#
靜默解壓 Oracle 軟件包
#==============================================================#
正在靜默解壓縮 Oracle 軟件包,請稍等:
.---- -. -. . . . .
( .',----- - - ' ' ' __
\_/ ;--:- __--------------------___ ____=========_||___
__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
,_\___________'_|,L______],|______________________|_i,!________________!_i
/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
靜默解壓 Oracle 軟件安裝包: /soft/LINUX.X64_122010_db_home.zip
靜默解壓 Oracle 軟件補丁包: /soft/p33587128*.zip
靜默解壓 OJVM 軟件補丁包: /soft/p33561275*.zip
#==============================================================#
Oracle 安裝靜默文件
#==============================================================#
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
#==============================================================#
靜默安裝數據庫軟件
#==============================================================#
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 3342 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8180 MB Passed
Preparing 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:
/u01/app/oraInventory/logs/installActions2024-02-26_02-10-41PM.log
Prepare in progress.
.................................................. 8% Done.
Prepare successful.
Copy files in progress.
.................................................. 17% Done.
.................................................. 22% Done.
.................................................. 27% Done.
.................................................. 32% Done.
.................................................. 40% Done.
.................................................. 45% Done.
.................................................. 50% Done.
.................................................. 55% Done.
.................................................. 60% Done.
.................................................. 65% Done.
.................................................. 70% Done.
.................................................. 75% Done.
.................................................. 80% Done.
....................
Copy files successful.
Link binaries in progress.
..........
Link binaries successful.
Setup files in progress.
..............................
Setup files successful.
Setup Inventory in progress.
Setup Inventory successful.
Finish Setup successful.
The installation of Oracle Database 12c was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2024-02-26_02-10-41PM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 95% Done.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/12.2.0/db/root.sh
.................................................. 100% Done.
Successfully Setup Software.
#==============================================================#
執行 root 腳本
#==============================================================#
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
Check /u01/app/oracle/product/12.2.0/db/install/root_kylin_2024-02-26_14-16-02-420970283.log for the output of root script
#==============================================================#
Oracle 軟件安裝補丁
#==============================================================#
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-02-26_14-16-07PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-02-26_14-16-10PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 33587128
Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '33587128' to OH '/u01/app/oracle/product/12.2.0/db'
ApplySession: Optional component(s) [ oracle.swd, 12.2.0.1.0 ] , [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] , [ oracle.network.gsm, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.cclient, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.ons.eons.bwcompat, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.rdbms.util, 12.2.0.1.0...
Patching component oracle.rdbms, 12.2.0.1.0...
Patching component oracle.network.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Patching component oracle.ctx, 12.2.0.1.0...
Patching component oracle.has.common.cvu, 12.2.0.1.0...
Patching component oracle.ldap.owm, 12.2.0.1.0...
Patching component oracle.ldap.rsf, 12.2.0.1.0...
Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
Patching component oracle.oracore.rsf, 12.2.0.1.0...
Patching component oracle.oraolap, 12.2.0.1.0...
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
Patching component oracle.sdo, 12.2.0.1.0...
Patching component oracle.sdo.locator, 12.2.0.1.0...
Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...
Patching component oracle.tfa, 12.2.0.1.0...
Patching component oracle.ctx.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
Patching component oracle.rdbms.install.common, 12.2.0.1.0...
Patching component oracle.assistants.deconfig, 12.2.0.1.0...
Patching component oracle.ons.ic, 12.2.0.1.0...
Patching component oracle.rdbms.rman, 12.2.0.1.0...
Patching component oracle.precomp.rsf, 12.2.0.1.0...
Patching component oracle.install.deinstalltool, 12.2.0.1.0...
Patching component oracle.assistants.acf, 12.2.0.1.0...
Patching component oracle.rdbms.oci, 12.2.0.1.0...
Patching component oracle.sqlplus.ic, 12.2.0.1.0...
Patching component oracle.xdk.parser.java, 12.2.0.1.0...
Patching component oracle.dbtoolslistener, 12.2.0.1.0...
Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
Patching component oracle.rdbms.dv, 12.2.0.1.0...
Patching component oracle.rdbms.lbac, 12.2.0.1.0...
Patching component oracle.ons, 12.2.0.1.0...
Patching component oracle.ldap.client, 12.2.0.1.0...
Patching component oracle.xdk, 12.2.0.1.0...
Patching component oracle.xdk.rsf, 12.2.0.1.0...
Patching component oracle.sqlplus, 12.2.0.1.0...
Patching component oracle.assistants.server, 12.2.0.1.0...
Patching component oracle.rdbms.crs, 12.2.0.1.0...
Patching component oracle.precomp.common, 12.2.0.1.0...
Patching component oracle.precomp.lang, 12.2.0.1.0...
Patching component oracle.jdk, 1.8.0.91.0...
OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of '/u01/app/oracle/product/12.2.0/db/bin/extjobO': Operation not permitted
make: [ins_rdbms.mk:533: iextjob] Error 1 (ignored)
Patch 33587128 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-02-26_14-16-10PM_1.log
OPatch completed with warnings.
#==============================================================#
OJVM 補丁安裝
#==============================================================#
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-02-26_14-21-40PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2024, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.2.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/db/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-02-26_14-21-42PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 33561275
Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0/db')
Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '33561275' to OH '/u01/app/oracle/product/12.2.0/db'
Patching component oracle.javavm.server, 12.2.0.1.0...
Patching component oracle.javavm.server.core, 12.2.0.1.0...
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
Patching component oracle.javavm.client, 12.2.0.1.0...
Patching component oracle.rdbms, 12.2.0.1.0...
Patching component oracle.dbjava.jdbc, 12.2.0.1.0...
Patching component oracle.dbjava.ic, 12.2.0.1.0...
Patch 33561275 successfully applied.
Log file location: /u01/app/oracle/product/12.2.0/db/cfgtoollogs/opatch/opatch2024-02-26_14-21-42PM_1.log
OPatch succeeded.
#==============================================================#
Oracle 軟件版本
#==============================================================#
SQL*Plus: Release 12.2.0.1.0 Production
#==============================================================#
Oracle 補丁信息
#==============================================================#
33561275;OJVM RELEASE UPDATE 12.2.0.1.220118 (33561275)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)
OPatch succeeded.
#==============================================================#
配置監聽
#==============================================================#
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /u01/app/oracle/product/12.2.0/db/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/12.2.0/db/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
檢查監聽狀態:
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 26-FEB-2024 14:22:43
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=kylin)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 26-FEB-2024 14:22:42
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/kylin/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kylin)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
#==============================================================#
靜默建庫命令
#==============================================================#
dbca -silent -createDatabase \
-ignorePrereqFailure \
-templateName General_Purpose.dbc \
-responseFile NO_VALUE \
-gdbName lucifer \
-sid lucifer \
-sysPassword oracle \
-systemPassword oracle \
-redoLogFileSize 100 \
-datafileDestination /oradata \
-storageType FS \
-enableArchive true \
-archiveLogDest /oradata \
-databaseConfigType SINGLE \
-characterset AL32UTF8 \
-nationalCharacterSet AL16UTF16 \
-emConfiguration NONE \
-automaticMemoryManagement false \
-totalMemory 3342 \
-databaseType OLTP \
-createAsContainerDatabase false
#==============================================================#
創建數據庫
#==============================================================#
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Copying database files
1% complete
2% complete
18% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
44% complete
49% complete
50% complete
53% complete
55% complete
Completing Database Creation
56% complete
57% complete
58% complete
62% complete
65% complete
66% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/lucifer/lucifer.log" for further details.
#==============================================================#
配置在線重做日志
#==============================================================#
數據庫在線重做日志文件:
THREAD# GROUP# MEMBER size(M)
---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
1 1 /oradata/lucifer/redo01.log 100
1 2 /oradata/lucifer/redo02.log 100
1 3 /oradata/lucifer/redo03.log 100
1 11 /oradata/LUCIFER/onlinelog/o1_mf_11_lxrd527l_.log 100
1 12 /oradata/LUCIFER/onlinelog/o1_mf_12_lxrd529w_.log 100
1 13 /oradata/LUCIFER/onlinelog/o1_mf_13_lxrd52d9_.log 100
1 14 /oradata/LUCIFER/onlinelog/o1_mf_14_lxrd52gd_.log 100
1 15 /oradata/LUCIFER/onlinelog/o1_mf_15_lxrd52ld_.log 100
#==============================================================#
配置 RMAN 備份任務
#==============================================================#
## OracleBegin
00 02 * * * /home/oracle/scripts/del_arch.sh
#00 00 * * 0 /home/oracle/scripts/dbbackup_lv0.sh
#00 00 * * 1,2,3,4,5,6 /home/oracle/scripts/dbbackup_lv1.sh
#==============================================================#
配置 glogin.sql
#==============================================================#
define _editor=vi
set serveroutput on size 1000000
set pagesize 9999
set long 99999
set trimspool on
col name format a80
set termout off
define gname=idle
column global_name new_value gname
select lower(user) || '@' || substr( global_name, 1, decode( dot, 0, length(global_name), dot-1) ) global_name from (select global_name, instr(global_name,'.') dot from global_name );
ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
set sqlprompt '&gname _DATE> '
set termout on
#==============================================================#
優化數據庫參數
#==============================================================#
數據庫參數:
NAME SID SPVALUE VALUE
-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
_b_tree_bitmap_plans * FALSE FALSE
_datafile_write_errors_crash_instance * FALSE FALSE
audit_file_dest * /u01/app/oracle/admin/lucifer/adump /u01/app/oracle/admin/lucifer/adump
audit_trail * NONE DB
compatible * 12.2.0 12.2.0
control_file_record_keep_time * 31 31
db_block_size * 8192 8192
db_create_file_dest * /oradata /oradata
db_file_multiblock_read_count * 128
db_files * 5000 200
db_name * lucifer lucifer
db_writer_processes * 1
deferred_segment_creation * FALSE FALSE
diagnostic_dest * /u01/app/oracle /u01/app/oracle
dispatchers * (PROTOCOL=TCP) (SERVICE=luciferXDB) (PROTOCOL=TCP) (SERVICE=luciferXDB)
event * 10949 trace name context forever,level 1
event * 28401 trace name context forever,level 1
fast_start_parallel_rollback * LOW
log_archive_dest_1 * location=/oradata/archivelog location=/oradata/archivelog
log_archive_format * %t_%s_%r.dbf %t_%s_%r.dbf
max_dump_file_size * unlimited
max_string_size * STANDARD
nls_language * AMERICAN AMERICAN
nls_territory * AMERICA AMERICA
open_cursors * 1000 300
optimizer_adaptive_plans * TRUE
optimizer_adaptive_statistics * FALSE
optimizer_index_caching * 0
optimizer_mode * ALL_ROWS
parallel_force_local * FALSE
parallel_max_servers * 64 64
pga_aggregate_target * 1120927744 701497344
processes * 2000 640
remote_login_passwordfile * EXCLUSIVE EXCLUSIVE
session_cached_cursors * 300 50
sessions * 984
sga_max_size * 4485808128 2818572288
sga_target * 4485808128 2818572288
spfile * /u01/app/oracle/product/12.2.0/db/dbs/spfilelucifer.ora
statistics_level * TYPICAL
undo_retention * 10800 900
恭喜!Oracle 單機安裝成功,現在是否重啟主機:[Y/N] Y
最后修改時間:2026-03-23 16:51:39
「喜歡這篇文章,您的關注和贊賞是給作者最好的鼓勵」
關注作者
【版權聲明】本文為墨天輪用戶原創內容,轉載時必須標注文章的來源(墨天輪),文章鏈接,文章作者等基本信息,否則作者和墨天輪有權追究責任。如果您發現墨天輪中有涉嫌抄襲或者侵權的內容,歡迎發送郵件至:contact@modb.pro進行舉報,并提供相關證據,一經查實,墨天輪將立刻刪除相關內容。




