一、认证检查
根据文档Certification Information for Oracle Database on Linux x86-64 (Doc ID 1304727.2) ,11.2.0.4针对Oracle Linux 8 and Red Hat Enterprise Linux 8新增了认证。
二、操作系统要求
参考文档:
Supported Red Hat Enterprise Linux 8 Distributions for x86-64 for Oracle Database
Item | Requirements |
---|---|
SSH Requirement | Ensure that OpenSSH is installed on your servers. OpenSSH is the required SSH software. |
Red Hat Enterprise Linux 8 | Minimum supported distribution:Red Hat Enterprise Linux 8.2: 4.18.0-348.12.2.el8_5.x86_64 or later |
Red Hat Enterprise Linux 8.2: 4.18.0-348.12.2.el8_5.x86_64 or later | Install the latest released versions of the following packages: bc binutils compat-openssl10 elfutils-libelf glibc glibc-devel ksh libaio libXrender libX11 libXau libXi libXtst libgcc libnsl libstdc++ libxcb libibverbs make policycoreutils policycoreutils-python-utils smartmontools sysstat |
安装环境检查:
[root@linux8 ~]# uname -a
Linux linux8 4.18.0-240.el8.x86_64 #1 SMP Wed Sep 23 05:13:10 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@linux8 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.3 (Ootpa)
[root@linux8 ~]#
[root@linux8 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 9.6M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/rhel-root 20G 4.7G 16G 24% /
/dev/mapper/rhel-home 172G 16G 156G 9% /u01
/dev/nvme0n1p1 1014M 221M 794M 22% /boot
tmpfs 794M 1.2M 793M 1% /run/user/42
tmpfs 794M 0 794M 0% /run/user/0
[root@linux8 ~]#
[root@linux8 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.31.83 linux8
[root@linux8 ~]#
三、操作系统配置
其余操作系统级别必要的配置请参考官方文档,这里不再赘述。
3.1 安装软件包
3.1.1 本地yum源配置参考如下
[root@linux8 ~]# mount /dev/cdrom /mnt/
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@linux8 ~]#
[root@linux8 ~]# cat /etc/yum.repos.d/linux8.repo
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
enbaled=1
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
enabled=1
[root@linux8 ~]#
3.1.2 安装软件包
因为有的包安装被忽略,所以最终进行多次安装。这里安装不全的话,图形化安装检测的时候也能提示出来。
yum install -y psmisc binutils compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat openssh-clients compat-libcap1 xorg-x11-utils xorg-x11-xauth elfutils unixODBC unixODBC-devel libXp elfutils-libelf elfutils-libelf-devel smartmontools glibc-headers
yum install -y bc binutils compat-openssl10 elfutils-libelf glibc glibc-devel ksh libaio libXrender libX11 libXau libXi libXtst libgcc libnsl libstdc++ libxcb libibverbs make policycoreutils policycoreutils-python-utils smartmontools sysstat
yum install -y gcc gcc-c++ libaio-devel elfutils-libelf-devel libstdc++-devel pdksh
四、安装过程
4.1 安装db soft
安装检测过程中问题:
根据官方文档说明,这两个包可以忽略。
但是因为我本地有如下包,也选择了安装。
compat-libstdc+±33-3.2.3-72.el7.x86_64.rpm
pdksh-5.2.14-37.el5.x86_64.rpm
官方文档截图如下:
link过程中问题:
安装到86%的时候,ins_precomp.mk link报错。
根据官方文档说明,link报错全部忽略,点击continue后,后面提示的报错也全部continue,最终安装完成。
官方文档截图如下:
4.2 应用DBPSU 11.2.0.4.220118
安装opatch,应用PSU
[oracle@linux8 soft]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@linux8 soft]$ unzip p33477185_112040_Linux-x86-64.zip
[oracle@linux8 soft]$ cd 33477185/
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
opatch apply
根据官方文档,出现任何link失败的问题,先忽略。
安装过程relink报错如下:
The following make actions have failed :
Re-link fails on target "iamdu".
Re-link fails on target "ikfod".
Re-link fails on target "irenamedg".
Re-link fails on target "ikfed".
Re-link fails on target "ioracle".
Re-link fails on target "e2eme".
Re-link fails on target "irman".
Re-link fails on target "proc".
Re-link fails on target "jox_refresh_knlopt ioracle".
Re-link fails on target "iemtgtctl".
Re-link fails on target "ikgmgr".
Re-link fails on target "patchset_opt_all jox_refresh_knlopt ioracle".
Re-link fails on target "iimp".
Re-link fails on target "iexp".
Re-link fails on target "ldapaddmt".
Re-link fails on target "ldapadd".
Re-link fails on target "ldapmodify".
Re-link fails on target "ldapmodifymt".
Re-link fails on target "idgmgrl".
Re-link fails on target "ilsnrctl".
Re-link fails on target "itnslsnr".
Re-link fails on target "nmosudo".
Re-link fails on target "emdctl".
Re-link fails on target "agent".
Re-link fails on target "iplshprof".
Re-link fails on target "idg4pwd".
Re-link fails on target "isetasmgid".
Do you want to proceed? [y|n]
y
User Responded with: Y
Composite patch 33477185 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2022-12-22_16-39-47PM_1.log
OPatch completed with warnings.
[oracle@linux8 33477185]$
4.3 应用one-off patch 33991024
The one-off patch 33991024 will take care of the database linking errors and DBPSU 11.2.0.4.220118 patch warnings.
[oracle@linux8 soft]$ unzip p33991024_11204220118_Generic.zip
[oracle@linux8 soft]$ cd 33991024/
[oracle@linux8 soft]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
[oracle@linux8 33991024]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.39
Copyright (c) 2022, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.39
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2022-12-22_16-47-36PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 33991024
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/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '33991024' to OH '/u01/app/oracle/product/11.2.0/db_1'
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.buildtools.rsf, 11.2.0.4.0...
Patching component oracle.has.db, 11.2.0.4.0...
Patch 33991024 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2022-12-22_16-47-36PM_1.log
OPatch succeeded.
[oracle@linux8 33991024]$
检查补丁安装情况
[oracle@linux8 33991024]$ opatch lspatches
33991024;11204CERT ON OL8: LINKING ERRORS DURING 11204 FOR DB INSTALL ON OL8.2
33477185;Database Patch Set Update : 11.2.0.4.220118 (33477185)
OPatch succeeded.
[oracle@linux8 33991024]$
4.4 手工Relink
[oracle@linux8 soft]$ $ORACLE_HOME/bin/relink all
writing relink log to: /u01/app/oracle/product/11.2.0/db_1/install/relink.log
[oracle@linux8 soft]$
Relink过程中会出现的error,可以忽略
[oracle@linux8 ~]$ grep -in err /u01/app/oracle/product/11.2.0/db_1/install/relink.log
778:collect2: error: ld returned 1 exit status
780:make[1]: *** [/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:135: /u01/app/oracle/product/11.2.0/db_1/sysman/lib/emagent] Error 1
781:make: *** [/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:52: emagent] Error 2
782:Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oracle/product/11.2.0/db_1/install/relinkActions2022-12-23_11-43-27-AM.log' for details.
[oracle@linux8 ~]$
4.5 创建监听
netca
全部正常完成。
4.6 创建DB
dbca
全部正常完成。
五、总结
安装过程忽略link错误,然后安装必要的PSU及one off patch后手工执行relink,最终安装完成。