oracle 18c on oel7 单实例安装软件

1.解压

18c安装db软件的时候,直接将下载的zip包使用oracle用户将安装包解压到ORACLE_HOME.
最小化安装的oel没有解压命令,解压之前还需要安装unzip。同时缺少图形化相关的系统包。先安装所需要的系统包:

[[email protected] software]# yum -y install unzip
[[email protected] software]# yum -y install xdpyinfo

开始安装db软件

[[email protected] ~]# yum -y install unzip
[[email protected] ~]# su - oracle
[[email protected] ~]$ cd /u01/software/
[[email protected] software]$ ll
total 5235652
-rwxrwxr-x. 1 oracle oinstall 4564649047 Mar 12 17:10 LINUX.X64_180000_db_home.zip
-rwxrwxr-x. 1 oracle oinstall  685006415 Mar 12 17:08 p28822489_180000_Linux-x86-64.zip
-rwxrwxr-x. 1 oracle oinstall  111648507 Mar 12 17:07 p6880880_180000_Linux-x86-64.zip
[[email protected] software]$ unzip LINUX.X64_180000_db_home.zip -d /u01/oracle/product/db18c/
[[email protected] software]$ cd /u01/oracle/
[[email protected] oracle]$ du -sh *
8.8G    product
[[email protected] oracle]$ cd /u01/oracle/product/db18c/
[[email protected] db18c]$ export  DISPLAY=192.168.150.1:0.0
[[email protected] db18c]$ ./runInstaller 

2.安装db软件

  1. 只安装软件
    oracle 18c on oel7 单实例安装软件
  2. 单实例
    oracle 18c on oel7 单实例安装软件
  3. 企业版
    oracle 18c on oel7 单实例安装软件
  4. 安装路径
    这里之前按文档特地没有配置ORACLE_BASE,ORACLE_HOME等环境变量。但是这里可能由于直接解压到了相关目录,也识别到了。
    oracle 18c on oel7 单实例安装软件
  5. 清单目录
    oracle 18c on oel7 单实例安装软件
  6. 选择组

key management和rac没有用到,若是有需要的,则还要创建相关的组。oracle 18c on oel7 单实例安装软件

  1. 安装前检查
    忽略swap大小的检查oracle 18c on oel7 单实例安装软件
    oracle 18c on oel7 单实例安装软件
    点击yes确认
  2. 安装清单
    oracle 18c on oel7 单实例安装软件
  3. 开始安装
    oracle 18c on oel7 单实例安装软件
    执行root脚本后点ok
    oracle 18c on oel7 单实例安装软件
  4. 完成
    oracle 18c on oel7 单实例安装软件

3.安装后配置

  1. 设置环境变量
    官方文档里安装软件前不让配置这些环境变量,原因没有太详细去查看。在其他环境安装的时候,在设置了环境变量的前提下也能正常安装。这里在安装完成后补充。
[[email protected] ~]$ vi .bash_profile 
if [ -t 0 ]; then
stty intr ^C
fi
export ORACLE_SID=regan
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=/u01/oracle/product/db18c
export PATH=$PATH:$ORACLE_HOME/bin
[[email protected] ~]$ . .bash_profile 
[[email protected] ~]$ sqlplus -v

SQL*Plus: Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
  1. 安装补丁
[[email protected] ~]$ cd /u01/software/
[[email protected] software]$ ll
total 777984
-rwxrwxr-x. 1 oracle oinstall 685006415 Mar 12 17:08 p28822489_180000_Linux-x86-64.zip
-rwxrwxr-x. 1 oracle oinstall 111648507 Mar 12 17:07 p6880880_180000_Linux-x86-64.zip
[[email protected] software]$ unzip p6880880_180000_Linux-x86-64.zip -d $ORACLE_HOME
Archive:  p6880880_180000_Linux-x86-64.zip
replace /u01/oracle/product/db18c/OPatch/opatchprereqs/oui/knowledgesrc.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
[[email protected] software]$ unzip p28822489_180000_Linux-x86-64.zip 
[[email protected] software]$ cd 28822489/
[[email protected] 28822489]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/db18c
Central Inventory : /u01/oraInventory
   from           : /u01/oracle/product/db18c/oraInst.loc
OPatch version    : 12.2.0.1.16
OUI version       : 12.2.0.4.0
Log file location : /u01/oracle/product/db18c/cfgtoollogs/opatch/opatch2019-03-13_10-43-01AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser----少命令,需要安装
UtilSession failed: 
Prerequisite check "CheckSystemCommandAvailable" failed.
Log file location: /u01/oracle/product/db18c/cfgtoollogs/opatch/opatch2019-03-13_10-43-01AM_1.log

OPatch failed with error code 73
[[email protected] 28822489]$ yum search fuser
Loaded plugins: ulninfo
========================================================== Matched: fuser ==========================================================
psmisc.x86_64 : Utilities for managing processes on your system
[[email protected] sysctl.d]# yum -y install psmisc ----root用户安装
[[email protected] 28822489]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/db18c
Central Inventory : /u01/oraInventory
   from           : /u01/oracle/product/db18c/oraInst.loc
OPatch version    : 12.2.0.1.16
OUI version       : 12.2.0.4.0
Log file location : /u01/oracle/product/db18c/cfgtoollogs/opatch/opatch2019-03-13_10-49-41AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   28822489  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/oracle/product/db18c')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '28822489' to OH '/u01/oracle/product/db18c'
ApplySession: Optional component(s) [ oracle.assistants.asm, 18.0.0.0.0 ] , [ oracle.net.cman, 18.0.0.0.0 ] , [ oracle.ons.daemon, 18.0.0.0.0 ] , [ oracle.tfa, 18.0.0.0.0 ] , [ oracle.crs, 18.0.0.0.0 ] , [ oracle.network.cman, 18.0.0.0.0 ] , [ oracle.assistants.usm, 18.0.0.0.0 ] , [ oracle.assistants.server.oui, 18.0.0.0.0 ] , [ oracle.has.crs, 18.0.0.0.0 ]  not present in the Oracle Home or a higher version is found.
…………过程略
Patch 28822489 successfully applied.
Sub-set patch [28090523] has become inactive due to the application of a super-set patch [28822489].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/oracle/product/db18c/cfgtoollogs/opatch/opatch2019-03-13_10-49-41AM_1.log

OPatch succeeded.
[[email protected] 28822489]$ $ORACLE_HOME/OPatch/opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/db18c
Central Inventory : /u01/oraInventory
   from           : /u01/oracle/product/db18c/oraInst.loc
OPatch version    : 12.2.0.1.16
OUI version       : 12.2.0.4.0
Log file location : /u01/oracle/product/db18c/cfgtoollogs/opatch/opatch2019-03-13_10-54-25AM_1.log

Lsinventory Output file location : /u01/oracle/product/db18c/cfgtoollogs/opatch/lsinv/lsinventory2019-03-13_10-54-25AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oel7101
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1): 

Oracle Database 18c                                                  18.0.0.0.0
There are 1 products installed in this Oracle Home.


Interim patches (4) :

Patch  28822489     : applied on Wed Mar 13 10:52:18 CST 2019
Unique Patch ID:  22669539
Patch description:  "Database Release Update : 18.5.0.0.190115 (28822489)"
   Created on 18 Dec 2018, 22:44:52 hrs PST8PDT
………………
[[email protected] 28822489]$ sqlplus -v

SQL*Plus: Release 18.0.0.0.0 - Production
Version 18.5.0.0.0

至此软件和补丁已安装完成。
dbca建库和之前版本差不多,就不再赘述了。