Oracle Database 23ai 下载安装体验之旅,居然遇到了小 Bug!

2024年5月3日凌晨,Oracle 正式发布了其最新长期支持版本 Oracle Database 23ai 。
在这里插入图片描述
这款产品曾被称为Database 23c,但随着2023年生成式人工智能技术的爆发和快速发展,Oracle决定更新其名称以反映其对AI技术的重视。

在这里插入图片描述

这一次升级带来了超过300项新功能,包括AI向量搜索、JavaScript存储过程、优先事务处理、数据用例域、Schema权限、布尔数据类型、开发者角色、JSON Schema、实时SQL计划管理、微服务支持改进,以及XML与JSON搜索索引增强等。

这些强大的新功能旨在提高开发人员的工作效率,优化数据处理能力。Oracle表示,过去4年他们一直专注于为数据库构建一个以AI和开发者需求为核心的长期支持版本,23ai的发布标志着他们在数据与AI、数据与开发、数据与关键任务处理三大领域都取得了长足进步。

作为一款融合了众多创新技术的数据库新版本,Oracle 23ai版本无疑将为全球开发者、数据分析师、企业应用带来全新的功能和体验。
在这里插入图片描述
Oracle 23ai 值得大家关注的一大黑科技就是内置的AI向量检索功能。它允许根据内容概念搜索非结构化数据,而不仅仅依赖单词或数值查询,极大提高了数据检索的智能化水平。

更令人期待的是,23ai 将 AI 算法直接集成到了数据库内核,用户还能加载自己的可信AI大模型,实现与数据库的实时协作。传统做法一般是使用第三方服务将数据传输到数据库之外,交给 AI 大语言模型对数据对象进行编码,处理过程可能需要大量且复杂的代码。
在这里插入图片描述

这不仅效率低下,而且存在一定的安全风险,因为需要与第三方共享敏感数据信息,在存储、传输、访问的各个环节都可能存在数据泄密风险。而在 Oracle 23ai 中,大模型可在数据库内部近乎实时对插入的对象进行编码和推理,无需将敏感数据提取和外传,提升了数据安全性。

对于重视数据隐私和智能化的企业来说,相信对这一特性会很感兴趣,它将极大提高企业数据AI应用的效率、有效性和安全性。
更多Oracle 23 ai 的新特性,可以点击之前发布的文章查看

Oracle 23ai 发布,国产数据库们都沉默了

今天我们来说说,Oracle Database 23ai 如何下载?安装?体验?

一、Oracle Database 23ai 体验版如何下载?

Oracle官网已经开放了免费版本的下载和试用通道,地址如下:(无需注册账号)

Oracle Database 23ai Free Free Get Started:(点击直达)

https://www.oracle.com/database/free/get-started

可选三种安装体验方式:

  • Docker/Podman
  • Oracle VM VirtualBox
  • Linux RPM 安装

在这里插入图片描述
RPM 安装方式目前仅支持 Linux 8/9 版本
在这里插入图片描述
RPM 安装还需要下载一个对应版本的 oracle-database-preinstall-23ai 预安装依赖包。

在这里插入图片描述
Windows平台用户目前可以使用提供的容器映像和 Docker Desktop for Windows 或 Oracle VM VirtualBox映像运行Oracle 23ai,Oracle正在加快 Windows 平台安装包的适配开发,Windows系统上原生安装和使用 23ai 很快就会推出。

在这里插入图片描述
rpm安装包大小约为1.3 GB,可以直接在官网下载,如果官网下载速度较慢,可以关注我的公众号:乾以墨,然后发消息“23airpm”,推送给你网盘下载链接。

二、Oracle Database 23ai 体验版如何安装?

我们这次介绍在 Red Hat Enterprise Linux 9.3 平台安装 Oracle 23ai 。

软件名称版本号
Red Hat Enterprise Linux x86-64 bit9.3
Oracle Database Free23ai

1、系统安装要求

系统安装要求

2、安装 Red Hat Enterprise Linux 9.3

安装时软件选择 “带GUI的服务器” 或者 最小化安装 即可,这部分不再赘述。

3、使用 RPM 包安装 Oracle ai

3.1 、将下载的 Oracle 安装包上传到主机

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

下载好的rpm包

3.2 、安装最新的 preinstall 预安装依赖包
使用 root 账户,执行以下命令:
For Oracle Linux 8 and Red Hat Enterprise Linux 8

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

