Oracle APEX24安装部署

Apex

官方下载
官方文档

安装APEX

  1. 非PDB模式

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    <!-- -->
    @apexins.sql SYSAUX SYSAUX TEMP /i24/
    或者 
    ALTER SESSION SET CONTAINER = testdb;
    @apexins.sql SYSAUX SYSAUX TEMP /i24/
    
    
    
    <!--  设置 APEX_PUBLIC_USER -->
    ALTER USER APEX_PUBLIC_USER IDENTIFIED BY S9dFCaUaCejbmLM52L ACCOUNT UNLOCK;
    
    用户 环境 密码 备注
    APEX_PUBLIC_USER test162 S9dFCaUaCejbmLM52L 最低特权帐户。
  2. 设置internal工作区admin用户,配置RESTful服务

    1. 非PDB模式
      1
      2
      3
      4
      5
      
      <!--设置 INTERNAL 工作区的admin用户及密码  S9dFCaUaC.ejbmLM52L -->
      @apxchpwd.sql
      
      <!--配置RESTful服务  b7qP9Atb2f^vV2LU -->
      @apex_rest_config.sql
      

安装中文支持

  1. 非PDB模式
    1
    2
    3
    4
    
    <!-- 切换SCHEMA -->
    ALTER SESSION SET CURRENT_SCHEMA = APEX_190200;
    <!--安装中文支持-->
    @builder/zh-cn/load_zh-cn.sql
    

验证APEX的有效性

  1. 验证Apex的有效性

    1
    2
    
    SELECT STATUS FROM DBA_REGISTRY WHERE COMP_ID = 'APEX';
    SELECT * FROM apex_release;
    

安装Apex补丁

  1. unzip p30392181_1920_Generic.zip

  2. cat 30392181/README.txt

  3. 按照说明执行

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
     /****************看文档************
     sqlplus "sys/ as sysdba" 
     <!--切SESSION -->
     <!--以下任选其一-->
     1. @catpatch.sql        -- 适用于Oracle数据库11.2及更早版本,适用于非CDB,以及APEX没有安装在根目录下的CDB
     2. @catpatch_con.sql    -- for CDB where Application Express is installed in the root
     3. @catpatch_appcon.sql -- for installations where Application Express is installed in an application container
     **************************************/
    @catpatch.sql 
    
  4. 验证补丁

    1
    
    SELECT * FROM apex_release;
    
  5. 将补丁中的静态文件覆盖到原静态文件

    1
    2
    
    [oracle@xxxxxxxx 37366599]$ zip -r apex242_images_p4.zip images
    [oracle@xxxxxxxb 37366599]$ rsync -av ./images/ /usr/local/nginx/html/i242/
    

设置Oracle 数据库 wallet HTTPs 证书

  1. 压缩旧证书

    1
    
     zip -r  cas_https.zip /data/app/oracle/admin/edexcas/wallet/https
    

设置Oracle 数据库 HTTP ACL

  1. 设置Oracle 数据库 HTTP ACL
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    
    DECLARE
    	l_acl_name  varchar2(30) := 'HttpsServiceACLConfig.xml';
    	-- l_principal varchar2(20) := 'APEX_190200';
    	l_principal varchar2(20) := 'APEX_240200';
    BEGIN
    	BEGIN
    		dbms_network_acl_admin.drop_acl(acl => l_acl_name);
    	EXCEPTION
    		WHEN OTHERS THEN
    			NULL; -- ACL does not exist yet
    	END;
    	dbms_network_acl_admin.create_acl(
    			acl => l_acl_name
    		, description => 'https'
    		, principal => l_principal
    		, is_grant => TRUE
    		, privilege => 'connect'
    		, start_date => SYSTIMESTAMP
    		, end_date => NULL
    	);
    	dbms_network_acl_admin.add_privilege(
    			acl => l_acl_name
    		, principal => l_principal
    		, is_grant => TRUE
    		, privilege => 'resolve'
    		, start_date => SYSTIMESTAMP
    		, end_date => NULL
    	);
    
    	dbms_network_acl_admin.assign_acl(
    			acl => l_acl_name
    		, host => '*'
    		, lower_port => 443
    		, upper_port => 443
    	);
    	-- 添加
    	dbms_network_acl_admin.assign_acl(
    			acl => l_acl_name
    		, host => '*'
    		, lower_port => 80
    		, upper_port => 80
    	);
    	dbms_network_acl_admin.assign_acl(
    			acl => l_acl_name
    		, host => '*.aliyun.com'
    		, lower_port => 25
    		, upper_port => 25
    	);
    	COMMIT;
    END;
    

设置Oracle 数据库 授权加解密包

grant execute on dbms_crypto to APEX_240200;

Ords相关

  1. 常见命令

    1
    2
    3
    4
    5
    6
    
    ords --config  /opt/edex_config_cas install
    ords --config /opt/edex_config_cas   config set misc.pagination.maxRows 1000
    ords --config /opt/edex_config_cas   config set feature.sdw  false
    ords --config /opt/edex_config_cas   config set database.api.enabled true
    ords  --config /opt/edex_config_cas config --db-pool cas set misc.defaultPage  apex  
    ords  --config /opt/edex_config_cas  config --db-pool cas secret --password-stdin db.password 
    
    1
    2
    3
    4
    5
    6
    
    ords --config  /opt/edex_config_db1 install
    ords --config /opt/edex_config_db1   config set misc.pagination.maxRows 1000
    ords --config /opt/edex_config_db1   config set feature.sdw  false
    ords --config /opt/edex_config_db1   config set database.api.enabled true
    ords  --config /opt/edex_config_db1 config --db-pool cas set misc.defaultPage  apex  
    ords  --config /opt/edex_config_db1  config --db-pool cas secret --password-stdin db.password 
    

tomcat 相关

  1. 常见命令
    1
    2
    3
    4
    5
    6
    7
    
    [root@xxxxxxx opt]# semanage port --list |grep 8221
    [root@xxxxxxx opt]# semanage port --list |grep 8222
    [root@xxxxxxx opt]# semanage port --list |grep 8223
    [root@xxxxxxx opt]# semanage port --add --type http_port_t --proto tcp 8221
    [root@xxxxxxx opt]# semanage port --add --type http_port_t --proto tcp 8222
    [root@xxxxxxx opt]# semanage port --add --type http_port_t --proto tcp 8223
    [root@xxxxxxx opt]# cp /etc/systemd/system/tomcat_dw.service /etc/systemd/system/tomcat_cas.service  
    
Licensed under CC BY-NC-SA 4.0
最后更新于 2025-12-03 15:07
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计