Oracle Linux上安装ORDS

ORDS就是Oracle REST Data Services。

环境如下:

  • Oracle Linux 8
  • Oracle Database 19c
  • IP地址为A.B.C.D

要安装最新版本的ORDS,当前为24.1.1。

全程参考文档:Installing and Configuring Oracle REST Data Services

安装ORDS

添加repository到yum配置中

## 如果是Linux 7
sudo  yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/oracle/software/x86_64## 如果是Linux 8
sudo  yum-config-manager --add-repo=https://yum.oracle.com/repo/OracleLinux/OL8/oracle/software/x86_64/

yum安装,速度很快,就115M:

$ yum info ords
Last metadata expiration check: 0:00:21 ago on Wed 29 May 2024 07:45:32 AM GMT.
Available Packages
Name         : ords
Version      : 24.1.1
Release      : 4.el8
Architecture : noarch
Size         : 115 M
Source       : ords-24.1.1-4.el8.src.rpm
Repository   : ol8_oci_included
Summary      : Oracle REST Data Services
URL          : https://www.oracle.com/database/technologies/appdev/rest.html
License      : Oracle Free Use Terms and Conditions.
Description  : Oracle REST Data Services (ORDS) makes it easy to develop modern REST: interfaces for relational data in the Oracle DatabaseName         : ords
Version      : 24.1.1
Release      : 4.el8
Architecture : noarch
Size         : 115 M
Source       : ords-24.1.1-4.el8.src.rpm
Repository   : yum.oracle.com_repo_OracleLinux_OL8_oracle_software_x86_64_
Summary      : Oracle REST Data Services
URL          : https://www.oracle.com/database/technologies/appdev/rest.html
License      : Oracle Free Use Terms and Conditions.
Description  : Oracle REST Data Services (ORDS) makes it easy to develop modern REST: interfaces for relational data in the Oracle Database$ sudo yum install ords
created by dnf config-manager from https://yum.oracle.com/repo/OracleLinux/OL8/oracle/software/x86_64/ 3.2 MB/s | 119 kB     00:00
Dependencies resolved.
=======================================================================================================================================Package                   Architecture                Version                             Repository                             Size
=======================================================================================================================================
Installing:ords                      noarch                      24.1.1-4.el8                        ol8_oci_included                      115 MTransaction Summary
=======================================================================================================================================
Install  1 PackageTotal download size: 115 M
Installed size: 119 M
Is this ok [y/N]: y
Downloading Packages:
ords-24.1.1-4.el8.noarch.rpm                                                                            59 MB/s | 115 MB     00:01
---------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                   58 MB/s | 115 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transactionPreparing        :                                                                                                               1/1Running scriptlet: ords-24.1.1-4.el8.noarch                                                                                      1/1Installing       : ords-24.1.1-4.el8.noarch                                                                                      1/1Running scriptlet: ords-24.1.1-4.el8.noarch                                                                                      1/1
WARN: ORDS requires Java 11 or 17.You can install Oracle Java at https://www.oracle.com/java/technologies/downloads/#java11.
INFO: Before starting ORDS service, run the below command as user oracle:ords --config /etc/ords/config install
INFO: To enable the ORDS service during startup, run the below command:sudo  systemctl enable ordsVerifying        : ords-24.1.1-4.el8.noarch                                                                                      1/1Installed:ords-24.1.1-4.el8.noarchComplete!

安装尾部有重要的信息,给出了后续配置的命令和启动服务的命令:

INFO: Before starting ORDS service, run the below command as user oracle:ords --config /etc/ords/config install
INFO: To enable the ORDS service during startup, run the below command:sudo  systemctl enable ords

配置ORDS

虽然我已经有Java 8,ORDS需要Java 11或以上才能运行。

$ ords --config /etc/ords/config installError: ORDS requires Java 11 and above to run.Found Java version 1.8.0_341.Please set JAVA_HOME to appropriate version and update PATH if necessary.

从官网下载JDK并安装:

$ sudo rpm -ivh jdk-11.0.23_linux-x64_bin.rpm

不小心下载了个低版本的,没关系,也能用。

配置其实就1个命令:

ords --config /etc/ords/config install

但这个命令实际在配置成功后,还会运行ORDS。所以这是个前台命令,不要傻傻的等他结束。看到下面的信息,就表示安装成功了。

