《Linux 下安装Oracle数据库 - Oracle 19C By CentOS 8 》(第二部分)

news/2024/10/30 16:23:52/

《Linux 下安装Oracle数据库 - Oracle 19C By CentOS 8 》(第一部分)

  • 2 安装步骤
    • 2.4 安装Oracle数据库
      • 2.4.1 第一次安装报错
      • 2.4.2 解决安装报错
      • 第一步:安装libnsl.so.1
      • 第二步:删除原来安装的 /opt/oracle/*
      • 第三步:卸载已安装的Oracle
      • 第四步:重新执行一次安装。
      • 安装成功。
    • 点击跳转文章第一部分

2 安装步骤

2.4 安装Oracle数据库

操作用户: root
操作目录: 安装包目录
大致时长: 5分钟

执行过程会执行进度条,如下:

  Installing       : oracle-database-ee-19c-1.0-1.x86_64 [=======================             ] 1/1

2.4.1 第一次安装报错

1、第一次安装出现报错。操作过程详细:

[root@localhost install]# pwd
/oracle/install
[root@localhost install]# ls 
compat-libcap1-1.10-7.el7.x86_64.rpm     oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
oracle-database-ee-19c-1.0-1.x86_64.rpm
[root@localhost install]# 
[root@localhost install]# yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm 
Last metadata expiration check: 1 day, 23:06:39 ago on Sat 24 Jun 2023 09:08:19 AM PDT.
Dependencies resolved.
====================================================================================================Package                           Architecture      Version          Repository               Size
====================================================================================================
Installing:oracle-database-ee-19c            x86_64            1.0-1            @commandline            2.5 GTransaction Summary
====================================================================================================
Install  1 PackageTotal size: 2.5 G
Installed size: 6.9 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
ewTransaction test succeeded.
Running transactionPreparing        :                                                                            1/1 Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64                                        1/1 Installing       : oracle-database-ee-19c-1.0-1.x86_64                                        1/1 Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64                                        1/1 
Exception java.lang.UnsatisfiedLinkError: /opt/oracle/product/19c/dbhome_1/oui/lib/linux64/liboraInstaller.so: libnsl.so.1: cannot open shared object file: No such file or directory occurred..
java.lang.UnsatisfiedLinkError: /opt/oracle/product/19c/dbhome_1/oui/lib/linux64/liboraInstaller.so: libnsl.so.1: cannot open shared object file: No such file or directoryat java.lang.ClassLoader$NativeLibrary.load(Native Method)at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)at java.lang.Runtime.loadLibrary0(Runtime.java:870)at java.lang.System.loadLibrary(System.java:1122)at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:388)at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.<clinit>(OiipuUnixOps.java:130)at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.getEnv(OiipgEnvironment.java:201)at oracle.sysman.oii.oiix.OiixIniPair.instantiateEnvVars(OiixIniPair.java:299)at oracle.sysman.oii.oiix.OiixIniPair.updateValue(OiixIniPair.java:230)at oracle.sysman.oii.oiix.OiixIniPair.<init>(OiixIniPair.java:148)at oracle.sysman.oii.oiix.OiixIniFile.readFile(OiixIniFile.java:809)at oracle.sysman.oii.oiix.OiixIniFile.readIniFile(OiixIniFile.java:978)at oracle.sysman.oii.oiix.OiixIniFile.getProfileString(OiixIniFile.java:385)at oracle.sysman.oii.oiix.OiixOraparam.getOraparamProfileString(OiixOraparam.java:338)at oracle.sysman.oii.oiix.OiixOraparam.getOraparamProfileString(OiixOraparam.java:296)at oracle.sysman.oii.oiix.OiixOraparam.usePrereqChecker(OiixOraparam.java:416)at oracle.sysman.oii.oiic.OiicSessionContext.setVariables(OiicSessionContext.java:1325)at oracle.sysman.oii.oiic.OiicBaseInventoryApp.execute(OiicBaseInventoryApp.java:771)at oracle.sysman.oii.oiic.OiicBaseInventoryApp.main_helper(OiicBaseInventoryApp.java:690)at oracle.sysman.oii.oiic.OiicDetachHome.main(OiicDetachHome.java:420)
'DetachHome' failed.
Exception in thread "main" java.lang.NullPointerExceptionat oracle.sysman.oii.oiic.OiicBaseInventoryApp.main_helper(OiicBaseInventoryApp.java:706)at oracle.sysman.oii.oiic.OiicDetachHome.main(OiicDetachHome.java:420)
Exception java.lang.NoClassDefFoundError: Could not initialize class oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps occurred..
java.lang.NoClassDefFoundError: Could not initialize class oracle.sysman.oii.oiip.osd.unix.OiipuUnixOpsat oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.getEnv(OiipgEnvironment.java:201)at oracle.sysman.oii.oiix.OiixIniPair.instantiateEnvVars(OiixIniPair.java:299)at oracle.sysman.oii.oiix.OiixIniPair.updateValue(OiixIniPair.java:230)at oracle.sysman.oii.oiix.OiixIniPair.<init>(OiixIniPair.java:148)at oracle.sysman.oii.oiix.OiixIniFile.readFile(OiixIniFile.java:809)at oracle.sysman.oii.oiix.OiixIniFile.readIniFile(OiixIniFile.java:978)at oracle.sysman.oii.oiix.OiixIniFile.getProfileString(OiixIniFile.java:385)at oracle.sysman.oii.oiix.OiixOraparam.getOraparamProfileString(OiixOraparam.java:338)at oracle.sysman.oii.oiix.OiixOraparam.getOraparamProfileString(OiixOraparam.java:296)at oracle.sysman.oii.oiix.OiixOraparam.usePrereqChecker(OiixOraparam.java:416)at oracle.sysman.oii.oiic.OiicSessionContext.setVariables(OiicSessionContext.java:1325)at oracle.sysman.oii.oiic.OiicBaseInventoryApp.execute(OiicBaseInventoryApp.java:771)at oracle.sysman.oii.oiic.OiicBaseInventoryApp.main_helper(OiicBaseInventoryApp.java:690)at oracle.sysman.oii.oiic.OiicAttachHome.main(OiicAttachHome.java:696)
'AttachHome' failed.
Exception in thread "main" java.lang.NullPointerExceptionat oracle.sysman.oii.oiic.OiicBaseInventoryApp.main_helper(OiicBaseInventoryApp.java:706)at oracle.sysman.oii.oiic.OiicAttachHome.main(OiicAttachHome.java:696)
[SEVERE] An error occurred while registering the Oracle home. Verify logs in /var/log/oracle-database-ee-19c/results/oraInstall.log and /opt/oracle/oraInventory for more details and try again.
warning: %post(oracle-database-ee-19c-1.0-1.x86_64) scriptlet failed, exit status 1Error in POSTIN scriptlet in rpm package oracle-database-ee-19cVerifying        : oracle-database-ee-19c-1.0-1.x86_64                                        1/1 Installed:oracle-database-ee-19c-1.0-1.x86_64                                                               Complete!

2.4.2 解决安装报错

2、参考文章解决:点击跳转

第一步:安装libnsl.so.1

第一步:安装libnsl.so.1 ,操作过程如下:

[root@localhost install]# yum -y install /lib64/libnsl.so.1
Last metadata expiration check: 1 day, 23:21:45 ago on Sat 24 Jun 2023 09:08:19 AM PDT.
Dependencies resolved.
===============================================================================================================================================================================================================Package                                         Architecture                                    Version                                                 Repository                                       Size
===============================================================================================================================================================================================================
Installing:libnsl                                          x86_64                                          2.28-164.el8                                            baseos                                          103 kTransaction Summary
===============================================================================================================================================================================================================
Install  1 PackageTotal download size: 103 k
Installed size: 160 k
Downloading Packages:
libnsl-2.28-164.el8.x86_64.rpm                                                                                                                                                  96 kB/s | 103 kB     00:01    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           95 kB/s | 103 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transactionPreparing        :                                                                                                                                                                                       1/1 Installing       : libnsl-2.28-164.el8.x86_64                                                                                                                                                            1/1 Running scriptlet: libnsl-2.28-164.el8.x86_64                                                                                                                                                            1/1 Verifying        : libnsl-2.28-164.el8.x86_64                                                                                                                                                            1/1 Installed:libnsl-2.28-164.el8.x86_64                                                                                                                                                                                   Complete!

第二步:删除原来安装的 /opt/oracle/*

[root@localhost install]# cd /opt/oracle/
[root@localhost oracle]# ls -l
total 0
drwxrwx---. 3 oracle oinstall 18 Jun 26 08:20 oraInventory
drwxr-xr-x. 3 oracle oinstall 17 Jun 26 08:15 product
[root@localhost oracle]# rm -rf *
[root@localhost oracle]# ls
[root@localhost oracle]# ^C

第三步:卸载已安装的Oracle

[root@localhost oracle]# yum -y remove oracle-database-ee-19c
---
//中间很多行,此处略。
---Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                   1/1 Verifying        : oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                   1/1 Removed:oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                                          Complete

第四步:重新执行一次安装。

[root@localhost install]# yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm 
Last metadata expiration check: 1 day, 23:28:46 ago on Sat 24 Jun 2023 09:08:19 AM PDT.
Dependencies resolved.
===============================================================================================================================================================================================================Package                                                     Architecture                                Version                                       Repository                                         Size
===============================================================================================================================================================================================================
Installing:oracle-database-ee-19c                                      x86_64                                      1.0-1                                         @commandline                                      2.5 GTransaction Summary
===============================================================================================================================================================================================================
Install  1 PackageTotal size: 2.5 G
Installed size: 6.9 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transactionPreparing        :                                                                                                                                                                                       1/1 Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                   1/1 Installing       : oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                   1/1 Running scriptlet: oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                   1/1 
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-19c configureVerifying        : oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                   1/1 Installed:oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                                          Complete!

安装成功。

点击跳转文章第一部分


http://www.ppmy.cn/news/598437.html

相关文章

MySQL 8.0.15备份还原 MySQL 5.7.17

MySQL 8.0.15备份还原 MySQL 5.7.17 问题场景解决方案报错及替换后结果 问题场景 MySQL 8.0.1版本数据库备份 还原到 MySQL 5.7.17 数据库中&#xff1b;报错&#xff1a; 解决方案 经测试&#xff1b;编辑备份sql &#xff0c;全局替换&#xff1a; utf8mb4_0900_ai_ci 替换…

MYSQL备份还原失败终极解决方法

MYSQL备份还原失败终极解决方法 问题是这样的&#xff1a;先用mysqldump -uroot -p magnetlib>magnetlib.sql备份数据库&#xff0c;成功。然后对magnetlib数据库中的数据记录进行修改。在还原备份的时候却失败了&#xff0c;不仅没有成功还原&#xff0c;反而把数据全删了…

PostgreSQL数据库备份还原脚本

本文对数据库进行的操作主要用到的是PG自带的pg_dumpall、pg_dump、psql这几个命令 备份还原过程&#xff1a; 1&#xff1a;备份全局对象 2: 备份某一个数据库 3&#xff1a;还原全局对象 4&#xff1a;还原备份的数据库 备份详细过程&#xff1a; 第一步&#xff0…

七.deepin备份还原

鉴于deepin的不稳定性&#xff0c;备份还原功能需要多关注一下。 deepin官方提供了深度live系统&#xff0c;集成有系统修复和备份还原的功能&#xff0c;这个系统有点类似windows下的PE工具。 下载深度live系统&#xff1a;https://www.deepin.org/zh/download/ 制作深度liv…

【日常笔记】20230619——修改Linux镜像源

1.打开source.list vim /etc/apt/source.list2.拷贝一份source.list为souce.list.bak cp sources.list sources.list.bak2.修改source.list&#xff0c;将内容覆盖如下 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse deb-src…

DB2数据库的备份还原详解

备份&#xff1a; 一、连接数据库服务器&#xff08;在服务器端建立备份文件夹&#xff09; windows下&#xff08;winr mstsc&#xff09;输入db2cmd&#xff0c;linux下&#xff08;我使用的是xshell&#xff09; 若当前用户为root则需要切换用户至数据库管理员 db2inst1 …

使用 Navicat 备份还原数据库

基本步骤: 1.将服务器的备份文件夹复制到本&#xff1b; 2.打开软件&#xff1b; 3.选择要备份的数据库&#xff1b; 4.点击备份&#xff0c;然后点击确认。

SQL Server 备份还原教程

看了众多教程&#xff0c;自己也写个增强记忆&#xff0c;错误地方麻烦指出。 ----------------------------------------------------------------------备份-------------------------------------------------------------------- 1.打开数据库&#xff0c;成功连接 2.找到…