Oracle Linux上安装ORDS

news2024/11/16 2:26:01

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。后续我们再探索。

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

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

相关文章

固定翼飞机(固定翼飞行器)种类丰富 国家政策推动行业发展速度加快

固定翼飞机&#xff08;固定翼飞行器&#xff09;种类丰富 国家政策推动行业发展速度加快 固定翼飞机又称固定翼飞行器&#xff0c;指机翼固定于机身&#xff0c;可通过固定机翼产生升力的飞行器。固定翼飞机具有机动性强、运载量大、航程远、飞行速度快等优势&#xff0c;在农…

Redis用GEO实现附近的人功能

文章目录 ☃️概述☃️命令演示☃️API将数据库表中的数据导入到redis中去☃️实现附近功能 ☃️概述 GEO就是Geolocation的简写形式&#xff0c;代表地理坐标。Redis在3.2版本中加入了对GEO的支持&#xff0c;允许存储地理坐标信息&#xff0c;帮助我们根据经纬度来检索数据。…

排八字软件有哪些?

排八字软件有哪些&#xff1f;在市面上有很多排八字的软件可供选择&#xff0c;其中一些比较知名的有&#xff1a; 无敌八字排盘软件&#xff1a;这是一款功能强大的八字排盘软件&#xff0c;提供详细的八字解析和命理分析服务&#xff0c;且完全免费。 网易星盘&#xff1a;网…

珠宝首饰AR虚拟3D试戴增强企业商品营销效果

在西安这座古老与现代交织的城市中&#xff0c;VRAR软件开发公司相比其他城市也略多一些&#xff0c;作为专业的西安AR软件开发公司&#xff0c;我们正凭借着前沿的AR增强现实/VR虚拟现实技术&#xff0c;为客户打造独一无二的互动体验。 专业团队&#xff0c;定制开发 我们拥有…

OAK相机如何将 YOLOv9 模型转换成 blob 格式?

编辑&#xff1a;OAK中国 首发&#xff1a;oakchina.cn 喜欢的话&#xff0c;请多多&#x1f44d;⭐️✍ 内容可能会不定期更新&#xff0c;官网内容都是最新的&#xff0c;请查看首发地址链接。 Hello&#xff0c;大家好&#xff0c;这里是OAK中国&#xff0c;我是Ashely。 专…

如何做好流程优化?看这里的目的、原则和方法

流程管理的本质是通过构造卓越的业务流程让流程增值&#xff0c;为客户创造真正的价值。 但卓越的业务流程并不是一蹴而就的&#xff0c;有一个过程&#xff0c;这个过程就是业务流程和流程管理体系不断优化提升的过程&#xff08;可以参照流程成熟度评价模型&#xff09;。 …

[pdf,epub]《软件方法》2024版电子书共290页(202405更新)

DDD领域驱动设计批评文集 做强化自测题获得“软件方法建模师”称号 《软件方法》各章合集 已上传本账号CSDN资源。 或者到以下链接下载&#xff1a; http://www.umlchina.com/url/softmeth2024.html&#xff0c;或点击“阅读原文”。 如果需要提取码&#xff1a;umlc 已排…

【SpringMVC】_简单示例计算器

目录 1. 需求分析 2. 接口定义 3. 请求参数 4. 响应数据 5. 服务器代码 6. 前端页面代码 7. 运行测试 为阶段性总结与应用&#xff0c;现将以Spring MVC项目创建一个可以实现加法的计算器为例 1. 需求分析 加法计算器功能&#xff0c;对两个整数进行相加&#xff0c;需…

uniapp跨端代码编写(h5和钉钉小程序)

页面开发 差异。小程序编译机制不一样&#xff0c;我在写h5的时候&#xff0c;页面布局啥的都是用uniapp的扩展组件来修改的&#xff08;都是改的原生组件的样式&#xff09;&#xff0c;小程序编译有组件隔离&#xff0c;不能直接修改组件的原生样式&#xff0c;查了很多资料…

Golang | Leetcode Golang题解之第120题三角形最小路径和

题目&#xff1a; 题解&#xff1a; func minimumTotal(triangle [][]int) int {n : len(triangle)f : make([]int, n)f[0] triangle[0][0]for i : 1; i < n; i {f[i] f[i - 1] triangle[i][i]for j : i - 1; j > 0; j-- {f[j] min(f[j - 1], f[j]) triangle[i][j]…