...
2024-05-29T07:59:25.535Z INFO        Oracle REST Data Services initialized
Oracle REST Data Services version : 24.1.1.r1201228
Oracle REST Data Services server info: jetty/10.0.20
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 11.0.23+7-LTS-222

第一次安装失败,因为有个PDB:ORCLPDB2没有打开。你可以打开或者删除他,我选择了后者。

$ ords --config /etc/ords/config installORDS: Release 24.1 Production on Wed May 29 07:56:06 2024Copyright (c) 2010, 2024, Oracle.Configuration:/etc/ords/configThe configuration folder /etc/ords/config does not contain any configuration files.Oracle REST Data Services - Interactive InstallEnter a number to select the TNS net service name to use from /u01/app/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora or specify the database connection[1] ORCL         SERVICE_NAME=orcl[2] ORCLPDB1     SERVICE_NAME=orclpdb1[3] VAGRANT      SERVICE_NAME=orclpdb1[S] Specify the database connectionChoose [1]: 1Provide database user name with administrator privileges.Enter the administrator username: sysEnter the database password for SYS AS SYSDBA:
Error cannot install/upgrade ORDS into the CDB because the container requires to be in READ WRITE mode.
PDB ORCLPDB2 - MOUNTED

这是安装成功的那次:

$ ords --config /etc/ords/config installORDS: Release 24.1 Production on Wed May 29 07:58:02 2024Copyright (c) 2010, 2024, Oracle.Configuration:/etc/ords/configThe configuration folder /etc/ords/config does not contain any configuration files.Oracle REST Data Services - Interactive InstallEnter a number to select the TNS net service name to use from /u01/app/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora or specify the database connection[1] ORCL         SERVICE_NAME=orcl[2] ORCLPDB1     SERVICE_NAME=orclpdb1[3] VAGRANT      SERVICE_NAME=orclpdb1[S] Specify the database connectionChoose [1]: 1Provide database user name with administrator privileges.Enter the administrator username: sysEnter the database password for SYS AS SYSDBA:Retrieving information...
Your database connection is to a CDB.  ORDS common user ORDS_PUBLIC_USER will be created in the CDB.  ORDS schema will be installed in the PDBs.
Root CDB$ROOT - create ORDS common user
PDB PDB$SEED - install ORDS 24.1.1.r1201228 (mode is READ ONLY, open for READ/WRITE)
PDB ORCLPDB1 - install ORDS 24.1.1.r1201228Install ORDS in the database[1] Yes[2] NoChoose [1]: 1
ORDS is not installed in the database. ORDS installation is required.Enter a number to update the value or select option A to Accept and Continue[1] Connection Type: TNS[2] TNS Connection: TNS_NAME=ORCL TNS_FOLDER=/u01/app/oracle/product/19c/dbhome_1/network/adminAdministrator User: SYS AS SYSDBA[3] Database password for ORDS runtime user (ORDS_PUBLIC_USER): <generate>[4] ORDS runtime user and schema tablespaces:  Default: SYSAUX Temporary TEMP[5] Additional Feature: Database Actions[6] Configure and start ORDS in Standalone Mode: Yes[7]    Protocol: HTTP[8]       HTTP Port: 8080[A] Accept and Continue - Create configuration and Install ORDS in the database[Q] Quit - Do not proceed. No changesChoose [A]: A
The setting named: db.connectionType was set to: tns in configuration: default
The setting named: db.tnsAliasName was set to: ORCL in configuration: default
The setting named: db.tnsDirectory was set to: /u01/app/oracle/product/19c/dbhome_1/network/admin in configuration: default
The setting named: db.serviceNameSuffix was set to:  in configuration: default
The setting named: db.username was set to: ORDS_PUBLIC_USER in configuration: default
The setting named: db.password was set to: ****** in configuration: default
The setting named: feature.sdw was set to: true in configuration: default
The global setting named: database.api.enabled was set to: true
The setting named: restEnabledSql.active was set to: true in configuration: default
The global setting named: standalone.http.port was set to: 8080
The global setting named: standalone.static.context.path was set to: /ords
The global setting named: standalone.doc.root was set to: /etc/ords/config/global/doc_root
The setting named: security.requestValidationFunction was set to: ords_util.authorize_plsql_gateway in configuration: default
2024-05-29T07:58:37.755Z INFO        Created folder /home/oracle/logs
2024-05-29T07:58:37.756Z INFO        The log file is defaulted to the current working directory located at /home/oracle/logs
2024-05-29T07:58:37.834Z INFO        Installing Oracle REST Data Services version 24.1.1.r1201228 in CDB$ROOT
2024-05-29T07:58:39.837Z INFO        ... Verified database prerequisites
2024-05-29T07:58:40.387Z INFO        ... Created Oracle REST Data Services proxy user
2024-05-29T07:58:40.508Z INFO        Completed installation for Oracle REST Data Services version 24.1.1.r1201228. Elapsed time: 00:00:02.6422024-05-29T07:58:40.831Z INFO        Installing Oracle REST Data Services version 24.1.1.r1201228 in PDB$SEED
2024-05-29T07:58:41.093Z INFO        ... Verified database prerequisites
2024-05-29T07:58:41.864Z INFO        ... Created Oracle REST Data Services proxy user
2024-05-29T07:58:42.713Z INFO        ... Created Oracle REST Data Services schema
2024-05-29T07:58:43.691Z INFO        ... Granted privileges to Oracle REST Data Services
2024-05-29T07:58:46.575Z INFO        ... Created Oracle REST Data Services database objects
2024-05-29T07:58:58.928Z INFO        Completed installation for Oracle REST Data Services version 24.1.1.r1201228. Elapsed time: 00:00:18.942024-05-29T07:58:59.322Z INFO        Installing Oracle REST Data Services version 24.1.1.r1201228 in ORCLPDB1
2024-05-29T07:58:59.452Z INFO        ... Verified database prerequisites
2024-05-29T07:58:59.894Z INFO        ... Created Oracle REST Data Services proxy user
2024-05-29T07:59:00.306Z INFO        ... Created Oracle REST Data Services schema
2024-05-29T07:59:01.064Z INFO        ... Granted privileges to Oracle REST Data Services
2024-05-29T07:59:03.723Z INFO        ... Created Oracle REST Data Services database objects
2024-05-29T07:59:13.574Z INFO        Completed installation for Oracle REST Data Services version 24.1.1.r1201228. Elapsed time: 00:00:14.2502024-05-29T07:59:13.575Z INFO        Completed CDB installation for Oracle REST Data Services version 24.1.1.r1201228. Total elapsed time: 00:00:35.7482024-05-29T07:59:13.577Z INFO        Log file written to /home/oracle/logs/ords_cdb_install_2024-05-29_075837_75683.log
2024-05-29T07:59:13.716Z INFO        HTTP and HTTP/2 cleartext listening on host: 0.0.0.0 port: 8080
2024-05-29T07:59:13.739Z INFO        Disabling document root because the specified folder does not exist: /etc/ords/config/global/doc_root
2024-05-29T07:59:13.740Z INFO        Default forwarding from / to contextRoot configured.
2024-05-29T07:59:17.828Z INFO        Configuration properties for: |default|lo|
db.password=******
db.serviceNameSuffix=
db.tnsAliasName=ORCL
conf.use.wallet=true
security.requestValidationFunction=ords_util.authorize_plsql_gateway
standalone.static.context.path=/ords
database.api.enabled=true
db.username=ORDS_PUBLIC_USER
standalone.http.port=8080
restEnabledSql.active=true
resource.templates.enabled=false
feature.sdw=true
config.required=true
db.connectionType=tns
standalone.doc.root=/etc/ords/config/global/doc_root
db.tnsDirectory=/u01/app/oracle/product/19c/dbhome_1/network/admin2024-05-29T07:59:17.831Z WARNING     *** jdbc.MaxLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***
2024-05-29T07:59:17.831Z WARNING     *** jdbc.InitialLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***
2024-05-29T07:59:25.437Z INFOMapped local pools from /etc/ords/config/databases:/ords/                              => default                        => VALID2024-05-29T07:59:25.535Z INFO        Oracle REST Data Services initialized
Oracle REST Data Services version : 24.1.1.r1201228
Oracle REST Data Services server info: jetty/10.0.20
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 11.0.23+7-LTS-222

