RPM Oracle19C 安装

Oracle 19c,或者说是Oracle 12.2.0.3,是12c中稳定的版本,就像Oracle 11.2.0.4。从Oracle支持的版本序列图中,就可以看出Oracle 19c所处的地位Oracle 19c将稳定性作为此版本的核心目标.
RPM Oracle19C 安装_第1张图片

1、安装preinstall

[root@localhost u01]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
warning: oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
        compat-libcap1 is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        compat-libstdc++-33 is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        ksh is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        libaio-devel is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        libstdc++-devel is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        nfs-utils is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        psmisc is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        xorg-x11-utils is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64
        xorg-x11-xauth is needed by oracle-database-preinstall-19c-1.0-1.el7.x86_64

按需安装依赖

[root@localhost u01]# yum install compat-libcap1 compat-libstdc++-33 ksh libaio-devel libstdc++-devel nfs-utils psmisc xorg-x11-utils xorg-x11-xauth -y

重新安装

[root@localhost u01]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
warning: oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-preinstall-19c-1.################################# [100%]

2、安装数据库软件

[root@localhost u01]# rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm
warning: oracle-database-ee-19c-1.0-1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-ee-19c-1.0-1     ##                                (  7%)

等待安装
注意:rpm默认安装路径为:/opt/oracle/oradata,保证空间大于7G。
这样就安装完成了
在这里插入图片描述

3、创建实例

[root@localhost u01]# /etc/init.d/oracledb_ORCLCDB-19c configure
Configuring Oracle Database ORCLCDB.
Prepare for db operation
8% complete
Copying database files

等待建库。。。
RPM Oracle19C 安装_第2张图片

完成

4、启停数据库
启动数据库

[root@localhost u01]# /etc/init.d/oracledb_ORCLCDB-19c start
The Oracle Database instance ORCLCDB is already started.

关闭数据库

[root@localhost u01]#  /etc/init.d/oracledb_ORCLCDB-19c stop
Shutting down Oracle Database instance ORCLCDB.
Oracle Database instance ORCLCDB shut down.
Stopping Oracle Net Listener.
Oracle Net Listener stopped.

5、配置环境变量

cat  >>  /home/oracle/.bash_profile << "EOF"
export ORACLE_SID=ORCLCDB
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
EOF

##环境变量生效
source  /home/oracle/.bash_profile

6、操作

[root@localhost u01]# su - oracle
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 23 09:02:04 2023
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB1                       MOUNTED

查看监听
RPM Oracle19C 安装_第3张图片
完成

你可能感兴趣的:(oracle,oracle,数据库)