Cài đặt APEX trên Database 19c

Cài trên database EBS

SOURCE
Apex: Oracle APEX – Downloads
Ords: Oracle REST Data Services Download

Tạo tablespace, user

ALTER SESSION SET CONTAINER=TEST;

CREATE SMALLFILE TABLESPACE “APEX_TS” DATAFILE ‘/home/u01/oracle/TEST/db/data/apex/apex_data01.dbf’ SIZE 50M AUTOEXTEND ON NEXT 128K MAXSIZE 8000M, ‘/home/u01/oracle/TEST/db/data/apex/apex_data02.dbf’ SIZE 50M AUTOEXTEND ON NEXT 128K MAXSIZE 8000M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

Cài APEX

ALTER SESSION SET CONTAINER=TEST;

@apexins.sql APEX_TS APEX_TS TEMP1 /i/

exit;

Đặt password admin cho workspace internal

SQL> ALTER SESSION SET CONTAINER=TEST;

SQL> @apxchpwd.sql

…set_appun.sql

================================================================================

This script can be used to change the password of an Application Express

instance administrator. If the user does not yet exist, a user record will be

created.

================================================================================

Enter the administrator’s username [ADMIN]

User “ADMIN” does not yet exist and will be created.

Enter ADMIN’s email [ADMIN]

Enter ADMIN’s password [] -> Apex!01

Tạo user APEX_LISTENER và APEX_REST_PUBLIC_USER

SQL> ALTER SESSION SET CONTAINER=TEST;

SQL> @apex_rest_config.sql

Enter a password for the APEX_LISTENER user: Welcome01

Enter a password for the APEX_REST_PUBLIC_USER user: Welcome01

Unlock và set password cho APEX_PUBLIC_USER

SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Welcome01 ACCOUNT UNLOCK;

Install Tomcat

Tạo user tomcat

useradd tomcat

Download:

apache-tomcat-9.0.68.tar.gz

jdk-11.0.16_linux-x64_bin.tar.gz

Giải nén vào /home/tomcat

tar xvfz /home/source/OAP/jdk-11.0.16_linux-x64_bin.tar.gz

tar xvfz /home/source/APEX/apache-tomcat-9.0.68.tar.gz

vi .bashrc

export JAVA_HOME=/home/tomcat/jdk-11.0.16

export CATALINA_HOME=/home/tomcat/apache-tomcat-9.0.68

export CATALINA_BASE=$CATALINA_HOME

export JAVA_OPTS=”-Dconfig.url=${ORDS_CONFIG} -Xms1024M -Xmx1024M”

Start/Stop tomcat

$CATALINA_HOME/bin/startup.sh

$CATALINA_HOME/bin/shutdown.sh

Chạy cài đặt ORDS

User tomcat

mkdir -p /home/u01/ords

cd /home/u01/ords

unzip /home/source/APEX/ords-latest.zip

mkdir -p /home/u01/ords/config/logs

Tạo orapwd file trên database cài apex và ords:

orapwd file=orapwCDBTEST password=sys format=12 ignorecase=n

export ORDS_HOME=/home/u01/ords

export ORDS_CONFIG=/home/u01/ords/config

export ORDS_LOGS=${ORDS_CONFIG}/logs

export DB_PORT=1527

export DB_SERVICE=TEST

export SYSDBA_USER=SYS

export SYSDBA_PASSWORD=sys

export ORDS_PASSWORD=Welcome01

${ORDS_HOME}/bin/ords –config ${ORDS_CONFIG} install \

–log-folder ${ORDS_LOGS} \

–admin-user ${SYSDBA_USER} \

–db-hostname ${HOSTNAME} \

–db-port ${DB_PORT} \

–db-servicename ${DB_SERVICE} \

–feature-db-api true \

–feature-rest-enabled-sql true \

–feature-sdw true \

–gateway-mode proxied \

–gateway-user APEX_PUBLIC_USER \

–proxy-user \

–password-stdin <<EOF

${SYSDBA_PASSWORD}

${ORDS_PASSWORD}

EOF

export PATH=${ORDS_HOME}/bin:$PATH

Copy the APEX images to the Tomcat “webapps” directory.

$ mkdir $CATALINA_BASE/webapps/i/

$ cp -R /tmp/apex/images/* $CATALINA_BASE/webapps/i/

Copy the “ords.war” file to the Tomcat “webapps” directory.

$ cd /home/u01/ords

$ cp ords.war $CATALINA_BASE/webapps/

The JAVA_OPTS environment variable must include a reference to the “-Dconfig.url” flag, to tell ORDS where to find the ORDS configuration. We can also set the Java heap size here

export JAVA_OPTS=”-Dconfig.url=${ORDS_CONFIG} -Xms1024M -Xmx1024M”

Leave a Reply

Your email address will not be published. Required fields are marked *