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,一经查实,立即删除!

相关文章

org.apache.kafka.clients.consumer.CommitFailedException

kafka报org.apache.kafka.clients.consumer.CommitFailedException问题分析 org.apache.kafka.clients.consumer.CommitFailedException: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. This means that…

使用反射调用Android隐藏API

前情提要 每一次Android大版本的升级&#xff0c;往往会有大量的APP出现兼容性问题&#xff0c;导致这个情况的主要原因是由于APP的热修复SDKs以及依赖Android internal API(内部API)&#xff0c;也就是非SDK API。这些API是指标记hide的类、方法以及字段&#xff0c;它们不属…

多线程的坑

有以下列表&#xff0c; List shardingCreateTablesList new ArrayList(); shardingCreateTablesList.add(“tb1”); shardingCreateTablesList.add(“tb2”); shardingCreateTablesList.add(“tb3”); shardingCreateTablesList.add(“tb4”); shardingCreateTablesList.add(…

ReDos攻击浅析

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

数据标准的制定落地

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

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

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

JS中的 ?. ?? ??=

1.可选链(?.) /*只有当a存在,同时a具有name属性的时候,才会把值赋给b,否则就会将undefined赋值给b.重要的是,不管a存在与否,这么做都不会报错.*/let a;let b a?.name;//undefinedconst arr [{ name: "ww" }, { name: "qq" }];console.log(arr?.[0]);/…

Kubernetes 之 StatefulSet基本原理

Kubernetes 之 StatefulSet StatefulSet 定义 StatefulSet 是一个有状态的集合&#xff0c;不同于一般 Pod 的一致性&#xff0c;不同的 Stateful Set 创建的 Pod 之间存在数据上的差异。同时它们是有序的&#xff0c;这样它们在故障或删除后恢复&#xff0c;自身的名字也不会…

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

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

Star CCM+边界层设置

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

JZ2440笔记:rtc驱动

在common-smdk.c里smdk_devs添加&s3c_device_rtc 重新编译uImage&#xff0c;测试&#xff1a; # ls /dev/rtc* -l crw-rw---- 1 0 0 254, 0 May 6 21:58 /dev/rtc0 # date Tue May 6 21:59:56 UTC 1975 # date 05311448202420 date: invalid date …

【小白专用】mysql 添加索引-结合实战项目

mysql的索引有很多种&#xff0c;下面我们来介绍以下。 1.添加主键索引&#xff1a; primary key ALTER TABLE table_name ADD PRIMARY KEY ( column ) 2.添加 唯一索引&#xff1a; ALTER TABLE table_name ADD UNIQUE (column ) 3.添加 普通索引&#xff1a; ALTER TAB…

LLM 大语言模型学习笔记

通俗易懂的LLM&#xff08;上篇&#xff09;-CSDN博客 通俗易懂的LLM&#xff08;下篇&#xff09;-CSDN博客 前言一、大模型激活函数 1、ReLU2、GeLU3、GLU4、GeGLU5、SwiGLU二、位置编码 1、旋转位置编码三、Decoder-only模型 1、生成任务2、推理流程3、解码生成方式四、三种…

最常用的电平转换电路

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

java解析excel文件,返回json

我这里用的是springboot项目&#xff0c;配合Maven使用的。首先需要引入依赖&#xff1a; <dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>4.1.2</version></dependency><dependency…

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"…

数据结构基础篇(5)

二十一.栈和队列的定义和特点 栈 栈的定义 栈是一个特殊的线性表&#xff0c;是限定仅在一段(通常是表尾)进行插入和删除操作的线性表又叫后进后出段的线性表&#xff0c;LIFO结构栈的概念 栈是仅在表尾进行插入&#xff0c;删除操作的线性表表尾叫栈顶Top&#xff1b;表头叫栈…

修改ModelLink在RTX3090完成预训练、微调、推理、评估以及TRT-LLM转换、推理、性能测试

修改ModelLink在RTX3090完成预训练、微调、推理、评估以及TRT-LLM转换、推理、性能测试 1 参考文档2 测试环境3 创建容器4 安装AscendSpeed、ModelLink5 下载LLAMA2-7B预训练权重和词表6 huggingface模型的推理及性能测试7.1 修改torch,deepspeed规避缺失npu环境的问题7.2 修改…