此安装可以选择协议(本例为HTTP),端口(默认8080),还有安装在CDB还是PDB(本例为前者)。

然后我们看到服务有了,端口也起了:

$ netstat -an|grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN$ systemctl status ords
● ords.service - Oracle REST Data ServicesLoaded: loaded (/etc/systemd/system/ords.service; disabled; vendor preset: disabled)Active: active (running) since Thu 2024-05-30 00:47:59 GMT; 49min agoProcess: 53329 ExecStart=/usr/bin/bash -c /etc/init.d/ords start (code=exited, status=0/SUCCESS)Main PID: 53458 (java)Tasks: 0 (limit: 202282)Memory: 452.0KCGroup: /system.slice/ords.service‣ 53458 java -Doracle.dbtools.cmdline.home=/opt/oracle/ords -Duser.language=en -Duser.region=US -Dfile.encoding=UTF-8 -Djav>

然后浏览器访问http://A.B.C.D:8080
在这里插入图片描述

完美。

看下上面那段话:

Oracle REST Data Services (ORDS) 是用于 Oracle 数据库的 HTTPS Web 网关。功能包括 SQL Developer Web、Oracle APEX 访问、用于数据和数据库的 REST API 以及 Oracle Database API for MongoDB 等。

SQL Developer Web就是SQL Developer的网页版。其实他最新的名称是Oracle Database Actions。后续我们再探索。

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

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

