如何获得一个Oracle 23ai数据库(vagrant box)

news2024/11/24 14:12:09

准确的说,是Oracle 23ai Free Developer版,因为企业版目前只在云上(OCI和Azure)和ECC上提供。

前面我博客介绍了3种方法:

  1. Virtual Appliance
  2. RPM安装
  3. Docker

今天介绍最近新出的一种方法,也是我最为推荐的方法,使用vagrant box一键式获取23ai。

要使用这种方法,你需要有以下2个软件:

  • Oracle VirtualBox
  • Vagrant

然后克隆Oracle官方的vagrant项目:

git clone https://github.com/oracle/vagrant-projects.git

或许你早已克隆,但这个23ai是最近才有的,所以你更新一下就好:

git pull origin main

然后,进入23.4.0-Free目录:运行vagrant up即可,以下是日志片段:

PS C:\Users\****\Desktop\WORKSPACE\vagrant-projects\OracleDatabase\23.4.0-Free> vagrant up
==> vagrant: Getting Proxy Configuration from Host...
Bringing machine 'oracle23ai-free-vagrant' up with 'virtualbox' provider...
==> oracle23ai-free-vagrant: Box 'oraclelinux/9' could not be found. Attempting to find and install...
    oracle23ai-free-vagrant: Box Provider: virtualbox
    oracle23ai-free-vagrant: Box Version: >= 0
==> oracle23ai-free-vagrant: Loading metadata for box 'https://oracle.github.io/vagrant-projects/boxes/oraclelinux/9.json'
    oracle23ai-free-vagrant: URL: https://oracle.github.io/vagrant-projects/boxes/oraclelinux/9.json
==> oracle23ai-free-vagrant: Adding box 'oraclelinux/9' (v9.3.513) for provider: virtualbox
    oracle23ai-free-vagrant: Downloading: https://yum.oracle.com/boxes/oraclelinux/ol9/OL9U3_x86_64-vagrant-virtualbox-b513.box
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Calculating and comparing box checksum...
==> oracle23ai-free-vagrant: Successfully added box 'oraclelinux/9' (v9.3.513) for 'virtualbox'!
==> oracle23ai-free-vagrant: Importing base box 'oraclelinux/9'...
==> oracle23ai-free-vagrant: Matching MAC address for NAT networking...
==> oracle23ai-free-vagrant: Checking if box 'oraclelinux/9' version '9.3.513' is up to date...
==> oracle23ai-free-vagrant: Setting the name of the VM: oracle23ai-free-vagrant
==> oracle23ai-free-vagrant: Clearing any previously set network interfaces...
==> oracle23ai-free-vagrant: Preparing network interfaces based on configuration...
    oracle23ai-free-vagrant: Adapter 1: nat
==> oracle23ai-free-vagrant: Forwarding ports...
    oracle23ai-free-vagrant: 1521 (guest) => 1521 (host) (adapter 1)
    oracle23ai-free-vagrant: 22 (guest) => 2222 (host) (adapter 1)
==> oracle23ai-free-vagrant: Running 'pre-boot' VM customizations...
==> oracle23ai-free-vagrant: Booting VM...
==> oracle23ai-free-vagrant: Waiting for machine to boot. This may take a few minutes...
    oracle23ai-free-vagrant: SSH address: 127.0.0.1:2222
    oracle23ai-free-vagrant: SSH username: vagrant
    oracle23ai-free-vagrant: SSH auth method: private key
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Vagrant insecure key detected. Vagrant will automatically replace
    oracle23ai-free-vagrant: this with a newly generated keypair for better security.
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Inserting generated public key within guest...
    oracle23ai-free-vagrant: Removing insecure key from the guest if it's present...
    oracle23ai-free-vagrant: Key inserted! Disconnecting and reconnecting using new SSH key...
