龙空技术网

Oracle 23ai 安装配置及问题处理

潇湘秦 55

前言:

现时小伙伴们对“redhat安装oracle”可能比较关切,兄弟们都想要学习一些“redhat安装oracle”的相关知识。那么小编也在网络上收集了一些关于“redhat安装oracle””的相关资讯,希望兄弟们能喜欢,大家一起来学习一下吧!

1.安装介质下载

Oracle 23ai 免费版本已经正式发布,Oracle官网提供免费的下载试用(无需账号)地址如下

官网下载和试用地址 Oracle Database 23ai Free:

三种安装方式可选 docker,vm和rpm安装包

rpm安装包仅支持linux8/9

rpm安装包大概1.3GB,可以官网下载,如果官网下载较慢可以选择关注我公众号:潇湘秦,然后点:发消息->23ai-rpm 获得网盘链接

2.Oracle 23ai rpm安装

本文使用Redhat8.5安装oracle23ai

2.1 将安装包上传到主机

oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm

2.2执行preinstall 安装依赖包(root用户)

[root]# dnf install -y oracle-database-preinstall*

Last metadata expiration check: 0:37:48 ago on Wed 08 May 2024 09:56:29 AM CST.

Dependencies resolved.

=============================================================================================================================================================

Package Architecture Version Repository Size

=============================================================================================================================================================

Installing:

oracle-database-preinstall-23ai x86_64 1.0-2.el8 @commandline 30 k

Installing dependencies:

compat-openssl10 x86_64 1:1.0.2o-4.el8_6 ol8_appstream 1.1 M

glibc-devel x86_64 2.28-164.0.1.el8 ol8_baseos_latest 1.0 M

ksh x86_64 20120801-259.0.1.el8 ol8_appstream 923 k

libxcrypt-devel x86_64 4.1.1-6.el8 ol8_baseos_latest 25 k

lm_sensors-libs x86_64 3.4.0-23.20180522git70f7e08.el8 ol8_baseos_latest 59 k

make x86_64 1:4.2.1-11.el8 ol8_baseos_latest 498 k

sysstat x86_64 11.7.3-11.0.1.el8 ol8_appstream 427 k

Transaction Summary

=============================================================================================================================================================

Install 8 Packages

Total size: 4.1 M

Total download size: 4.0 M

Installed size: 10 M

Downloading Packages:

(1/7): libxcrypt-devel-4.1.1-6.el8.x86_64.rpm 30 kB/s | 25 kB 00:00

(2/7): lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm 49 kB/s | 59 kB 00:01

(3/7): make-4.2.1-11.el8.x86_64.rpm 304 kB/s | 498 kB 00:01

(4/7): glibc-devel-2.28-164.0.1.el8.x86_64.rpm 385 kB/s | 1.0 MB 00:02

(5/7): compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm 645 kB/s | 1.1 MB 00:01

(6/7): ksh-20120801-259.0.1.el8.x86_64.rpm 1.3 MB/s | 923 kB 00:00

(7/7): sysstat-11.7.3-11.0.1.el8.x86_64.rpm 611 kB/s | 427 kB 00:00

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Total 1.2 MB/s | 4.0 MB 00:03

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

Preparing : 1/1

Installing : libxcrypt-devel-4.1.1-6.el8.x86_64 1/8

Installing : glibc-devel-2.28-164.0.1.el8.x86_64 2/8

Running scriptlet: glibc-devel-2.28-164.0.1.el8.x86_64 2/8

Installing : make-1:4.2.1-11.el8.x86_64 3/8

Running scriptlet: make-1:4.2.1-11.el8.x86_64 3/8

Installing : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 4/8

Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64 4/8

Installing : ksh-20120801-259.0.1.el8.x86_64 5/8

Running scriptlet: ksh-20120801-259.0.1.el8.x86_64 5/8

Installing : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 6/8

Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 6/8

Installing : sysstat-11.7.3-11.0.1.el8.x86_64 7/8

Running scriptlet: sysstat-11.7.3-11.0.1.el8.x86_64 7/8

Installing : oracle-database-preinstall-23ai-1.0-2.el8.x86_64 8/8

Running scriptlet: oracle-database-preinstall-23ai-1.0-2.el8.x86_64 8/8

Verifying : glibc-devel-2.28-164.0.1.el8.x86_64 1/8

Verifying : libxcrypt-devel-4.1.1-6.el8.x86_64 2/8

Verifying : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 3/8

Verifying : make-1:4.2.1-11.el8.x86_64 4/8

Verifying : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 5/8