相关文章

ReDos攻击浅析

DOS为拒绝服务攻击&#xff0c;re则是由于正则表达式使用不当&#xff0c;陷入正则引擎的回溯陷阱导致服务崩溃&#xff0c;大量消耗后台性能 正则 ​ 探讨redos攻击之前&#xff0c;首先了解下正则的一些知识 执行过程 大体的执行过程分为: 编译 -> 执行编译过程中&…

数据标准的制定落地

目录 什么是数据标准 基本定义 目的 数据标准体系分类 从内容层面分类 从管理视角分类 从面向的对象分类 从数据结构的角度分类 数据标准价值 业务价值 技术价值 管理价值 数据标准和数据治理的关系 数据标准在数据治理各项任务中的作用 数据标准与主数据 数据…

实用软件分享---超级轻量级的强力卸载软件工具UninstallView_1.51

专栏介绍:本专栏主要分享一些实用的软件(Po Jie版); 声明1:软件不保证时效性;只能保证在写本文时,该软件是可用的;不保证后续时间该软件能一直正常运行;不保证没有bug;如果软件不可用了,我知道后会第一时间在题目上注明(已失效)。介意者请勿订阅。 声明2:本专栏的…

django中,出现CSRF verification failed. Request aborted.错误

这是跨站点访问的防范机制&#xff0c;csrf是一个令牌&#xff0c;会验证登录&#xff0c;需要在setting中把 "django.middleware.csrViewMiddleware" 注释掉 并在html文件中的<body>内添加 {% csrf token %} 就可以了

Star CCM+边界层设置

边界层介绍 在流体仿真中&#xff0c;边界层是指靠近实体表面的流体区域&#xff0c;其作用是描述流体在实体表面附近的速度和压力分布。边界层主要影响着物体表面的摩擦阻力、热传导以及质量传输等现象。 一般来说&#xff0c;在流体仿真中会设置一到三层不同厚度的边界层。…

最常用的电平转换电路