==> oracle23ai-free-vagrant: Machine booted and ready!
==> oracle23ai-free-vagrant: Checking for guest additions in VM...
==> oracle23ai-free-vagrant: Setting hostname...
==> oracle23ai-free-vagrant: Configuring proxy environment variables...
==> oracle23ai-free-vagrant: Configuring proxy for Yum...
==> oracle23ai-free-vagrant: Mounting shared folders...
    oracle23ai-free-vagrant: /vagrant => C:/Users/****/Desktop/WORKSPACE/vagrant-projects/OracleDatabase/23.4.0-Free
==> oracle23ai-free-vagrant: Running provisioner: shell...
    oracle23ai-free-vagrant: Running: C:/Users/****/AppData/Local/Temp/vagrant-shell20240614-21940-manzyc.sh
    oracle23ai-free-vagrant: INSTALLER: Started up
    oracle23ai-free-vagrant: Oracle Linux 9 BaseOS Latest (x86_64)           7.1 MB/s |  27 MB     00:03
    oracle23ai-free-vagrant: Oracle Linux 9 Application Stream Packages (x86 8.3 MB/s |  36 MB     00:04
    oracle23ai-free-vagrant: Oracle Linux 9 UEK Release 7 (x86_64)           4.6 MB/s |  36 MB     00:07
    oracle23ai-free-vagrant: Last metadata expiration check: 0:00:07 ago on Fri 14 Jun 2024 08:33:01 AM UTC.
    oracle23ai-free-vagrant: Dependencies resolved.
    oracle23ai-free-vagrant: =====================================================================================================
    oracle23ai-free-vagrant:  Package                         Arch    Version                             Repository          Size
    oracle23ai-free-vagrant: =====================================================================================================
    oracle23ai-free-vagrant: Installing:
    oracle23ai-free-vagrant:  kernel-uek-core                 x86_64  5.15.0-207.156.6.el9uek             ol9_UEKR7           49 M
    oracle23ai-free-vagrant:  kernel-uek-devel                x86_64  5.15.0-207.156.6.el9uek             ol9_UEKR7           39 M
    oracle23ai-free-vagrant: Upgrading:
    oracle23ai-free-vagrant:  NetworkManager                  x86_64  1:1.46.0-8.0.1.el9_4                ol9_baseos_latest  2.3 M
    oracle23ai-free-vagrant:  NetworkManager-libnm            x86_64  1:1.46.0-8.0.1.el9_4                ol9_baseos_latest  1.9 M
    oracle23ai-free-vagrant:  acl                             x86_64  2.3.1-4.el9                         ol9_baseos_latest   87 k
...
    oracle23ai-free-vagrant: INSTALLER: Oracle preinstall and openssl complete
    oracle23ai-free-vagrant: INSTALLER: Environment variables set
    oracle23ai-free-vagrant: INSTALLER: Downloading Oracle Database software
    oracle23ai-free-vagrant: Last metadata expiration check: 0:06:04 ago on Fri 14 Jun 2024 04:33:01 PM +08.
    oracle23ai-free-vagrant: Dependencies resolved.
    oracle23ai-free-vagrant: ================================================================================
    oracle23ai-free-vagrant:  Package                        Arch        Version     Repository         Size
    oracle23ai-free-vagrant: ================================================================================
    oracle23ai-free-vagrant: Installing:
    oracle23ai-free-vagrant:  oracle-database-free-23ai      x86_64      1.0-1       @commandline      1.3 G
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Transaction Summary
    oracle23ai-free-vagrant: ================================================================================
    oracle23ai-free-vagrant: Install  1 Package
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Total size: 1.3 G
    oracle23ai-free-vagrant: Installed size: 3.6 G
    oracle23ai-free-vagrant: Downloading Packages:
    oracle23ai-free-vagrant: Running transaction check
    oracle23ai-free-vagrant: Transaction check succeeded.
    oracle23ai-free-vagrant: Running transaction test
    oracle23ai-free-vagrant: Transaction test succeeded.
    oracle23ai-free-vagrant: Running transaction
    oracle23ai-free-vagrant:   Preparing        :                                                        1/1
    oracle23ai-free-vagrant:   Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                 1/1
    oracle23ai-free-vagrant:   Installing       : oracle-database-free-23ai-1.0-1.x86_64                 1/1
    oracle23ai-free-vagrant:   Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                 1/1
    oracle23ai-free-vagrant: [INFO] Executing post installation scripts...
    oracle23ai-free-vagrant: [INFO] Oracle home installed successfully and ready to be configured.
    oracle23ai-free-vagrant: 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.
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant:   Verifying        : oracle-database-free-23ai-1.0-1.x86_64                 1/1
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Installed:
    oracle23ai-free-vagrant:   oracle-database-free-23ai-1.0-1.x86_64
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Complete!
    oracle23ai-free-vagrant: INSTALLER: Oracle software installed
    oracle23ai-free-vagrant: 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:
    oracle23ai-free-vagrant: Confirm the password:
    oracle23ai-free-vagrant: Configuring Oracle Listener.
    oracle23ai-free-vagrant: Listener configuration succeeded.
    oracle23ai-free-vagrant: Configuring Oracle Database FREE.
    oracle23ai-free-vagrant: Enter SYS user password:
    oracle23ai-free-vagrant: *************
    oracle23ai-free-vagrant: Enter SYSTEM user password:
    oracle23ai-free-vagrant: ***************
    oracle23ai-free-vagrant: Enter PDBADMIN User Password:
    oracle23ai-free-vagrant: ***************
    oracle23ai-free-vagrant: Prepare for db operation
    oracle23ai-free-vagrant: 7% complete
    oracle23ai-free-vagrant: Copying database files
    oracle23ai-free-vagrant: 29% complete
    oracle23ai-free-vagrant: Creating and starting Oracle instance
    oracle23ai-free-vagrant: 30% complete
    oracle23ai-free-vagrant: 33% complete
    oracle23ai-free-vagrant: 36% complete
    oracle23ai-free-vagrant: 39% complete
    oracle23ai-free-vagrant: 43% complete
    oracle23ai-free-vagrant: Completing Database Creation
    oracle23ai-free-vagrant: 47% complete
    oracle23ai-free-vagrant: 49% complete
    oracle23ai-free-vagrant: 50% complete
    oracle23ai-free-vagrant: Creating Pluggable Databases
    oracle23ai-free-vagrant: 54% complete
    oracle23ai-free-vagrant: 71% complete
    oracle23ai-free-vagrant: Executing Post Configuration Actions
    oracle23ai-free-vagrant: 93% complete
    oracle23ai-free-vagrant: Running Custom Scripts
    oracle23ai-free-vagrant: 100% complete
    oracle23ai-free-vagrant: Database creation complete. For details check the logfiles at:
    oracle23ai-free-vagrant:  /opt/oracle/cfgtoollogs/dbca/FREE.
    oracle23ai-free-vagrant: Database Information:
    oracle23ai-free-vagrant: Global Database Name:FREE
    oracle23ai-free-vagrant: System Identifier(SID):FREE
    oracle23ai-free-vagrant: Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.
    oracle23ai-free-vagrant:
    oracle23ai-free-vagrant: Connect to Oracle Database using one of the connect strings:
    oracle23ai-free-vagrant:      Pluggable database: localhost.localdomain/FREEPDB1
    oracle23ai-free-vagrant:      Multitenant container database: localhost.localdomain
    oracle23ai-free-vagrant: INSTALLER: Database created
    oracle23ai-free-vagrant: oracle-free-23ai.service is not a native service, redirecting to systemd-sysv-install.
    oracle23ai-free-vagrant: Executing: /usr/lib/systemd/systemd-sysv-install enable oracle-free-23ai
    oracle23ai-free-vagrant: INSTALLER: Created and enabled oracle-free-23ai systemd service
    oracle23ai-free-vagrant: INSTALLER: setPassword.sh file set up
    oracle23ai-free-vagrant: INSTALLER: Running user-defined post-setup scripts
    oracle23ai-free-vagrant: INSTALLER: Done running user-defined post-setup scripts
    oracle23ai-free-vagrant: ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: 3PZKRiIBbhsS1
    oracle23ai-free-vagrant: INSTALLER: Installation complete, database ready to use!

和生成其他版本的Oracle 数据库不同,23ai无需提前准备安装介质,这是在安装中自动下载的,因此网速很重要。

另外,这个数据库的操作系统是Oracle Linux 9:

[vagrant@localhost ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.4 (Plow)

PDB不是orclpdb1了,而是freepdb1:

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Mon Jun 17 15:02:50 2024
Version 23.4.0.24.05

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


Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.4.0.24.05

SQL> show pdbs

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

立此存照:
在这里插入图片描述
最后,看下环境变量设置:

$ tail .bashrc
...
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
export ORACLE_SID=FREE
export PATH=$PATH:$ORACLE_HOME/bin

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1831442.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

如何使用任意浏览器远程访问本地搭建的Jellyfin影音平台

文章目录 前言1. Jellyfin服务网站搭建1.1 Jellyfin下载和安装1.2 Jellyfin网页测试 2.本地网页发布2.1 cpolar的安装和注册2.2 Cpolar云端设置2.3 Cpolar本地设置 3.公网访问测试4. 结语 前言 本文主要分享如何使用Windows电脑本地部署Jellyfin影音服务并结合cpolar内网穿透工…

Linux---系统的初步学习【项目一:Linux操作系统的安装与配置】

项目一 Linux操作系统的安装与配置 1.1 项目知识准备 1.1.1 操作系统是什么? ​ 操作系统(Operating System,OS)是管理计算机硬件与软件资源的计算机程序。操作系统需要处理如管理硬件、决定程序运行的优先次序、管理文件系统等…

遗传算法浅理解

1. 什么是遗传算法? ​ 遗传算法,又称为 Genetic algorithm(GA)Genetic algorithm(GA)。其主要思想就是模拟生物的遗传与变异。它的用途非常广泛,可以用于加速某些求最大或者最小值的算法(换句话说就是加速算法收敛,最…

月球全月地质图和4.5亿像素月面标注地图

嫦娥六号都在月球挖到土特产了,那你知道月球到底长什么样子吗? 现在我们就为你分享一下月球的全月地质图,以及4.5亿像素月面带标注的地图,你可以在文末查看该数据的领取方法。 月球全月地质图 对于月球的探索,美国和…

如何高效使用大型语言模型 LLMs 初学者版本 简单易上手

第一条也是最重要的一条规则是 永远不要要求LLM提供你无法自己验证的信息, 或让它完成你无法验证其正确性的任务。 唯一例外的情况是那些无关紧要的任务, 例如,让大型语言模型提供公寓装修灵感之类的是可以的 。 首先请看两个范例 不佳示范&#xff1a…

SAP 采购订单 价格 条件权限控制 授权账户

采购订单 价格 条件权限控制 授权账户 1、事务代码 me21/22/23/N 2、权限对像如下几个 M_BEST_BSA/EKG/EKO/WRK ACTVT 09 SELECT DISTINCT a.* FROM ( SELECT DISTINCT agr_users.uname FROM agr_1251INNER JOIN agr_users ON agr_1251.agr_name agr_users.agr_name AND…

智能制造uwb高精度定位系统模块,飞睿智能3厘米定位测距芯片,无人机高速传输

在科技日新月异的今天,定位技术已经渗透到我们生活的方方面面。从手机导航到自动驾驶,再到无人机定位,都离不开精准的定位系统。然而,随着应用场景的不断拓展,传统的定位技术如GPS、WiFi定位等,因其定位精度…

WPF 深入理解一、基础知识介绍

基础知识 本系列文章是对个人 B站 up 微软系列技术教程 记录 视频地址 https://www.bilibili.com/video/BV1HC4y1b76v/?spm_id_from333.999.0.0&vd_source0748f94a553c71a2b0125078697617e3 winform 与 wpf 异同 1.winform 项目结构 编辑主要是在 Form1.cs(页面)&#…

Go基础编程 - 09 - 通道(channel)

通道(channel) 1. 声明2. channel的操作3. 无缓冲通道4. 有缓冲通道5. 如何优雅的从通道循环取值6. 单向通道7. 异常总结 上一篇:结构体 Go语言的并发模式:不要通过共享内存来通信,而应该通过通信来共享内存。 Go语言…

Spring框架永远滴神之SpringAI玩转大模型

文章目录 一、SpringAI简介1.什么是SpringAI2.SpringAI支持的大模型类型(1)聊天模型(2)文本到图像模型(3)转录(音频到文本)模型(4)嵌入模型(5&…

报错:C1189#error: The <experimental/filesystem> header providing 解决方案

今天开发过程中,需要使用文件系统experimental/filesystem,报错C1189#error: The <experimental/filesystem> header providing ,通过以下解决方案,成功运行程序。 目录 一、打开项目下的属性 二、选择C/…

离散数学-代数系统证明题归类

什么是独异点? 运算 在B上封闭,运算 可结合,且存在幺元。 学会合理套用题目公式结合律 零元? 群中不可能有零元 几个结论要熟记: 1.当群的阶为1时,它的唯一元素视作幺元e 2.若群的阶大于1时,…

PV180R1K1T1NMMC派克通轴传动结构柱塞泵

PV180R1K1T1NMMC派克通轴传动结构柱塞泵 派克柱塞泵的结构组成部分:柱塞、手把、斜盘、压盘、滑履、泵体、配油盘、传送轴。其优点如下: 1、结构紧凑耐用,具有灵活的安装接口 2、安静的工作 3、效率高 4、降低功耗和减少发热 5、具有“…

视角概述( Perspective 业务分析篇)

背景 在业务分析工作中使用透视图来提供对特定于计划上下文的任务和技术的关注。大多数提案可能涉及一个或多个视角。视角主要包括: •敏捷•商业智能•信息技术•商业架构,以及业务流程管理。这些视角并不代表业务分析实践的所有可能视角。 任何给定…

SpringMvc—域对象共享数据和视图

一、向request域创建对象 先创建首页: 在testController这个类中: package com.pon.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; Controller public class test…

【UE5.1】制作自己的载具

目录 前言 效果 步骤 一、制作载具模型 二、载具设置 三、控制载具 前言 在前面我们通过UE4完成了载具的制作,下面我们介绍一下如何通过UE5制作载具。 效果 步骤 一、制作载具模型 制作方法同【UE4 制作自己的载具】1-使用3dsmax制作载具 二、载具设置 …

高考杂志高考杂志社高考编辑部2024年第14期目录

高考论坛 新高考背景下优化高中数学教学方法探究 韩玉新; 3-5 基于高考评价体系的高中历史大单元复习模式建构 钱敏杰; 6-8 新高考背景下高中语文课堂优化作业设计策略 吴丽容; 9-11《高考》投稿:cn7kantougao163.com 新高考视域下高中地理课堂促进…

别太小看“静态免杀“

0x01 简述 免杀总体来说可分为两种,静态免杀/动态免杀。往往来说,我们更注重于在内部代码层面实现一些免杀技巧,但在有些时候,动态免杀静态免杀以"打组合拳"的方式效果往往会更出人所料。 当我们的程序生成后&#xf…

高考志愿填报和未来的职业规划

高考成绩出来那一刻,我们就站在了人生的岔路口上,面临这不同的选择,走不同的路线、过不同的生活...... 除了成绩会决定一个人的未来走向之外,报考的专业和学校影响也是终身。高考志愿填报和未来职业规划应该息息相关,…

python图像处理库-PIL(Pillow)

PIL库全称为Python Imaging Library,即Python图像处理库,是一个在Python中用于处理图像的非常流行的库。 一、PIL介绍 这个库提供了广泛的文件格式支持、高效的内部表示以及相当强大的图像处理功能。 核心图像库旨在快速访问存储在几种基本像素格式中的数…