暂无图片
暂无图片
3
暂无图片
暂无图片
暂无图片

Oracle Database 21c RPM安装体验

原创 王先生 2021-08-16
4913

Oracle Database 21c RPM安装体验

考虑在云上和idc机房都可以适配,操作系统可以选择

Red Hat Enterprise Linux 8.2: 4.18.0-193.19.1.el8_2.x86_64 or later

实际选择了兼容的CentOS做测试

cat /etc/redhat-release

CentOS Linux release 8.2.2004 (Core)

uname -r

4.18.0-193.el8.x86_64

网络配置

如果有故障,试着修改配置,然后重启网络

cat /etc/sysconfig/network-scripts/ifcfg-ens33  
cat /etc/resolv.conf  

nmcli c  
nmcli c up ens33  
nmcli device show  

安装基本依赖包

yum install -y telnet unzip wget curl

安装oracle-database-preinstall包

oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm 没发布,用19c的也可以

wget https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

yum -y localinstall oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

安装日志见:/var/log/oracle-database-preinstall-19c/results/orakernel.log

用RPM包安装21c数据库

yum装,失败

[root@centos82 tmp]# yum -y localinstall oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm
Last metadata expiration check: 0:23:10 ago on Sun 15 Aug 2021 11:45:47 PM CST.
Error: 
 Problem: conflicting requests
  - nothing provides oracle-database-preinstall-21c needed by oracle-database-ee-21c-1.0-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

换rpm装

[oracle@centos82 tmp]$ rpm -ivh oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm 
warning: oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
error: Failed dependencies:
        oracle-database-preinstall-21c is needed by oracle-database-ee-21c-1.0-1.x86_64
[oracle@centos82 tmp]$ 

[root@centos82 tmp]# rpm -ivh oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm --nodeps --force
warning: oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-ee-21c-1.0-1     ################################# [100%]
[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-21c configure
[root@centos82 tmp]#

配置实例

[root@centos82 tmp]# /etc/init.d/oracledb_ORCLCDB-21c configure
Configuring Oracle Database ORCLCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/ORCLCDB.
Database Information:
Global Database Name:ORCLCDB
System Identifier(SID):ORCLCDB
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.

Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.
[root@centos82 tmp]# 

登录验证

ORACLE_HOME=/opt/oracle/product/21c/dbhome_1; export ORACLE_HOME
ORACLE_SID=ORCLCDB; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
[oracle@centos82 ~]$ sqlplus / as sysdba 

SQL*Plus: Release 21.0.0.0.0 - Production on Mon Aug 16 07:45:35 2021
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

SQL> 
SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB1                       READ WRITE NO
SQL>

参考文档

https://docs.oracle.com/en/database/oracle/oracle-database/index.html

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
3人已赞赏
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论