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 Database

Name         : 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 M

Transaction Summary
=======================================================================================================================================
Install  1 Package

Total 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 transaction
  Preparing        :                                                                                                               1/1
  Running scriptlet: ords-24.1.1-4.el8.noarch                                                                                      1/1
  Installing       : ords-24.1.1-4.el8.noarch                                                                                      1/1
  Running 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 ords

  Verifying        : ords-24.1.1-4.el8.noarch                                                                                      1/1

Installed:
  ords-24.1.1-4.el8.noarch

Complete!

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

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 install

Error: 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 install

ORDS: Release 24.1 Production on Wed May 29 07:56:06 2024

Copyright (c) 2010, 2024, Oracle.

Configuration:
  /etc/ords/config

The configuration folder /etc/ords/config does not contain any configuration files.

Oracle REST Data Services - Interactive Install

  Enter 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 connection
  Choose [1]: 1
  Provide database user name with administrator privileges.
    Enter the administrator username: sys
  Enter 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 install

ORDS: Release 24.1 Production on Wed May 29 07:58:02 2024

Copyright (c) 2010, 2024, Oracle.

Configuration:
  /etc/ords/config

The configuration folder /etc/ords/config does not contain any configuration files.

Oracle REST Data Services - Interactive Install

  Enter 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 connection
  Choose [1]: 1
  Provide database user name with administrator privileges.
    Enter the administrator username: sys
  Enter 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.r1201228

  Install ORDS in the database
    [1] Yes
    [2] No
  Choose [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/admin
           Administrator 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 changes
  Choose [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.642

2024-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.94

2024-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.250

2024-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.748

2024-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/admin

2024-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 INFO

Mapped local pools from /etc/ords/config/databases:
  /ords/                              => default                        => VALID


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

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

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

$ netstat -an|grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN

$ systemctl status ords
● ords.service - Oracle REST Data Services
   Loaded: loaded (/etc/systemd/system/ords.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2024-05-30 00:47:59 GMT; 49min ago
  Process: 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.0K
   CGroup: /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。后续我们再探索。

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

视频汇聚管理平台EasyCVR程序报错“create jwtSecret del server class:0xf98b6040”的原因排查与解决

国标GB28181协议EasyCVR安防视频监控平台可以提供实时远程视频监控、视频录像、录像回放与存储、告警、语音对讲、云台控制、平台级联、磁盘阵列存储、视频集中存储、云存储等丰富的视频能力&#xff0c;平台支持7*24小时实时高清视频监控&#xff0c;能同时播放多路监控视频流…

FreeRtos进阶——软件定时器内部逻辑

在FreeRtos软件定时器&#xff0c;是根据Systick来判断定时是否到达&#xff0c;可以是单次定时器也可以是循环定时器。在创建定时器任务后&#xff0c;在每一次SysTick中断中&#xff0c;会将定时器时钟到的任务写入定时器任务队列。在prvTimerTask任务&#xff08;守护任务&a…

微信小程序-页面配置

一、页面配置文件的作用 小程序中&#xff0c;每个页面都有自己的.json配置文件&#xff0c;用来对当前页面的窗口外观、页面效果等进行配置 二、页面配置和全局配置的关系 小程序中&#xff0c;app.json中的window节点&#xff0c;可以全局配置小程序中每个页面的窗口表现 …

算法(一)递归

文章目录 递归的概念递归三要素递归demo打印100次“hello word”斐波那契数列 递归的概念 递归算法是一种直接或者间接调用自身函数或者方法的算法。 递归三要素 递归条件结束 因为递归是循环调用自身&#xff0c;因此就必须要有结束条件&#xff0c;或者就会OOM。 函数的功…

线性代数|机器学习-P1课程简介

文章目录 1. 书籍下载2. 正文 1. 书籍下载 链接&#xff1a;https://pan.baidu.com/s/1QbK0enLh0x4nU1c4Tqwlkw 提取码&#xff1a;r7ft 本课程回顾线性代数在概率论、统计学、优化和深度学习中的应用。是GILBERT STRANG教授的有一个经典的课程。课程将线性代数分为如下部分&a…

为什么都说视频号小店值得做,具体该怎么做?新手必学

大家好&#xff0c;我是电商花花。 所有人都在告诉你2024年应该做视频号小店&#xff0c;但没有人告诉你到底应该怎么做。 今天给大家说一下为什么2024年都推荐大家去做视频号小店&#xff0c;以及分享一些视频号小店的实操干货&#xff0c;可以帮助大家更快更稳的做店。 首先…

Linux网络-Socket套接字_Windows与Linux端双平台基于Udp传输协议进行多线程跨平台的服务器与客户端网络通信的简易聊天室实现

文章目录 一、Socket套接字二、Udp 常见API1. int socket(int domain, int type, int protocol);2. int bind(int socket, const struct sockaddr *address, socklen_t address_len);struct sockaddr 3. ssize_t recvfrom(int socket, void *restrict buffer, size_t length, i…

【数据结构与算法】算法优化、时间复杂度、空间复杂度

文章目录 一、什么是复杂度&#xff1f;二、大O表示法三、时间复杂度计算四、常见复杂度的比较五、算法优化的核心方法论六、常见算法复杂度五、总结 一、什么是复杂度&#xff1f; 复杂度是衡量代码运行效率的重要的度量因素。 而复杂度主要就是指时间复杂度和空间复杂度。 …

三菱MR-J4系列伺服驱动器E7.1和32.3故障报警处理总结

三菱MR-J4系列伺服驱动器E7.1和32.3故障报警处理总结 三菱MR-J4系列伺服驱动器出现报警,故障代码为:E7.1和32.3,查阅手册可以看到E7.1和32.3的报警解释信息, 如下图所示,此时简单运动控制模块上的ERROR灯亮, 如下图所示,用GX WORKS3打开备份程序,找到FX5-80SSC-…

一维时间序列信号的广义傅里叶族变换(Matlab)

广义傅里叶族变换是一种时频变换方法&#xff0c;傅里叶变换、短时傅里叶变换、S变换和许多小波变换都是其特殊情况&#xff0c;完整代码及子函数如下&#xff0c;很容易读懂&#xff1a; % Run a demo by creating a signal, transforming it, and plotting the results% Cre…

大数据开发面试题【Mysql篇】

181、mysql数据库中的引擎 用于数据存储、处理和保护数据的核心服务&#xff0c;不同的数据库引擎有其各自的特点&#xff0c;常见的引擎&#xff1a;InnoDB&#xff0c;Mylsam、Memory、Mrg_Mylsam、Blackhole innodb&#xff1a;是一个事务性存储引擎&#xff0c;提供了对事…

Transformer 动画讲解:数据处理的四大关键步骤

节前&#xff0c;我们组织了一场算法岗技术&面试讨论会&#xff0c;邀请了一些互联网大厂朋友、今年参加社招和校招面试的同学。 针对大模型技术趋势、大模型落地项目经验分享、新手如何入门算法岗、该如何准备面试攻略、面试常考点等热门话题进行了深入的讨论。 汇总合集…

MFC工控项目实例之二添加iPlotx控件

承接专栏《MFC工控项目实例之一主菜单制作》 在WIN10下使用Visual C 6.0 &#xff08;完整绿色版&#xff09;添加iPlotx控件的方法。 1、在资源主对话框界面点击鼠标右键如图选择插入Active控件点击进入。 2、选择iPlotx Contrlolh点击确定。 3、在对话框界面插入iPlotx控件。…

NATS-研究学习

NATS-研究学习 文章目录 NATS-研究学习[toc]介绍说明提供的服务内容各模式介绍测试使用发布订阅&#xff08;Publish Subscribe&#xff09;请求响应&#xff08;Request Reply&#xff09;队列订阅&分享工作&#xff08;Queue Subscribers & Sharing Work&#xff09;…

编程入门(七)【虚拟机VMware安装Linux系统Ubuntu】

读者大大们好呀&#xff01;&#xff01;!☀️☀️☀️ &#x1f525; 欢迎来到我的博客 &#x1f440;期待大大的关注哦❗️❗️❗️ &#x1f680;欢迎收看我的主页文章➡️寻至善的主页 文章目录 &#x1f525;前言&#x1f680;Ubuntu知多少&#x1f680;安装的前期准备&am…

放开了去的 ulimit

放开了去的 ulimit 放开了去的 ulimitulimit简介临时修改打开文件数目永久修改系统总打开句柄限制更多信息 放开了去的 ulimit ulimit简介 对于高并发或者频繁读写文件的应用程序而言&#xff0c;有时可能需要修改系统能够打开的最多文件句柄数&#xff0c;否则就可能会出现t…

3389,为了保障3389端口的安全,我们可以采取的措施

3389端口&#xff0c;作为远程桌面协议&#xff08;RDP&#xff09;的默认端口&#xff0c;广泛应用于Windows操作系统中&#xff0c;以实现远程管理和控制功能。然而&#xff0c;正因为其广泛使用&#xff0c;3389端口也成为许多潜在安全威胁的入口。因此&#xff0c;确保3389…

使用C#实现VS窗体应用——画图板

✅作者简介&#xff1a;大家好&#xff0c;我是 Meteors., 向往着更加简洁高效的代码写法与编程方式&#xff0c;持续分享Java技术内容。&#x1f34e;个人主页&#xff1a;Meteors.的博客&#x1f49e;当前专栏&#xff1a;小项目✨特色专栏&#xff1a; 知识分享&#x1f96d…

ARM32开发——总线与时钟

&#x1f3ac; 秋野酱&#xff1a;《个人主页》 &#x1f525; 个人专栏:《Java专栏》《Python专栏》 ⛺️心若有所向往,何惧道阻且长 文章目录 APB总线时钟树时钟树 外部晶振内部晶振 在这个例子中&#xff0c;这条大街和巴士构成了一套系统&#xff0c;我们称之为AHB总线。 …

【数据结构】详解二叉树

文章目录 1.树的结构及概念1.1树的概念1.2树的相关结构概念1.3树的表示1.4树在实际中的应用 2.二叉树的结构及概念2.1二叉树的概念2.2特殊的二叉树2.2.1满二叉树2.2.2完全二叉树 2.3 二叉树的性质2.4二叉树的存储结构2.4.1顺序结构2.4.2链表结构 1.树的结构及概念 1.1树的概念…