技术博客
Oracle一键安装
Oracle 一键安装脚本,演示 Redhat 9.3 一键安装 Oracle 19C 19.21 单机版过程(全程无需人工干预):(脚本包括 ORALCE PSU/OJVM 等补丁自动安装)
⭐️ 脚本下载地址:Shell脚本安装Oracle数据库
脚本第三代支持 N 节点一键安装,不限制节点数!
image.png
# 主机版本[root@rhel9:/root]$ cat /etc/redhat-release Red Hat Enterprise Linux release 9.3 (Plow)# 网络信息[root@rhel9:/root]$ ip a2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:0c:29:54:f6:b8 brd ff:ff:ff:ff:ff:ff altname enp11s0 inet 192.168.6.155/24 brd 192.168.6.255 scope global noprefixroute ens192 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe54:f6b8/64 scope link noprefixroute valid_lft forever preferred_lft forever# 挂载本地 ISO 镜像[root@rhel9:/root]$ mount | grep iso | grep -v "/run/media"/dev/sr0 on /mnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)[root@rhel9:/root]$ df -h|grep /mnt/dev/sr0 9.9G 9.9G 0 100% /mnt# 安装包存放在 /soft 目录下[root@lucifer ~]# cd /soft/[root@rhel9:/soft]$ ll-rwx------. 1 oracle oinstall 3059705302 Nov 9 11:33 LINUX.X64_193000_db_home.zip-rwxr-xr-x. 1 oracle oinstall 162550 Nov 9 13:16 OracleShellInstall-rwxr-xr-x. 1 oracle oinstall 1815725977 Nov 9 11:31 p35643107_190000_Linux-x86-64.zip-rwxr-xr-x. 1 oracle oinstall 127350205 Nov 9 11:31 p35648110_190000_Linux-x86-64.zip-rwxr-xr-x. 1 oracle oinstall 127774864 Nov 9 11:31 p6880880_190000_Linux-x86-64.zip默认使用专业版脚本。脚本下载:ora100.com/shell-install 确保安装环境准备完成后,即可执行一键安装。
使用标准生产环境安装参数:
# 根据脚本 README 或者 -h 命令提示,编辑好一键安装命令,进入 /soft 目录执行安装:./OracleShellInstall -lf ens192 `# local ip ifname`\-n rhel9 `# hostname`\-op oracle `# oracle password`\-d /u01 `# software base dir`\-ord /oradata `# data dir`\-o oradb `# dbname`\-dp oracle `# sys/system password`\-ds AL32UTF8 `# database character`\-ns AL16UTF16 `# national character`\-pdb lucifer `# pdb name`\-redo 200 `# redo size`\-opa 35643107 `# oracle PSU/RU`\-jpa 35648110 `# OJVM PSU/RU`\-opd Y `# optimize db`默认使用专业版脚本。脚本下载:ora100.com/shell-install
选择需要安装的模式以及版本,即可开始安装:
███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██ ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██ ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██ ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███ ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░ 请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : si数据库安装模式: single 请选择数据库版本 [11/12/19/21] : 19数据库版本: 19 #==============================================================# 配置本地 YUM 源 #==============================================================# [BaseOS]name=BaseOSbaseurl=file:///mnt/BaseOSenabled=1gpgcheck=0[AppStream]name=AppStreambaseurl=file:///mnt/AppStreamenabled=1gpgcheck=0#==============================================================# 禁用防火墙 #==============================================================# ○ firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; preset: enabled) Active: inactive (dead) Docs: man:firewalld(1)Nov 09 11:27:14 rhel9 systemd[1]: Starting firewalld - dynamic firewall daemon...Nov 09 11:27:16 rhel9 systemd[1]: Started firewalld - dynamic firewall daemon.Nov 09 13:17:22 rhel9 systemd[1]: Stopping firewalld - dynamic firewall daemon...Nov 09 13:17:23 rhel9 systemd[1]: firewalld.service: Deactivated successfully.Nov 09 13:17:23 rhel9 systemd[1]: Stopped firewalld - dynamic firewall daemon.#==============================================================# 禁用 SELinux #==============================================================# SELinux status: enabledSELinuxfs mount: /sys/fs/selinuxSELinux root directory: /etc/selinuxLoaded policy name: targetedCurrent mode: permissiveMode from config file: disabledPolicy MLS status: enabledPolicy deny_unknown status: allowedMemory protection checking: actual (secure)Max kernel policy version: 33#==============================================================# YUM 静默安装依赖包 #==============================================================# bc-1.07.1-14.el9.x86_64binutils-2.35.2-42.el9.x86_64package compat-libcap1 is not installedgcc-11.4.1-2.1.el9.x86_64gcc-c++-11.4.1-2.1.el9.x86_64elfutils-libelf-0.189-3.el9.x86_64elfutils-libelf-devel-0.189-3.el9.x86_64glibc-2.34-83.el9_3.7.x86_64glibc-devel-2.34-83.el9_3.7.x86_64libaio-0.3.111-13.el9.x86_64libaio-devel-0.3.111-13.el9.x86_64libgcc-11.4.1-2.1.el9.x86_64libstdc++-11.4.1-2.1.el9.x86_64libstdc++-devel-11.4.1-2.1.el9.x86_64libxcb-1.13.1-9.el9.x86_64libX11-1.7.0-8.el9.x86_64libXau-1.0.9-8.el9.x86_64libXi-1.7.10-8.el9.x86_64libXrender-0.9.10-16.el9.x86_64make-4.3-7.el9.x86_64net-tools-2.0-0.62.20160912git.el9.x86_64smartmontools-7.2-7.el9.x86_64sysstat-12.5.4-7.el9.x86_64e2fsprogs-1.46.5-3.el9.x86_64e2fsprogs-libs-1.46.5-3.el9.x86_64unzip-6.0-56.el9.x86_64openssh-clients-8.7p1-34.el9.x86_64readline-8.1-4.el9.x86_64readline-devel-8.1-4.el9.x86_64psmisc-23.4-3.el9.x86_64ksh-1.0.0~beta.1-3.el9.x86_64nfs-utils-2.5.4-20.el9.x86_64tar-1.34-6.el9_1.x86_64device-mapper-multipath-0.8.7-22.el9.x86_64avahi-0.8-15.el9.x86_64package ntp is not installedchrony-4.3-1.el9.x86_64libXtst-1.2.3-16.el9.x86_64libXrender-devel-0.9.10-16.el9.x86_64fontconfig-devel-2.14.0-2.el9_1.x86_64policycoreutils-3.5-2.el9.x86_64package policycoreutils-python is not installedlibrdmacm-46.0-1.el9.x86_64package libnsl* is not installedlibibverbs-46.0-1.el9.x86_64package compat-openssl10 is not installedpolicycoreutils-python-utils-3.5-2.el9.noarch#==============================================================# 配置主机名 #==============================================================# rhel9#==============================================================# 配置 /etc/hosts 文件 #==============================================================# 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6## OracleBegin## Public IP192.168.6.155 rhel9#==============================================================# 创建用户和组 #==============================================================# oracle 用户: uid=54321(oracle) gid=54321(oinstall) groups=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; preset: enabled) Active: inactive (dead)TriggeredBy: ○ avahi-daemon.socketNov 09 11:27:17 rhel9 avahi-daemon[958]: Registering new address record for fe80::20c:29ff:fe54:f6b8 on ens192.*.Nov 09 13:18:36 rhel9 systemd[1]: Stopping Avahi mDNS/DNS-SD Stack...Nov 09 13:18:36 rhel9 avahi-daemon[958]: Got SIGTERM, quitting.Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface ens192.IPv6 with address fe80::20c:29ff:fe54:f6b8.Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface ens192.IPv4 with address 192.168.6.155.Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface lo.IPv6 with address ::1.Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.Nov 09 13:18:36 rhel9 avahi-daemon[958]: avahi-daemon 0.8 exiting.Nov 09 13:18:36 rhel9 systemd[1]: avahi-daemon.service: Deactivated successfully.Nov 09 13:18:36 rhel9 systemd[1]: Stopped Avahi mDNS/DNS-SD Stack.#==============================================================# 配置透明大页 && NUMA && 磁盘 IO 调度器 #==============================================================# args="ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"-resume=/dev/mapper/rhel-swap-args="roargs="ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"-elevator=deadline"-transparent_hugepage=never#==============================================================# 配置 sysctl.conf #==============================================================# fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 4090819kernel.shmmax = 16755998719kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576vm.min_free_kbytes = 65453net.ipv4.conf.ens192.rp_filter = 1vm.swappiness = 10kernel.panic_on_oops = 1kernel.randomize_va_space = 2kernel.numa_balancing = 0#==============================================================# 配置 RemoveIPC #==============================================================# [Login]RemoveIPC=no#==============================================================# 配置 /etc/security/limits.conf 和 /etc/pam.d/login #==============================================================# 查看 /etc/security/limits.conf: oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768oracle soft nproc 2047oracle hard nproc 16384oracle hard memlock unlimitedoracle soft memlock unlimited查看 /etc/pam.d/login 文件: auth substack system-authauth include postloginaccount required pam_nologin.soaccount include system-authpassword include system-authsession required pam_selinux.so closesession required pam_loginuid.sosession required pam_selinux.so opensession required pam_namespace.sosession optional pam_keyinit.so force revokesession include system-authsession include postlogin-session optional pam_ck_connector.sosession required pam_limits.sosession required /lib64/security/pam_limits.so#==============================================================# 配置 /dev/shm #==============================================================# /dev/mapper/rhel-root / xfs defaults 0 0UUID=1e070be2-6168-4b31-b206-56fd68e17cf9 /boot xfs defaults 0 0UUID=E354-7851 /boot/efi vfat umask=0077,shortname=winnt 0 2/dev/mapper/rhel-swap none swap defaults 0 0tmpfs /dev/shm tmpfs size=16363280k 0 0#==============================================================# Root 用户环境变量 #==============================================================# if [ -f ~/.bashrc ]; then . ~/.bashrcfialias so='su - oracle'export PS1="[`whoami`@`hostname`:"'$PWD]$ '#==============================================================# Oracle 用户环境变量 #==============================================================# if [ -f ~/.bashrc ]; then . ~/.bashrcfiumask 022export TMP=/tmpexport TMPDIR=$TMPexport NLS_LANG=AMERICAN_AMERICA.AL32UTF8export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbexport ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/adminexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport ORACLE_SID=oradbexport PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATHexport PERL5LIB=$ORACLE_HOME/perl/libalias 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=OL7stty erase ^H#==============================================================# 静默解压 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_193000_db_home.zip 静默解压 OPatch 软件补丁包: /soft/p6880880_*.zip 静默解压 OJVM 软件补丁包: /soft/p35648110*.zip #==============================================================# Oracle 安装静默文件 #==============================================================# oracle.install.option=INSTALL_DB_SWONLYUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/u01/app/oraInventoryORACLE_BASE=/u01/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=operoracle.install.db.OSBACKUPDBA_GROUP=backupdbaoracle.install.db.OSDGDBA_GROUP=dgdbaoracle.install.db.OSKMDBA_GROUP=kmdbaoracle.install.db.OSRACDBA_GROUP=racdbaoracle.install.db.rootconfig.executeRootScript=falseoracle.install.db.rootconfig.configMethod=oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0#==============================================================# 静默安装数据库软件 #==============================================================# Preparing the home to patch...Applying the patch /soft/35643107...Successfully applied the patch.The log can be found at: /tmp/InstallActions2023-11-09_01-19-57PM/installerPatchActions_2023-11-09_01-19-57PM.logLaunching Oracle Database Setup Wizard...[WARNING] [INS-13014] Target environment does not meet some optional requirements. CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2023-11-09_01-19-57PM.log ACTION: Identify the list of failed prerequisite checks from the log: installActions2023-11-09_01-19-57PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.The response file for this session can be found at: /u01/app/oracle/product/19.3.0/db/install/response/db_2023-11-09_01-19-57PM.rspYou can find the log of this install session at: /tmp/InstallActions2023-11-09_01-19-57PM/installActions2023-11-09_01-19-57PM.logAs a root user, execute the following script(s): 1. /u01/app/oraInventory/orainstRoot.sh 2. /u01/app/oracle/product/19.3.0/db/root.shExecute /u01/app/oraInventory/orainstRoot.sh on the following nodes: [rhel9]Execute /u01/app/oracle/product/19.3.0/db/root.sh on the following nodes: [rhel9]Successfully Setup Software with warning(s).Moved the install session logs to: /u01/app/oraInventory/logs/InstallActions2023-11-09_01-19-57PM#==============================================================# 执行 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/19.3.0/db/install/root_rhel9_2023-11-09_13-38-03-210893122.log for the output of root script#==============================================================# OJVM 补丁安装 #==============================================================# stty: 'standard input': Inappropriate ioctl for deviceOracle Interim Patch Installer version 12.2.0.1.40Copyright (c) 2023, Oracle Corporation. All rights reserved.PREREQ sessionOracle Home : /u01/app/oracle/product/19.3.0/dbCentral Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.3.0/db/oraInst.locOPatch version : 12.2.0.1.40OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-11-09_13-38-06PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.Oracle Interim Patch Installer version 12.2.0.1.40Copyright (c) 2023, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbCentral Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.3.0/db/oraInst.locOPatch version : 12.2.0.1.40OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-11-09_13-38-22PM_1.logVerifying environment and performing prerequisite checks...OPatch continues with these patches: 35648110 Do you want to proceed? [y|n]Y (auto-answered by -silent)User Responded with: YAll checks passed.Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.(Oracle Home = '/u01/app/oracle/product/19.3.0/db')Is the local system ready for patching? [y|n]Y (auto-answered by -silent)User Responded with: YBacking up files...Applying interim patch '35648110' to OH '/u01/app/oracle/product/19.3.0/db'Patching component oracle.javavm.server, 19.0.0.0.0...Patching component oracle.javavm.server.core, 19.0.0.0.0...Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...Patching component oracle.rdbms, 19.0.0.0.0...Patching component oracle.javavm.client, 19.0.0.0.0...Patch 35648110 successfully applied.Log file location: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-11-09_13-38-22PM_1.logOPatch succeeded.#==============================================================# Oracle 软件版本 #==============================================================# SQL*Plus: Release 19.0.0.0.0 - ProductionVersion 19.21.0.0.0#==============================================================# Oracle 补丁信息 #==============================================================# 35648110;OJVM RELEASE UPDATE: 19.21.0.0.231017 (35648110)35643107;Database Release Update : 19.21.0.0.231017 (35643107)29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)OPatch succeeded.#==============================================================# 配置监听 #==============================================================# Parsing command line arguments: Parameter "silent" = true Parameter "responsefile" = /u01/app/oracle/product/19.3.0/db/assistants/netca/netca.rspDone parsing command line arguments.Oracle Net Services Configuration:Profile configuration complete.Oracle Net Listener Startup: Running Listener Control: /u01/app/oracle/product/19.3.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 19.0.0.0.0 - Production on 09-NOV-2023 13:40:31Copyright (c) 1991, 2023, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel9)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 19.0.0.0.0 - ProductionStart Date 09-NOV-2023 13:40:30Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/19.3.0/db/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/rhel9/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel9)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))The listener supports no servicesThe command completed successfully#==============================================================# 静默建库命令 #==============================================================# dbca -silent -createDatabase \-ignorePrereqFailure \-templateName General_Purpose.dbc \-responseFile NO_VALUE \-gdbName oradb \-sid oradb \-sysPassword oracle \-systemPassword oracle \-redoLogFileSize 200 \-datafileDestination /oradata \-storageType FS \-enableArchive true \-archiveLogDest /oradata \-databaseConfigType SINGLE \-characterset AL32UTF8 \-nationalCharacterSet AL16UTF16 \-emConfiguration NONE \-automaticMemoryManagement false \-totalMemory 7989 \-databaseType OLTP \-createAsContainerDatabase true #==============================================================# 创建数据库 #==============================================================# [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.Prepare for db operation10% completeCopying database files40% completeCreating and starting Oracle instance42% complete46% complete52% complete56% complete60% completeCompleting Database Creation66% complete 69% complete70% completeExecuting Post Configuration Actions100% completeDatabase creation complete. For details check the logfiles at: /u01/app/oracle/cfgtoollogs/dbca/oradb.Database Information:Global Database Name:oradbSystem Identifier(SID):oradbLook at the log file "/u01/app/oracle/cfgtoollogs/dbca/oradb/oradb.log" for further details.stty: 'standard input': Inappropriate ioctl for device#==============================================================# 创建 PDB 数据库 #==============================================================# 正在创建 PDB:lucifer stty: 'standard input': Inappropriate ioctl for devicestty: 'standard input': Inappropriate ioctl for device CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 LUCIFER READ WRITE NO#==============================================================# 配置在线重做日志 #==============================================================# stty: 'standard input': Inappropriate ioctl for device数据库在线重做日志文件: stty: 'standard input': Inappropriate ioctl for device THREAD# GROUP# MEMBER size(M)---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ---------- 1 1 /oradata/ORADB/redo01.log 200 1 2 /oradata/ORADB/redo02.log 200 1 3 /oradata/ORADB/redo03.log 200 1 11 /oradata/ORADB/onlinelog/o1_mf_11_lnryoff2_.log 200 1 12 /oradata/ORADB/onlinelog/o1_mf_12_lnryofjv_.log 200 1 13 /oradata/ORADB/onlinelog/o1_mf_13_lnryofpv_.log 200 1 14 /oradata/ORADB/onlinelog/o1_mf_14_lnryofw2_.log 200 1 15 /oradata/ORADB/onlinelog/o1_mf_15_lnryohcg_.log 200#==============================================================# 配置 RMAN 备份任务 #==============================================================# ## OracleBegin00 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=viset serveroutput on size 1000000set pagesize 9999set long 99999set trimspool oncol name format a80set termout offdefine gname=idlecolumn global_name new_value gnameselect 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#==============================================================# 优化数据库参数 #==============================================================# stty: 'standard input': Inappropriate ioctl for device数据库参数: stty: 'standard input': Inappropriate ioctl for deviceNAME SID SPVALUE VALUE-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------_b_tree_bitmap_plans * FALSE FALSE_datafile_write_errors_crash_instance * FALSE FALSEaudit_file_dest * /u01/app/oracle/admin/oradb/adump /u01/app/oracle/admin/oradb/adumpaudit_trail * NONE DBcompatible * 19.0.0 19.0.0control_file_record_keep_time * 31 31db_block_size * 8192 8192db_create_file_dest * /oradata /oradatadb_file_multiblock_read_count * 128db_files * 5000 200db_name * oradb oradbdb_writer_processes * 1deferred_segment_creation * FALSE FALSEdiagnostic_dest * /u01/app/oracle /u01/app/oracledispatchers * (PROTOCOL=TCP) (SERVICE=oradbXDB) (PROTOCOL=TCP) (SERVICE=oradbXDB)enable_pluggable_database * true TRUEevent * 10949 trace name context forever,level 1event * 28401 trace name context forever,level 1fast_start_parallel_rollback * LOWlog_archive_dest_1 * location=/oradata/archivelog location=/oradata/archiveloglog_archive_format * %t_%s_%r.dbf %t_%s_%r.dbfmax_dump_file_size * unlimitedmax_string_size * STANDARDnls_language * AMERICAN AMERICANnls_territory * AMERICA AMERICAopen_cursors * 1000 300optimizer_adaptive_plans * TRUEoptimizer_adaptive_statistics * FALSEoptimizer_index_caching * 0optimizer_mode * ALL_ROWSparallel_force_local * FALSEparallel_max_servers * 64 64pga_aggregate_target * 2680160256 1675624448processes * 2000 640remote_login_passwordfile * EXCLUSIVE EXCLUSIVEsession_cached_cursors * 300 50sessions * 984sga_max_size * 10723786752 6710886400sga_target * 10723786752 6710886400spfile * /u01/app/oracle/product/19.3.0/db/dbs/spfileoradb.orastatistics_level * TYPICALundo_retention * 10800 900恭喜!Oracle 单机安装成功,现在是否重启主机:[Y/N] Y正在重启 ...... 重启数据库后,连接数据库:
[oracle@rhel9:/home/oracle]$ sasSQL*Plus: Release 19.0.0.0.0 - Production on Thu Nov 9 14:24:51 2023Version 19.21.0.0.0Copyright (c) 1982, 2022, Oracle. All rights reserved.Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.21.0.0.0sys@ORADB 2023-11-09 14:24:51> show parameter nameNAME TYPE VALUE------------------------------------ ----------- ------------------------------cdb_cluster_name stringcell_offloadgroup_name stringdb_file_name_convert stringdb_name string oradbdb_unique_name string oradbglobal_names boolean FALSEinstance_name string oradblock_name_space stringlog_file_name_convert stringpdb_file_name_convert stringprocessor_group_name stringservice_names string oradbsys@ORADB 2023-11-09 14:24:58> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 LUCIFER READ WRITE NO查看补丁版本:
[oracle@rhel9:/home/oracle]$ opatch lspatches35648110;OJVM RELEASE UPDATE: 19.21.0.0.231017 (35648110)35643107;Database Release Update : 19.21.0.0.231017 (35643107)29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)OPatch succeeded.