Verifying : ksh-20120801-259.0.1.el8.x86_64 6/8

Verifying : sysstat-11.7.3-11.0.1.el8.x86_64 7/8

Verifying : oracle-database-preinstall-23ai-1.0-2.el8.x86_64 8/8

Installed:

compat-openssl10-1:1.0.2o-4.el8_6.x86_64 glibc-devel-2.28-164.0.1.el8.x86_64 ksh-20120801-259.0.1.el8.x86_64

libxcrypt-devel-4.1.1-6.el8.x86_64 lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 make-1:4.2.1-11.el8.x86_64

oracle-database-preinstall-23ai-1.0-2.el8.x86_64 sysstat-11.7.3-11.0.1.el8.x86_64

Complete!

2.3 执行安装包(root)

[root@tmp]#dnf install -y oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

Last metadata expiration check: 0:38:37 ago on Wed 08 May 2024 09:56:29 AM CST.

Dependencies resolved.

=============================================================================================================================================================

Package Architecture Version Repository Size

=============================================================================================================================================================

Installing:

oracle-database-free-23ai x86_64 1.0-1 @commandline 1.3 G

Transaction Summary

=============================================================================================================================================================

Install 1 Package

Total size: 1.3 G

Installed size: 3.6 G

Downloading Packages:

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

Preparing : 1/1

Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64 1/1

Installing : oracle-database-free-23ai-1.0-1.x86_64 1/1

Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64 1/1

[INFO] Executing post installation scripts...

[INFO] Oracle home installed successfully and ready to be configured.

To configure Oracle Database Free, optionally modify the parameters in '/etc/sysconfig/oracle-free-23ai.conf' and then run '/etc/init.d/oracle-free-23ai configure' as root.

Verifying : oracle-database-free-23ai-1.0-1.x86_64 1/1

Installed:

oracle-database-free-23ai-1.0-1.x86_64

Complete!

2.4 初始化数据库

[root@tmp]# /etc/init.d/oracle-free-23ai 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:

Confirm the password: --输入sys/system的密码

Configuring 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: ORACLE01T/FREEPDB1

Multitenant container database: ORACLE01T

[root@ORACLE01T tmp]#

2.5 环境变量配置

数据库配置后su 到oracle 用户下 发现无法登陆进数据库,

ps -ef|grep smon 看到实例已经在运行,提示没有配置环境变量

[root@ORACLE01T tmp]# su - oracle

[oracle@ORACLE01T ~]$ cd /opt/oracle/product/23ai/dbhomeFree/bin/

[oracle@ORACLE01T bin]$

[oracle@ORACLE01T bin]$ ./sqlplus / as sysdba

Error 6 initializing SQL*Plus

SP2-0667: Message file sp1<lang>.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

[oracle@SZSPLORACLE01T ~]$ ps -ef|grep smon

oracle 42755 1 0 10:49 ? 00:00:00 db_smon_FREE

oracle 43387 43294 0 10:56 pts/0 00:00:00 grep --color=auto smon

-----------------------------------------------

配置环境变量

vi /home/oracle/.bash_profile

export PATH

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_SID=FREE

export ORACLE_BASE=/opt/oracle/

export ORACLE_HOME=$ORACLE_BASE/product/23ai/dbhomeFree

export TNS_ADMIN=$ORACLE_HOME/network/admin

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

# User specific environment and startup programs

配置好环境变量后,sqlplus登入提示idle instance,但是确认oracle_sid配置无误

PS:Oracle23ai新特性-报错信息更详细,提供报错信息的官网链接,但是个人认为作用不大,官网只是提供了报错的官方定义,对于解决问题并没有太大的作用

Solution:我这里的处理方法比较粗暴,直接kill掉smon 相当于强制关库,然后重新启动即可

这样Oracle 23ai rpm报的安装方式就完成了,相较于之前的版本安装确实简洁了非常非常多,关注博主,后续更新更多23ai新特性

------------历史文章推荐----------------

关于Oracle 23ai 你要知道的几件事情

All In ai,Oracle 23C没了,等来了Oracle 23ai

Oracle Database 23ai已发布!如何下载?安装?有哪些新功能?

MOS(My Oracle Support)怎么用?Oracle DBA必备技能!

面试官:正在运行的Oracle数据库删除当前redo会影响新事物提交吗?大多数人都回答错了!

前人挖坑后人填(sqlplus / as sysdba登陆失败)

数据库如何预防勒索病毒

数据库中了勒索病毒怎么办?(数据库恢复的终极大招DUL)

标签: #redhat安装oracle