For Oracle Linux 9 and Red Hat Enterprise Linux 9

dnf -y install oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm

[root@rhel93 oracle]# dnf -y install oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm 
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:01:49 ago on Sat 11 May 2024 07:44:47 AM CST.
Dependencies resolved.
===============================================================================================================
 Package                                Architecture  Version                        Repository           Size
===============================================================================================================
Installing:
 oracle-database-preinstall-23ai        x86_64        1.0-2.el9                      @commandline         35 k
Installing dependencies:
 chkconfig                              x86_64        1.24-1.el9                     BaseOS              183 k
 glibc-devel                            x86_64        2.34-83.el9_3.7                AppStream            56 k
 glibc-headers                          x86_64        2.34-83.el9_3.7                AppStream           558 k
 gssproxy                               x86_64        0.8.4-6.el9                    BaseOS              114 k
 initscripts                            x86_64        10.11.5-1.el9                  BaseOS              234 k
 kernel-headers                         x86_64        5.14.0-362.8.1.el9_3           AppStream           6.7 M
 keyutils                               x86_64        1.6.3-1.el9                    BaseOS               78 k
 ksh                                    x86_64        3:1.0.0~beta.1-3.el9           AppStream           884 k
 libev                                  x86_64        4.33-5.el9                     BaseOS               56 k
 libnfsidmap                            x86_64        1:2.5.4-20.el9                 BaseOS               66 k
 libnsl                                 x86_64        2.34-83.el9_3.7                BaseOS               78 k
 libverto-libev                         x86_64        0.3.2-3.el9                    BaseOS               15 k
 libxcrypt-devel                        x86_64        4.4.18-3.el9                   AppStream            32 k
 lm_sensors-libs                        x86_64        3.6.0-10.el9                   AppStream            44 k
 make                                   x86_64        1:4.3-7.el9                    BaseOS              542 k
 nfs-utils                              x86_64        1:2.5.4-20.el9                 BaseOS              458 k
 pcp-conf                               x86_64        6.0.5-4.el9                    AppStream            33 k
 pcp-libs                               x86_64        6.0.5-4.el9                    AppStream           634 k
 rpcbind                                x86_64        1.2.6-5.el9                    BaseOS               62 k
 sssd-nfs-idmap                         x86_64        2.9.1-2.el9                    BaseOS               45 k
 sysstat                                x86_64        12.5.4-7.el9                   AppStream           485 k

Transaction Summary
===============================================================================================================
Install  22 Packages

Total size: 11 M
Installed size: 20 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                       1/1 
  Installing       : libnfsidmap-1:2.5.4-20.el9.x86_64                                                    1/22 
  Running scriptlet: rpcbind-1.2.6-5.el9.x86_64                                                           2/22 
  Installing       : rpcbind-1.2.6-5.el9.x86_64                                                           2/22 
  Running scriptlet: rpcbind-1.2.6-5.el9.x86_64                                                           2/22 
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /usr/lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /usr/lib/systemd/system/rpcbind.socket.

  Installing       : make-1:4.3-7.el9.x86_64                                                              3/22 
  Installing       : libnsl-2.34-83.el9_3.7.x86_64                                                        4/22 
  Installing       : libev-4.33-5.el9.x86_64                                                              5/22 
  Installing       : libverto-libev-0.3.2-3.el9.x86_64                                                    6/22 
  Installing       : gssproxy-0.8.4-6.el9.x86_64                                                          7/22 
  Running scriptlet: gssproxy-0.8.4-6.el9.x86_64                                                          7/22 
  Installing       : keyutils-1.6.3-1.el9.x86_64                                                          8/22 
  Running scriptlet: nfs-utils-1:2.5.4-20.el9.x86_64                                                      9/22 
  Installing       : nfs-utils-1:2.5.4-20.el9.x86_64                                                      9/22 
  Running scriptlet: nfs-utils-1:2.5.4-20.el9.x86_64                                                      9/22 
  Installing       : chkconfig-1.24-1.el9.x86_64                                                         10/22 
  Installing       : initscripts-10.11.5-1.el9.x86_64                                                    11/22 
  Running scriptlet: initscripts-10.11.5-1.el9.x86_64                                                    11/22 
