Alma linux 8 安装 Oracle19C RPM

Alma linux 8 安装 Oracle19C RPM

王忘杰
2022-08-02 / 0 评论 / 14 阅读 / 正在检测是否收录...

官方英文文档
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/index.html

登陆官网注册并下载数据库
https://www.oracle.com/cn/database/technologies/oracle-database-software-downloads.html#19c

我这里下载19.3 - Enterprise Edition (also includes Standard Edition 2) Linux x86-64 RPM (2.5 GB)

安装这个RPM需要一个前置包oracle-database-preinstall
直接使用自动补全安装环境

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

安装

rpm -ihv 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
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-ee-19c-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-19c configure

安装完成后按提示初始化

 /etc/init.d/oracledb_ORCLCDB-19c 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.

开放防火墙端口

firewall-cmd --add-port=1521/tcp --permanent
success
firewall-cmd --reload
success
firewall-cmd --list-ports
1521/tcp

切换到oracle用户

su - oracle

编辑环境变量

vi .bash_profile
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin
export ORACLE_SID=ORCLCDB

刷新当前用户环境变量

source ~/.bash_profile

登录数据库

$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 2 13:54:47 2022
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                       READ WRITE NO

修改密码

SQL> alter user system identified by 123456;

远程登陆测试
我使用的是Navicat 15 for Oracle

企业微信截图_20220802140139.png

企业微信截图_20220802140100.png

0

讨论

根据公安部要求,本站无评论功能,若有问题欢迎加入QQ群讨论,群在侧边栏,刷新几次可见