[RK3588-Andoird12] 关于LED灯控芯片is31fl3216和is31fl3236调试

问题描述 RK默认dts配置中并没有issi,is31fl32xx相关的配置指导。 is31fl3236是12X3 36路RGB is31fl3216是6X3 18路RGB 解决方案&#xff1a; is31fl3236 dts配置如下&#xff1a; &i2c1 {clock-frequency <400000>;status "okay";is31fl3236: led-co…

苏州金龙新V系客车科技助力“粤”动广州

粤动活力新V系&#xff01; 5月23日&#xff0c;苏州金龙新V系智慧客车推介会在羊城广州举行。活动现场展出了4款新V系代表车型&#xff0c;来自广东省旅游客运、道路运输行业的200余位从业者齐聚一堂&#xff0c;共同品鉴、体验了苏州金龙新V系产品的“新、心、芯”魅力。苏州…

接口设计的最佳实践-下篇

大多数程序员&#xff0c;做得最多的事&#xff0c;也不过是写接口这件事而已。 今天继续总结下接口设计需要注意的点。尽量每种都给出具体的场景、案例等&#xff0c;希望大家能有所收获。 1、接口幂等 幂等性&#xff1a;是指一个操作或者一个服务&#xff0c;无论执行多少…

GD32F470+lwip 丢包问题分析及解决

最近在用GD32和管理机之间用TCP协议开发一个功能&#xff0c;功能都没问题&#xff0c;后面跑大量发包时候的连续测试时&#xff0c;总是会出现偶发性的&#xff0c;大概几分钟到数十分钟的一次丢包。尽管在应用层做了超时机制&#xff0c;一旦超时就会重新建立socket链接并重新…

JavaScript的内存管理机制

No.内容链接1Openlayers 【入门教程】 - 【源代码示例300】 2Leaflet 【入门教程】 - 【源代码图文示例 150】 3Cesium 【入门教程】 - 【源代码图文示例200】 4MapboxGL【入门教程】 - 【源代码图文示例150】 5前端就业宝典 【面试题详细答案 1000】 文章目录 一、内存…

ubuntu离线安装kubesphere(包括docker、harbor)

这边使用虚拟机下载依赖配置环境以及模拟服务器各个节点&#xff0c;使用两个虚拟机模拟离线不联网环境的服务器&#xff0c;使用一个虚拟机联网下载依赖包&#xff0c;然后传入两个不能联网的虚拟机安装所有环境&#xff08;我这边偷懒就用两个虚拟机中的一个联网下载安装包。…

【M365运维】一个Bitlocker硬盘加密问题的处理

【问题】 新采购的电脑&#xff0c;出厂时已经有厂家做好了Autopilot的预配置&#xff0c;拿到手后根据标准流程完成系统的安装&#xff0c;却发现硬盘没有被Bitlocker加密。 表象&#xff1a; 1. 硬盘没有被加密的锁形图标&#xff1b; 2. 尝试手工启用Bitlocker, 出现组策略冲…

【二叉树】Leetcode 117. 填充每个节点的下一个右侧节点指针 II【中等】

填充每个节点的下一个右侧节点指针 II 给定一个二叉树&#xff1a; struct Node { int val; Node *left; Node *right; Node *next; } 填充它的每个 next 指针&#xff0c;让这个指针指向其下一个右侧节点。如果找不到下一个右侧节点&#xff0c;则将 next 指针设置为 NULL 。…

gpt-4o api申请开发部署应用:一篇全面的指南

利用 GPT-4o API 开发创新应用&#xff1a;一篇全面的指南 OpenAI 的 GPT-4o 是一款集成了音频、视觉和文本处理能力的多模态人工智能模型&#xff0c;它的出现代表了人工智能领域的重大进步。在本篇文章中&#xff0c;我们将详细介绍如何通过 OpenAI API 使用 GPT-4o&#xf…

linux centos nfs挂载两台服务器挂载统一磁盘目录权限问题

查看用户id id 用户名另一台为 修改uid和gid为相同id&#xff0c;添加附加组 usermod -u500 -Gwheel epms groupmod -g500 epms