Created symlink /etc/systemd/system/sysinit.target.wants/import-state.service → /usr/lib/systemd/system/import-state.service.
Created symlink /etc/systemd/system/sysinit.target.wants/loadmodules.service → /usr/lib/systemd/system/loadmodules.service.

  Installing       : pcp-conf-6.0.5-4.el9.x86_64                                                         12/22 
  Installing       : pcp-libs-6.0.5-4.el9.x86_64                                                         13/22 
  Installing       : lm_sensors-libs-3.6.0-10.el9.x86_64                                                 14/22 
  Installing       : sysstat-12.5.4-7.el9.x86_64                                                         15/22 
  Running scriptlet: sysstat-12.5.4-7.el9.x86_64                                                         15/22 
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /usr/lib/systemd/system/sysstat.service.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /usr/lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /usr/lib/systemd/system/sysstat-summary.timer.

  Installing       : ksh-3:1.0.0~beta.1-3.el9.x86_64                                                     16/22 
  Running scriptlet: ksh-3:1.0.0~beta.1-3.el9.x86_64                                                     16/22 
  Installing       : kernel-headers-5.14.0-362.8.1.el9_3.x86_64                                          17/22 
  Installing       : glibc-headers-2.34-83.el9_3.7.x86_64                                                18/22 
  Installing       : libxcrypt-devel-4.4.18-3.el9.x86_64                                                 19/22 
  Installing       : glibc-devel-2.34-83.el9_3.7.x86_64                                                  20/22 
  Installing       : oracle-database-preinstall-23ai-1.0-2.el9.x86_64                                    21/22 
  Installing       : sssd-nfs-idmap-2.9.1-2.el9.x86_64                                                   22/22 
  Running scriptlet: oracle-database-preinstall-23ai-1.0-2.el9.x86_64                                    22/22 
  Running scriptlet: sssd-nfs-idmap-2.9.1-2.el9.x86_64                                                   22/22 
  Verifying        : glibc-devel-2.34-83.el9_3.7.x86_64                                                   1/22 
  Verifying        : glibc-headers-2.34-83.el9_3.7.x86_64                                                 2/22 
  Verifying        : kernel-headers-5.14.0-362.8.1.el9_3.x86_64                                           3/22 
  Verifying        : ksh-3:1.0.0~beta.1-3.el9.x86_64                                                      4/22 
  Verifying        : libxcrypt-devel-4.4.18-3.el9.x86_64                                                  5/22 
  Verifying        : lm_sensors-libs-3.6.0-10.el9.x86_64                                                  6/22 
  Verifying        : pcp-conf-6.0.5-4.el9.x86_64                                                          7/22 
  Verifying        : pcp-libs-6.0.5-4.el9.x86_64                                                          8/22 
  Verifying        : sysstat-12.5.4-7.el9.x86_64                                                          9/22 
  Verifying        : chkconfig-1.24-1.el9.x86_64                                                         10/22 
  Verifying        : gssproxy-0.8.4-6.el9.x86_64                                                         11/22 
  Verifying        : initscripts-10.11.5-1.el9.x86_64                                                    12/22 
  Verifying        : keyutils-1.6.3-1.el9.x86_64                                                         13/22 
  Verifying        : libev-4.33-5.el9.x86_64                                                             14/22 
  Verifying        : libnfsidmap-1:2.5.4-20.el9.x86_64                                                   15/22 
  Verifying        : libnsl-2.34-83.el9_3.7.x86_64                                                       16/22 
  Verifying        : libverto-libev-0.3.2-3.el9.x86_64                                                   17/22 
  Verifying        : make-1:4.3-7.el9.x86_64                                                             18/22 
  Verifying        : nfs-utils-1:2.5.4-20.el9.x86_64                                                     19/22 
  Verifying        : rpcbind-1.2.6-5.el9.x86_64                                                          20/22 
  Verifying        : sssd-nfs-idmap-2.9.1-2.el9.x86_64                                                   21/22 
  Verifying        : oracle-database-preinstall-23ai-1.0-2.el9.x86_64                                    22/22 
Installed products updated.