最常用的电平转换电路 两颗NMOS搭建的电平转换电路![请添加图片描述](https://img-blog.csdnimg.cn/direct/2b496321257f4bc4a1f23a086337ed27.png)两颗NPN三极管搭建的电平转换电路二极管钳位搭建电平转换电路二极管和MOS管组合的电平转换电路专用转换芯片电平转换 两颗NMOS搭…

YAML快速编写示例

一、案例 1.1 自主式创建service关联上方的pod 资源名称my-nginx-kkk命名空间my-kkk容器镜像nginx:1.21容器端口80标签njzb:my-kkk 1.1.1 创建一个demo文件夹 1.1.2 创建并获取模版文件 1.1.3 查看服务并编写yaml文件 1.1.4 编写yaml文件并部署&#xff0c;查看服务是否运行成…

elementui中的el-checkbox-group添加全选按钮

//多选子组件 <template><div class"multiple-choice"><el-checkbox class"no1" v-if"isShowAllBtn" :indeterminate"isIndeterminate1" v-model"checkAll1" border :style"{borderColor:isIndetermina…

elementUI - 折叠以及多选的组件

//子组件 <template><!-- 左侧第二个 --><div class"left-second-more"><div class"layer-list-wrapper1"><el-collapse v-model"activeNames" change"handleChange"><el-collapse-item v-for"…

期末速成 ——计算机组成原理(2)数值的表示与运算

目录 一、定点数的表示 &#xff08;一&#xff09;无符号数和有符号数的表示 &#xff08;二&#xff09;机器数的定点表示 &#xff08;三&#xff09;原码、补码、反码、移码 (1)原码表示法 二、浮点数的表示 三、溢出判断 (一)采用一位符号位 (二)采用双符号位 四…

LC 旋转 - 模拟对象

原文链接 链接 液晶 (LC) 旋转网格属性允许您以 theta、phi 为单位指定空间变化的 LC 导向。 液晶由杆状分子结构组成&#xff0c;这些分子结构具有相对于长轴的旋转对称性。因此&#xff0c;液晶具有空间变化的单轴光学特性。 相对于分子长轴和分子短轴的折射率称为非寻常 ne …

《广告数据定量分析》第3版读书笔记之统计原理

1.点估计与区间估计:可用于求指标误差区间;(不常用) (1)总体比例的置信区间: 通过样本数据计算的比例,估计总体的对应比例的取值范围。主要适用于用户转化漏斗各环节的转化率估计,比如点击率、点击下载率、下载安装率、安装激活率等。 我们可以得到总体百分比的一个…

SRS介绍及环境搭建

1.SRS简介 SRS&#xff08;Simple Real-Time Media Server&#xff09;是一个开源的流媒体服务器&#xff0c;它支持多种流媒体协议&#xff0c;包括RTMP、WebRTC、HLS、HTTP-FLV、SRT、MPEG-DASH和GB28181等57。SRS主要应用于直播、视频会议等场景&#xff0c;提供实时音视频服…

【刷题(14)】二叉树

一、二叉树基础 /*** Definition for a binary tree node.* struct TreeNode {* int val;* TreeNode *left;* TreeNode *right;* TreeNode() : val(0), left(nullptr), right(nullptr) {}* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}* …

【并发程序设计】12.内存映射

12.内存映射 使一个磁盘文件与内存中的一个缓冲区相映射&#xff0c;进程可以像访问普通内存一样对文件进行访问&#xff0c;不必再调用read,write&#xff0c;更加高效。 用到的函数 mmap函数 原型&#xff1a; #include <sys/mman.h> void* mmap(void* start, size_…

【GD32】05 - PWM 脉冲宽度调制

PWM PWM (Pulse Width Modulation) 是一种模拟信号电平的方法&#xff0c;它通过使用数字信号&#xff08;通常是方波&#xff09;来近似地表示模拟信号。在PWM中&#xff0c;信号的占空比&#xff08;即高电平时间占整个周期的比例&#xff09;被用来控制平均输出电压或电流。…

MFC 解决Enter回车键和Esc取消键默认关闭窗口的三种方法

文章目录 问题描述问题原因解决办法方法一&#xff1a;在重载的PreTranslateMessage 函数中屏蔽回车和ESC 的消息方法二&#xff1a;重载OnOK函数方法三&#xff1a;将所有按钮类型设为普通按钮&#xff0c;并设置其中一个按钮为默认按钮 问题描述 一般情况下编写的MFC对话框程…

HTML语义化标签

<header> 主要用于网页整体顶部&#xff0c;<article>头部&#xff0c;<section>头部 <nav> 导航&#xff0c;一般有主要导航&#xff0c;路径导航&#xff0c;章节导航&#xff0c;内容目录导航 <main> 网页主要区域&#xff0c;一般一个网页…

【运维项目经历|025】企业高效邮件系统部署与运维项目

目录 项目名称 项目背景 项目目标 项目成果 我的角色与职责 我主要完成的工作内容 本次项目涉及的技术 本次项目遇到的问题与解决方法 本次项目中可能被面试官问到的问题 经验教训与自我提升 展望未来 项目名称 企业高效邮件系统部署与运维项目 项目背景 随着企业…