centos8安装部署Oracle Database Free

article/2023/9/24 21:26:32

前言

centos8安装部署Oracle Database Free

安装部署

服务器安装
  1. 下载centos8镜像(选择镜像:CentOS-Stream-8-20230523.0-x86_64-dvd1.iso)并安装系统,具体细节不再赘述
  2. 关闭centos8服务器的防火墙与selinux,并配置ip
部署oracle
  • 注:先下载文件Oracle Linux==>oracle-database-free-23c-1.0-1.el8.x86_64.rpm并放置到服务器的家目录下
[root@localhost ~]# cd ~
[root@localhost ~]# sudo -s
[root@localhost ~]# curl -L -o oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/developer/x86_64/getPackage/oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
[root@localhost ~]# dnf -y localinstall oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
[root@localhost ~]# dnf -y localinstall oracle-database-free*
[root@localhost ~]# /etc/init.d/oracle-free-23c configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN 
accounts:   devops
Confirm the password:   Data2023Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password: 
*********
Enter SYSTEM user password: 
********
Enter PDBADMIN User Password: 
********
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:/opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.Connect to Oracle Database using one of the connect strings:Pluggable database: localhost.localdomain/FREEPDB1Multitenant container database: localhost.localdomain
设置 Oracle 数据库自由环境变量
[root@localhost /]#export ORACLE_SID=FREE 
[root@localhost /]#export ORAENV_ASK=NO 
[root@localhost /]#. /opt/oracle/product/23c/dbhomeFree/bin/oraenv
The Oracle base has been set to /opt/oracle     

连接oracle数据库

使用操作系统身份验证在本地连接
[root@localhost /]# cd /opt/oracle/product/23c/dbhomeFree/bin/
[root@localhost bin]# ./sqlplus / as sysdbaSQL*Plus: Release 23.0.0.0.0 - Developer-Release on Sat Jun 3 12:13:57 2023
Version 23.2.0.0.0Copyright (c) 1982, 2023, Oracle.  All rights reserved.ERROR:
ORA-01017: invalid credential or not authorized; logon deniedEnter user-name: SYSTEM	# 输入账户
Enter password: 		# 输入密码
Last Successful login time: Sat Jun 03 2023 11:45:39 +08:00Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0
  • 注:类似于以上内容的输出确认您现在已连接到数据库
使用账户登录本地数据库
[root@localhost bin]# export ORACLE_SID=FREE
[root@localhost bin]# export ORAENV_ASK=NO 
[root@localhost bin]# . /opt/oracle/product/23c/dbhomeFree/bin/oraenv
The Oracle base has been set to /opt/oracle
[root@localhost bin]# ./sqlplus system@127.0.0.1:1521/FREEPDB1SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Sat Jun 3 12:24:06 2023
Version 23.2.0.0.0Copyright (c) 1982, 2023, Oracle.  All rights reserved.Enter password: 
Last Successful login time: Sat Jun 03 2023 12:14:56 +08:00Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0

oracle服务设置开机自启动

[root@localhost /]# systemctl daemon-reload
[root@localhost /]# systemctl enable oracle-free-23c
oracle-free-23c.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracle-free-23c
[root@localhost /]# systemctl start oracle-free-23c
[root@localhost /]# systemctl status oracle-free-23c
● oracle-free-23c.service - SYSV: This script is responsible for taking care of configuring the RPM Oracle FREE Database and its associated services.Loaded: loaded (/etc/rc.d/init.d/oracle-free-23c; generated)Active: active (exited) since Sat 2023-06-03 12:28:09 CST; 2s agoDocs: man:systemd-sysv-generator(8)Process: 8178 ExecStart=/etc/rc.d/init.d/oracle-free-23c start (code=exited, status=0/SUCCESS)Jun 03 12:28:09 localhost.localdomain systemd[1]: Starting SYSV: This script is responsible for taking care of configuring the RPM Oracle FREE Database and its associated services....
Jun 03 12:28:09 localhost.localdomain oracle-free-23c[8178]: The Oracle Database instance FREE is already started.
Jun 03 12:28:09 localhost.localdomain systemd[1]: Started SYSV: This script is responsible for taking care of configuring the RPM Oracle FREE Database and its associated services..

结语

Oracle Database 23c 免费版——开发者版
Oracle Database Free Download
Python python-oracledb Driver


http://www.ngui.cc/article/show-1200852.html

相关文章

Hbase的布署

今天闲来无事,想起前两天关于在hadoop环境上布署Hbase的一些知识,在此分享下: 1、Hbase和Hadoop,都属于分布式的组成部分,都包含有3种不同的运行模式,包括:本地模式(Local,即单机模式)、伪分布…

COMSOL中内置数学函数及内置运算符

前言 最近想通过COMSOL实现一些比较高级的操作,就对内置数学函数和内置运算符相关章节的帮助文档进行了阅读。在COMSOL中使用各类算子及运算符能够在建模时起到很大的帮助,本文将对帮助文档中的相应章节进行翻译(粗略介绍)&#x…

if/while/for/语句/分支/路径覆盖的控制流程图+数据流分析(DU)

if/while/for/语句覆盖/分支覆盖/路径覆盖的控制流程图数据流分析(DU) 语句的线性序列Linear Sequences of Statements “If” Constructs “While” Constructs “For” Constructs 语句覆盖率Statement Coverage 测试套件应执行 CFG 的所有节点 也被称为:…

设计线程安全的类

4.1 设计线程安全的类 在线程安全的程序中,虽然可以将程序的所有状态都保存在公有的静态域中,但与那些将状态封装起来的程序相比,这些程序的线程安全性更难以得到验证,并且在修改时也更难以始终确保其线程安全性。通过使用封装…

【Linux】Linux环境基础开发工具使用(gcc/g++使用)

⭐博客主页:️CS semi主页 ⭐欢迎关注:点赞收藏留言 ⭐系列专栏:Linux ⭐代码仓库:Linux 家人们更新不易,你们的点赞和关注对我而言十分重要,友友们麻烦多多点赞+关注,你们的支持是我…

【概率论】大数定律

文章目录 客观题客观题 设随机变量 X X X ~ P ( 2 ) P(2)

代码随想录第51天

1.最佳买卖股票时机含冷冻期 淦,自己写,用3个状态死活写不出来。 动规五部曲,分析如下: 确定dp数组以及下标的含义 dp[i][j],第i天状态为j,所剩的最多现金为dp[i][j]。 其实本题很多同学搞的比较懵&…

Netty 网络编程的秘籍,看这一篇够了

Netty version: 4.1.55.Final 传统的IO模型的web容器,比如老版本的Tomcat,为了增加系统的吞吐量,需要不断增加系统核心线程数量,或者通过水平扩展服务器数量,来增加系统处理请求的能力。 有了NIO之后,一个线…

【QCA6174】QCA6174 DFS认证4.6.2.3 Channel Shutdown启动两个AP,打干扰信号出现信道不跳转问题修改

WIFI DFS测试要求 Master设备需要测试的项目 4.6.2.1 Channel Availability Check ---信道可用性检查 定义其作为雷达脉冲检测机制,当雷达脉冲出现时所占用的信道需要能被设备检测到已经被占用。当相关信道未被占用时,这些信道被称为Avaliable Channel可用信道 4.6.2.2 I…

线程的四个属性

如上图所示,线程有四个属性: 线程ID线程名称守护线程线程优先级 1. 线程ID 每个线程都有id,这个id不能修改 线程id会不停的自增,从1开始 main函数就是第一个线程,id1 id 是操作系统用来识别各个线程的编号&#…