Installed:
  chkconfig-1.24-1.el9.x86_64                               glibc-devel-2.34-83.el9_3.7.x86_64                 
  glibc-headers-2.34-83.el9_3.7.x86_64                      gssproxy-0.8.4-6.el9.x86_64                        
  initscripts-10.11.5-1.el9.x86_64                          kernel-headers-5.14.0-362.8.1.el9_3.x86_64         
  keyutils-1.6.3-1.el9.x86_64                               ksh-3:1.0.0~beta.1-3.el9.x86_64                    
  libev-4.33-5.el9.x86_64                                   libnfsidmap-1:2.5.4-20.el9.x86_64                  
  libnsl-2.34-83.el9_3.7.x86_64                             libverto-libev-0.3.2-3.el9.x86_64                  
  libxcrypt-devel-4.4.18-3.el9.x86_64                       lm_sensors-libs-3.6.0-10.el9.x86_64                
  make-1:4.3-7.el9.x86_64                                   nfs-utils-1:2.5.4-20.el9.x86_64                    
  oracle-database-preinstall-23ai-1.0-2.el9.x86_64          pcp-conf-6.0.5-4.el9.x86_64                        
  pcp-libs-6.0.5-4.el9.x86_64                               rpcbind-1.2.6-5.el9.x86_64                         
  sssd-nfs-idmap-2.9.1-2.el9.x86_64                         sysstat-12.5.4-7.el9.x86_64                        

Complete!

安装依赖包安装依赖包
3.3 、安装 Oracle 23ai 软件包

使用 root 账户,执行以下命令:

For Oracle Linux 8 and Red Hat Enterprise Linux 8

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

For Oracle Linux 9 and Red Hat Enterprise Linux 9

dnf -y install oracle-database-free-23ai-1.0-1.el9.x86_64.rpm

默认安装到 /opt/oracle 目录下。

[root@rhel93 oracle]# dnf -y install oracle-database-free-23ai-1.0-1.el9.x86_64.rpm
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:00:31 ago on Sat 11 May 2024 07:46:40 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 products updated.

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

Complete!

安装Oracle 23ai 数据库软件
Oracle 23ai 数据库软件的安装现已完成。

3.4 、 初始化网络监听和数据库

安装完成后执行配置脚本 /etc/init.d/oracle-free-23ai configure

配置网络监听,初始化创建数据库。

这里会提示你输入密码,密码不支持特殊字符,但是支持下划线 _

使用 root 账户,执行以下命令:

/etc/init.d/oracle-free-23ai configure

[root@rhel93 oracle]# /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:    --- 此处输入为 sys/system账户设定的密码
Confirm the password:      --- 再次确认输入
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: rhel93/FREEPDB1
     Multitenant container database: rhel93
[root@rhel93 oracle]# 

这个阶段需要耐心等待一会,安装过程中可以另开一个窗口,实时跟踪安装日志

tail -f /opt/oracle/cfgtoollogs/netca/netca_configure_out.log

[root@rhel93 oracle]# tail -f /opt/oracle/cfgtoollogs/netca/netca_configure_out.log
    Parameter "instype" = typical
    Parameter "inscomp" = client,oraclenet,javavm,server,ano
    Parameter "insprtcl" = tcp
    Parameter "cfg" = local
    Parameter "authadp" = NO_VALUE
    Parameter "responsefile" = /opt/oracle/product/23ai/dbhomeFree/network/install/netca_typ.rsp
    Parameter "silent" = true
    Parameter "orahnam" = OraHomeFree
    Parameter "listenerparameters" = DEFAULT_SERVICE=FREE
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /opt/oracle/product/23ai/dbhomeFree/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

顺利的话,稍等一会就顺利完成了

顺利配置完成

在一次安装过程中,我遇到了在 Configuring Oracle Listener 配置网络监听的过程中卡住很久,最后显示网络监听配置失败,报错退出的情况。

难道是遇到Bug了?

配置失败
我们来跟踪一下这个错误:
先检查安装日志:

vim /opt/oracle/cfgtoollogs/netca/netca_configure_out.log

[root@bogon oracle]# vim /opt/oracle/cfgtoollogs/netca/netca_configure_out.log

Netca configuration log

正在对命令行参数进行语法分析:
参数"orahome" = /opt/oracle/product/23ai/dbhomeFree
参数"instype" = typical
参数"inscomp" = client,oraclenet,javavm,server,ano
参数"insprtcl" = tcp
参数"cfg" = local
参数"authadp" = NO_VALUE
参数"responsefile" = /opt/oracle/product/23ai/dbhomeFree/network/install/netca_typ.rsp
参数"silent" = true
参数"orahnam" = OraHomeFree
参数"listenerparameters" = DEFAULT_SERVICE=FREE
完成对命令行参数进行语法分析。
Oracle Net Services 配置:
完成概要文件配置。

