安装 Application Express最新版21.1

安装环境:

      数据库Oracle19c   容器数据库多租户,操作系统centos7.6

     本事例 test为容器数据库的root数据库,dwtest为pdb数据库

1. 卸载旧版本的APEX

在正式安装最新版APEX之前,我们需要将旧版本的卸载掉。oracle为安装数据库的dba用户

su - oracle
cd $ORACLE_HOME/apex   --你安装oracle db的地方

sqlplus / as sysdba

-- 卸载原有的cdb的旧版本APEX
SQL> @apxremov.sql
SQL> alter session set container=dwtest; 切换到pdb库
SQL> @apxremov.sql 卸载

-- 退出当前数据库会话
SQL> exit

2. 安装最新版本APEX

  1. 对于仅使用英文进行开发的安装,请apex_21.1_en.zip从 Oracle Application Express 下载页面下载该文件。如果开发将包括英语以外的语言,请apex_21.1.zip从 Oracle Application Express 下载页面下载。看:

    Oracle Application Express - Downloads

    请注意,如果自本文档发布以来发布了更新的版本,则实际文件名可能会有所不同。

  2. 解压下载的 zip 文件:可以删除原来的apex目录也可以新建一个目录,原来的apex目录在       $ORACLE_HOME/apex
  3.  如果只有英文,解压apex_21.1_en.zip如下,保留目录名:
    • UNIX 和 Linux: $ unzip apex_21.1_en.zip

    • Windows:apex_21.1_en.zip在 Windows 资源管理器中 双击文件

    • 如果是多国语言,解压apex_21.1.zip如下,保留目录名:

      • UNIX 和 Linux: $ unzip apex_21.1.zip

      • Windows:apex_21.1.zip在 Windows 资源管理器中 双击文件

  4. 将您的工作目录更改为解压后的apex.
  5. 启动 SQL*Plus 并按照SYS指定SYSDBA角色连接到需要安装Oracle Application Express 的数据库。建议安装到pdb库,当然也可以安装到cdb ,本事例安装到pdb库dwtest例如:
    • 在 Windows 上:

      SYSTEM_DRIVE:\ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      SQL> alter session set container=dwtest; 切换到pdb库
      

    • 在 UNIX 和 Linux 上:

      $ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      SQL> alter session set container=dwtest; 切换到pdb库
      
  6. 禁用默认配置文件的任何现有密码复杂性规则。
  7. 选择合适的 










    安装选项。可用的安装选项包括:
    • 完整的开发环境。执行apexins.sql 按所示顺序传递以下四个参数:

      @apexins.sql tablespace_apex tablespace_files tablespace_temp images
      

    • 描述:

      • tablespace_apex 是 Oracle Application Express 应用程序用户的表空间名称。

      • tablespace_files 是 Oracle Application Express 文件用户的表空间名称。

      • tablespace_temp 是临时表空间或表空间组的名称。

      • images是 Oracle Application Express 映像的虚拟目录。对于使用 EPG 的安装,/i/是图像参数的必需值。为了支持未来的 Oracle Application Express 升级,请将虚拟映像目录定义为/i/.

      安装例子:

      @apexins.sql SYSAUX SYSAUX TEMP /i/

      笔记:

      如果收到以下错误,请在启动 SQL*Plus 之前退出 SQL*Plus 并将工作目录更改为解压缩安装文件的位置,例如在 Windows 中:

      SP2-0310: unable to open file "apexins.sql

    • @apxrtins.sql SYSAUX SYSAUX TEMP /i/

      备注

      在 APEX 21 中,Oracle 已取消支持 EPG。所有不用在单独安装epg文件了,现在我们已经安装了 ORDS 并将图像引用到“/i/”

安装 Application Express 时,它会创建以下数据库帐户:

  • APEX_210100 - 此帐户拥有 Application Express 架构和元数据。

  • FLOWS_FILES - 此帐户拥有 Application Express 上传的文件。

  • APEX_PUBLIC_USER- 此最低特权帐户用于通过 Oracle REST Data Services 或 Oracle HTTP Server 和mod_plsql.

如果您配置了 RESTful Web 服务,则将创建这些附加帐户:

  • APEX_REST_PUBLIC_USER - 调用存储在 Oracle Application Express 中的 RESTful 服务定义时使用的帐户。

  • APEX_LISTENER - 用于查询存储在 Oracle Application Express 中的 RESTful 服务定义的帐户。

 安装中文语言包: 

切换到目录apex/builder/zh-cn

$sqlplus /nolog
SQL> connect sys as sysdba (按提示输入password)
SQL> alter session set container=dwtest;
SQL> alter session set current_schema=APEX_210100 --根据安装版本不同不同
SQL> @load_zh-cn.sql

SQL> @unload_zh-cn.sql 卸载中文语言包

-- 创建APEX实例管理员(Instance Administration)及密码,这个密码必须包含特殊符号,否则设置不上。这个密码很重要,是管理APEX平台的账号密码.
需要重新切换到apex目录
SQL> @apxchpwd.sql
-- 解锁ORDS用户账号

SQL>ALTER USER APEX_LISTENER IDENTIFIED BY OraPassword1 ACCOUNT UNLOCK;
SQL>ALTER USER APEX_PUBLIC_USER IDENTIFIED BY OraPassword1 ACCOUNT UNLOCK;
SQL> ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY passwd ACCOUNT UNLOCK;

-- 配置RESTful Services服务
SQL> @apex_rest_config.sql

ORDS安装

关于 Oracle REST 数据服务