正在对命令行参数进行语法分析:
参数"orahome" = /opt/oracle/product/23ai/dbhomeFree
参数"instype" = typical
参数"inscomp" = client,oraclenet,javavm,server,ano
参数"insprtcl" = tcp
参数"cfg" = local
参数"authadp" = NO_VALUE
参数"responsefile" = /opt/oracle/product/23ai/dbhomeFree/network/install/netca_typ.rsp
参数"silent" = true
参数"orahnam" = OraHomeFree
参数"listenerparameters" = DEFAULT_SERVICE=FREE
完成对命令行参数进行语法分析。
Oracle Net Services 配置:
完成概要文件配置。
Oracle Net 监听程序启动:
为该监听程序提供的信息正由此计算机上的其他软件使用。
有关详细信息, 请查看跟踪文件: /opt/oracle/cfgtoollogs/netca/trace_OraDBHome23aiFree-2405105下午2041.log
Oracle Net Services 配置失败。退出代码是1
Oracle Net 监听程序启动:
为该监听程序提供的信息正由此计算机上的其他软件使用。
有关详细信息, 请查看跟踪文件: /opt/oracle/cfgtoollogs/netca/trace_OraDBHome23aiFree-2405105下午3427.log
Oracle Net Services 配置失败。退出代码是1

继续检查跟踪文件,查看详细信息。

[root@bogon oracle]# vim /opt/oracle/cfgtoollogs/netca/trace_OraDBHome23aiFree-2405105下午3427.log

[root@bogon oracle]# vim /opt/oracle/cfgtoollogs/netca/trace_OraDBHome23aiFree-2405105下午3427.log
[main] [ 2024-05-10 17:47:19.293 CST ] [RuntimeExec.runCommand:359]  Returning from RunTimeExec.runCommand
[main] [ 2024-05-10 17:47:19.293 CST ] [UnixSystem.getSystemdContainer:6484]  After execution: ret = 1, out = none
[main] [ 2024-05-10 17:47:19.294 CST ] [ClusterwareInfo.isKubernetesContainer:8144]  isKubernetesContainer : false
[main] [ 2024-05-10 17:47:19.294 CST ] [ClusterUtils.isContainerEnvironment:2046]  isContainerEnvironment:false
[main] [ 2024-05-10 17:47:29.344 CST ] [ConfigureListener.validateEndPoint:1209]  Address String : (ADDRESS=(PROTOCOL=TCP)(HOST=61.160.148.90)(PORT=1539))
[main] [ 2024-05-10 17:48:33.715 CST ] [ConfigureListener.validateEndPoint:1213]  AddressBusy return code : 0
[main] [ 2024-05-10 17:48:33.715 CST ] [ConfigureListener.isPortFree:1274]  Checking if port 1539 is free on local machine...
[main] [ 2024-05-10 17:48:33.715 CST ] [ConfigureListener.isPortFree:1289]  InetAddress.getByName(127.0.0.1): /127.0.0.1
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1291]  Local host IP address: bogon/61.160.148.90
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1293]  Local host name: bogon
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1304]  Address bogon
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1327]  IP Address: bogon/61.160.148.90, Is IPv6 Address: false
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1330]  IP Address: bogon/61.160.148.90, Is Link-Local Address: false
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1355]  Creating ServerSocket on Port:1539, IP Address: bogon/61.160.148.90
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1391]  无法指定被请求的地址 (Bind failed)
java.base/java.net.PlainSocketImpl.socketBind(Native Method)
java.base/java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:452)
java.base/java.net.ServerSocket.bind(ServerSocket.java:381)
java.base/java.net.ServerSocket.<init>(ServerSocket.java:243)
oracle.net.ca.ConfigureListener.isPortFree(ConfigureListener.java:1357)
oracle.net.ca.ConfigureListener.validatePort(ConfigureListener.java:1256)
oracle.net.ca.ConfigureListener.validateEndPoint(ConfigureListener.java:1240)
oracle.net.ca.ConfigureListener.typicalConfigure(ConfigureListener.java:307)
oracle.net.ca.SilentConfigure.performSilentConfigure(SilentConfigure.java:212)
oracle.net.ca.InitialSetup.<init>(NetCA.java:4450)
oracle.net.ca.NetCA.main(NetCA.java:491)
[main] [ 2024-05-10 17:48:43.750 CST ] [ConfigureListener.isPortFree:1404]  Returning is Port 1539 free: false
oracle.net.ca.IllegalEndpointException: 为此监听程序提供的端口 1539 当前正在使用。
        at oracle.net.ca.ConfigureListener.validatePort(ConfigureListener.java:1257)
        at oracle.net.ca.ConfigureListener.validateEndPoint(ConfigureListener.java:1240)
        at oracle.net.ca.ConfigureListener.typicalConfigure(ConfigureListener.java:307)
        at oracle.net.ca.SilentConfigure.performSilentConfigure(SilentConfigure.java:212)
        at oracle.net.ca.InitialSetup.<init>(NetCA.java:4450)
        at oracle.net.ca.NetCA.main(NetCA.java:491)
[main] [ 2024-05-10 17:48:43.751 CST ] [ConfigureListener.typicalConfigure:311]  为此监听程序提供的端口 1539 当前正在使用。
[main] [ 2024-05-10 17:48:43.751 CST ] [ConfigureListener.typicalConfigure:326]  Failed to get free port. Using port 1521.
[main] [ 2024-05-10 17:49:13.861 CST ] [CmdlineArgs.getListenerParameters:1317]  Control parameter loaded: DEFAULT_SERVICE
[main] [ 2024-05-10 17:49:13.862 CST ] [ConfigureListener.typicalConfigure:366]  DEFAULT_SERVICE FREE
[main] [ 2024-05-10 17:49:13.863 CST ] [ConfigureListener.isPortFree:1274]  Checking if port 1521 is free on local machine...
[main] [ 2024-05-10 17:49:13.863 CST ] [ConfigureListener.isPortFree:1289]  InetAddress.getByName(127.0.0.1): /127.0.0.1
[main] [ 2024-05-10 17:49:23.880 CST ] [ConfigureListener.isPortFree:1291]  Local host IP address: bogon/61.160.148.90
[main] [ 2024-05-10 17:49:23.880 CST ] [ConfigureListener.isPortFree:1293]  Local host name: bogon
[main] [ 2024-05-10 17:49:23.880 CST ] [ConfigureListener.isPortFree:1304]  Address bogon
[main] [ 2024-05-10 17:49:23.881 CST ] [ConfigureListener.isPortFree:1327]  IP Address: bogon/61.160.148.90, Is IPv6 Address: false
[main] [ 2024-05-10 17:49:23.881 CST ] [ConfigureListener.isPortFree:1330]  IP Address: bogon/61.160.148.90, Is Link-Local Address: false
[main] [ 2024-05-10 17:49:23.881 CST ] [ConfigureListener.isPortFree:1355]  Creating ServerSocket on Port:1521, IP Address: bogon/61.160.148.90
[main] [ 2024-05-10 17:49:23.881 CST ] [ConfigureListener.isPortFree:1391]  无法指定被请求的地址 (Bind failed)
java.base/java.net.PlainSocketImpl.socketBind(Native Method)
java.base/java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:452)
java.base/java.net.ServerSocket.bind(ServerSocket.java:381)
java.base/java.net.ServerSocket.<init>(ServerSocket.java:243)
oracle.net.ca.ConfigureListener.isPortFree(ConfigureListener.java:1357)
oracle.net.ca.ConfigureListener.startOrStopListener(ConfigureListener.java:1443)
oracle.net.ca.ConfigureListener.typicalConfigure(ConfigureListener.java:376)
oracle.net.ca.SilentConfigure.performSilentConfigure(SilentConfigure.java:212)
oracle.net.ca.InitialSetup.<init>(NetCA.java:4450)
oracle.net.ca.NetCA.main(NetCA.java:491)
[main] [ 2024-05-10 17:49:23.881 CST ] [ConfigureListener.isPortFree:1404]  Returning is Port 1521 free: false
~                                                                                                                          

看起来配置的主机IP和监听端口不对呀,再次去检查配置过程中自动生成的 listener.ora 文件。

cat /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora

[root@bogon admin]# cat /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
# Generated by Oracle configuration tools.

DEFAULT_SERVICE_LISTENER = FREE

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 61.160.148.90)(PORT = 1539))  --->此处主机IP和端口配置错误
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

[root@bogon admin]# 

错误的监听配置文件