Oracle REST Data Services 是基于 Java EE 的 Oracle HTTP Server 和 mod_plsql. Java EE 实现提供了更多功能,包括基于命令行的配置、增强的安全性、文件缓存和 RESTful Web 服务。Oracle REST 数据服务还通过支持使用 Oracle WebLogic Server、Apache Tomcat 和独立模式的部署来提供更高的灵活性。

Oracle Application Express 架构需要某种形式的 Web 服务器来代理 Web 浏览器和 Oracle Application Express 引擎之间的请求。Oracle REST 数据服务满足了这一需求,但它的用途超出了 Oracle Application Express 配置的范围。Oracle REST 数据服务简化了部署过程,因为不需要 Oracle 主目录,因为连接是使用嵌入式 JDBC 驱动程序提供的。

默认情况下,通过 Oracle REST 数据服务访问 Oracle Application Express 的上下文根是/ords. 如果您希望拥有/apex用于访问 Oracle Application Express的上下文根,请在安装 Oracle REST 数据服务之前将该ords.war文件重命名为apex.war。请参阅Oracle REST 数据服务安装、配置和开发指南》中的“安装 Oracle REST 数据服务”。

  1. 下载21版本是目前最新版本的Oracle REST 数据服务下载tomcat9
  2. 将下载的 zip 文件解压缩到您选择的目录(或文件夹)中:没有特殊限制,例如$ORACLE_HOME/ords(该目录有之前数据库安装时自带的ords可以删除后在解压)
    • UNIX 和 Linux:解压缩 ords.version.number.zip

    • Windows: 在 Windows 资源管理器中 双击文件 ords.version.number.zip

支持的 Java EE 应用服务器

Application ServerSupported Release




Oracle WebLogic Server

12c Release 2 (from version 12.2.1.3 and later) and 14c Release and later




Apache Tomcat

Release 8.5.x through Release 9.0.x

Oracle REST 数据服务系统要求如下:

  • Oracle 数据库(企业版、标准版或标准版一)发行版 11 g第 2 版或更高版本,或 Oracle 数据库 11 g第 2 版快捷版。

  • Oracle Java 8 或更高版本。

安装操作:

更新RDS_PUBLIC_USER用户

sql>ALTER USER ORDS_PUBLIC_USER IDENTIFIED BY OraPassword1 ACCOUNT UNLOCK;

创建ords配置目录

cd $ORACLE_HOME/ords/

mkdir ords_config  如果您在安装过程中遇到任何失败,请记住在重试之前删除此目录的内容

启用ords命令行安装,使用Oracle数据库自带的jdk

$ORACLE_HOME/jdk/bin/java -jar ords.war help   查看命令帮助

$ORACLE_HOME/jdk/bin/java -jar ords.war  
  
$ORACLE_HOME/jdk/bin/java -jar ords.war configdir -- 设置配置目录。
$ORACLE_HOME/jdk/bin/java -jar ords.war   --执行安装

具体安装需要输入的参数
Enter number for [1] Basic  [2] TNS  [3] Custom URL [1]:    
Enter the name of the database server [localhost]:
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:
Enter the database service name:orcl
Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:
Enter the database password for ORDS_PUBLIC_USER:
Confirm password:
Requires to login with administrator privileges to verify Oracle REST Data Services schema.

Enter the administrator username:EXAMPLEUSER
Enter the database password for EXAMPLEUSER:
Confirm password:
Connecting to database user: EXAMPLEUSER url: jdbc:oracle:thin:@//localhost:1521/orcl

Retrieving information.
Enter the default tablespace for ORDS_METADATA [SYSAUX]:
Enter the temporary tablespace for ORDS_METADATA [TEMP]:
Enter the default tablespace for ORDS_PUBLIC_USER [USERS]:
Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:
Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.
If using Oracle Application Express or migrating from mod_plsql then you must enter 1 [1]:
Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step [1]:
Enter the database password for APEX_LISTENER:
Confirm password:
Enter the database password for APEX_REST_PUBLIC_USER:
Confirm password:
Enter a number to select a feature to enable: 
   [1] SQL Developer Web  (Enables all features)
   [2] REST Enabled SQL
   [3] Database API
   [4] REST Enabled SQL and Database API
   [5] None
Choose [1]:
Enter 1 if you wish to start in standalone mode or 2 to exit [1]:  选择1 是启动测试部署,本事例选择tomcat部署,选择2
Enter the APEX static resources location:/path/to/apex/images
Enter 1 if using HTTP or 2 if using HTTPS [1]:
Enter the HTTP port [8080]:   
OR
Enter 1 if using HTTP or 2 if using HTTPS [1]:1 选择是否需要启动https
Enter the HTTPS port [8443]:
Enter the SSL hostname:mysslhost    
Enter 1 to use the self-signed certificate or 2 if you will provide the SSL certificate [1]: 

安装完成后,拷贝ords.war 到tomcat的webapps目录里面,

在webapp目录下创建 i目录

mkdir  i

cp -R  $ORACLE_HOME/apex/image  $TOMCAT/webapps/i  --复制apex的静态文件到i目录

最后启动tomcat

./startup.sh

启动后可以访问了。打开浏览器输入 http://localhost:8080/apex/apex_admin

 输入上面用apxchpwd.sql脚本创建的管理员用户登录。后面具体就是这么使用apex了。

本文档参考:ORACLE-BASE - Oracle REST Data Services (ORDS) : Installation on Tomcat

Introduction to Oracle REST Data Services

Introduction to Oracle REST Data Services

如何安装和配置 Oracle Application Express 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值