我的主机IP地址是 192.168.71.131,但是检查发现配置程序把主机 IP 地址和监听端口配成了莫名其妙的 61.160.148.90 和 1539 ?

再检查系统端口使用情况,也没有发现1539端口被占用的情况。

[root@bogon oracle]# netstat -tuln | grep 1539
[root@bogon oracle]# netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:44321         0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:4330          0.0.0.0:*               LISTEN     
tcp6       0      0 ::1:44321               :::*                    LISTEN     
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 ::1:4330                :::*                    LISTEN     
udp        0      0 0.0.0.0:111             0.0.0.0:*                          
udp        0      0 127.0.0.1:323           0.0.0.0:*                          
udp        0      0 0.0.0.0:43236           0.0.0.0:*                          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp6       0      0 :::111                  :::*                               
udp6       0      0 ::1:323                 :::*                               
udp6       0      0 :::50187                :::*                               
udp6       0      0 :::5353                 :::*                               

猜想可能是刚发布版本还不稳定,特定情况下出现的小Bug,后续几次安装并没有再次出现这个问题。

解决方法:
手动编辑 listener.ora 文件,修改为正确的主机 IP 地址和监听端口。

[root@bogon admin]# vi /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
# Generated by Oracle configuration tools.

DEFAULT_SERVICE_LISTENER = FREE

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.71.131)(PORT = 1521))   --->修改为正确的主机IP和端口
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

正确的配置文件

配置文件修改完成后重新进行初始化数据库,这次成功了。

[root@bogon oracle]# /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:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
输入 SYS 用户口令: 
********
输入 SYSTEM 用户口令: 
******
输入 PDBADMIN 用户口令: 
*********
准备执行数据库操作
已完成 7%
复制数据库文件
已完成 29%
正在创建并启动 Oracle 实例
已完成 30%
已完成 33%
已完成 36%
已完成 39%
已完成 43%
正在进行数据库创建
已完成 47%
已完成 49%
已完成 50%
正在创建插接式数据库
已完成 54%
已完成 71%
执行配置后操作
已完成 93%
正在运行定制脚本
已完成 100%
数据库创建完成。有关详细信息, 请查看以下位置的日志文件:
 /opt/oracle/cfgtoollogs/dbca/FREE。
数据库信息:
全局数据库名:FREE
系统标识符 (SID):FREE
有关详细信息, 请参阅日志文件 "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log"。

Connect to Oracle Database using one of the connect strings:
     Pluggable database: bogon/FREEPDB1
     Multitenant container database: bogon
[root@bogon oracle]# 

再次尝试成功了
4、连接登录数据库

安装并配置完成后,需要先设置环境变量,然后再登录 Oracle Database 23ai Free。

4.1 、配置环境变量

检查系统进程,已启动

[root@rhel93 oracle]# ps -ef | grep smon
oracle     45412       1  0 08:42 ?        00:00:00 db_smon_FREE
root       48682    6259  0 13:17 pts/0    00:00:00 grep --color=auto smon

切换到 oracle 用户配置环境变量:
配置环境变量
4.2 、登录数据库

登录后查询报错
尝试启动一下,发现启动不了。

启动报错

直接祭出 Kill -9 大法 ,Kill 掉 smon进程,相当于强制关闭数据库,然后重新启动。

[oracle@rhel93 ~]$ ps -ef | grep smon
oracle     45412       1  0 08:42 ?        00:00:00 db_smon_FREE
oracle     48918   48691  0 13:37 pts/0    00:00:00 grep --color=auto smon
[oracle@rhel93 ~]$ kill -9 45412
[oracle@rhel93 ~]$ ps -ef | grep smon
oracle     48932   48691  0 13:38 pts/0    00:00:00 grep --color=auto smon
[oracle@rhel93 ~]$ 
[oracle@rhel93 ~]$ 
[oracle@rhel93 ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Sat May 11 13:39:40 2024
Version 23.4.0.24.05

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1603726344 bytes
Fixed Size		    5360648 bytes
Variable Size		  419430400 bytes
Database Buffers	 1174405120 bytes
Redo Buffers		    4530176 bytes
Database mounted.
Database opened.
SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs

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

登录数据库
这样Oracle Database 23ai RPM 下载、安装就完成了,作为体验版,安装过程相比较之前简洁顺滑许多,期待后续的正式版本。

5、附录 - 配置、数据库文件和日志位置

参见官方文档说明:
配置、数据库文件和日志位置

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值