How to Install Oracle Apex in Oracle Linux 8.8

ORACLE DATABASE 19C ON OEL8.8 

 

[root@apex]# hostname

apex.testdb.com

[root@apex]# su oracle 

[oracle@apex ~]$ cd /home/oracle/

[oracle@apex ~]$ mkdir -p soft

[oracle@apex ~]$ cd soft/

[oracle@apex soft]$ ls -lrt

total 0

[oracle@apex soft]$ pwd

/home/oracle/soft


[oracle@apex soft]$ cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


[oracle@apex soft]$ su

Password: 


[root@apex soft]# vi /etc/hosts


127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

172.18.1.194 apex.testdb.com


                                                                                                 

[root@apex soft]# ping apex.testdb.com

PING apex.testdb.com (172.18.1.194) 56(84) bytes of data.

64 bytes from apex.testdb.com (172.18.1.194): icmp_seq=1 ttl=64 time=0.012 ms

64 bytes from apex.testdb.com (172.18.1.194): icmp_seq=2 ttl=64 time=0.037 ms

64 bytes from apex.testdb.com (172.18.1.194): icmp_seq=3 ttl=64 time=0.025 ms

64 bytes from apex.testdb.com (172.18.1.194): icmp_seq=4 ttl=64 time=0.023 ms

^C

--- apex.testdb.com ping statistics ---


4 packets transmitted, 4 received, 0% packet loss, time 3051ms

rtt min/avg/max/mdev = 0.012/0.024/0.037/0.008 ms


[root@apex soft]# vi /etc/hostname

apex.testdb.com


[root@apex soft]# ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

64 bytes from 8.8.8.8: icmp_seq=1 ttl=109 time=31.4 ms

64 bytes from 8.8.8.8: icmp_seq=2 ttl=109 time=31.3 ms

64 bytes from 8.8.8.8: icmp_seq=3 ttl=109 time=30.9 ms

^C

--- 8.8.8.8 ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2003ms

rtt min/avg/max/mdev = 30.875/31.195/31.402/0.229 ms


[root@apex soft]# ping goolge.com


[root@apex soft]# cat /etc/resolv.conf 

# Generated by NetworkManager

search testdb.com

nameserver 172.17.21.11

nameserver 172.17.21.12


[root@apex soft]# vi /etc/resolv.conf 

# Generated by NetworkManager

search apex.testdb.com

nameserver 8.8.8.8

nameserver 172.17.21.12


"/etc/resolv.conf" 4L, 96B written   

                                                                                           

[root@apex soft]# ping goolge.com

PING goolge.com (142.250.194.68) 56(84) bytes of data.

64 bytes from del12s03-in-f4.1e100.net (142.250.194.68): icmp_seq=1 ttl=109 time=48.6 ms

64 bytes from del12s03-in-f4.1e100.net (142.250.194.68): icmp_seq=2 ttl=109 time=48.3 ms

64 bytes from del12s03-in-f4.1e100.net (142.250.194.68): icmp_seq=3 ttl=109 time=48.0 ms

^C

--- goolge.com ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2002ms

rtt min/avg/max/mdev = 47.992/48.310/48.601/0.249 ms


ORACLE PREINSTALL 

[root@apex soft]# dnf install -y oracle-database-preinstall-19c

--ENVIRONMENT SETUP FOR ORACLE 

cat > /home/oracle/scripts/setEnv.sh <<EOF

# Oracle Settings

export TMP=/tmp

export TMPDIR=\$TMP

export ORACLE_HOSTNAME=ol9-19.localdomain

export ORACLE_UNQNAME=apexdb

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=\$ORACLE_BASE/product/19.0.0/dbhome_1

export ORA_INVENTORY=/u01/app/oraInventory

export ORACLE_SID=apexdb

export PDB_NAME=pdbapex

export DATA_DIR=/u02/oradata

export PATH=/usr/sbin:/usr/local/bin:\$PATH

export PATH=\$ORACLE_HOME/bin:\$PATH

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib

EOF


BUG FIX ------ >


cd $ORACLE_HOME

unzip -oq /home/oracle/soft/LINUX.X64_193000_db_home.zip

[oracle@apex dbhome_1]$ export CV_ASSUME_DISTID=OEL7.8

[oracle@apex dbhome_1]$ cd cv/admin/

[oracle@apex admin]$ ls -lrt

total 8

-rw-r--r--. 1 oracle oinstall 2821 Jan 13  2011 cvusys.sql

-rw-r--r--. 1 oracle oinstall 1441 Apr 19  2018 cvu_config


[oracle@apex admin]$ vi cvu_config 

# Configuration file for Cluster Verification Utility(CVU)

# Version: 011405

#

# NOTE:

# 1._ Any line without a '=' will be ignored

# 2._ Since the fallback option will look into the environment variables,

#     please have a component prefix(CV_) for each property to define a

#     namespace.

#


#Nodes for the cluster. If CRS home is not installed, this list will be

#picked up when -n all is mentioned in the commandline argument.

#CV_NODE_ALL=


#if enabled, cvuqdisk rpm is required on all nodes

CV_RAW_CHECK_ENABLED=TRUE

#### CHANGE THIS LINE AS ####

# Fallback to this distribution id 

CV_ASSUME_DISTID=OEL7.8

#Complete file system path of sudo binary file, default is /usr/local/bin/sudo

CV_SUDO_BINARY_LOCATION=/usr/local/bin/sudo


#Complete file system path of pbrun binary file, default is /usr/local/bin/pbrun

CV_PBRUN_BINARY_LOCATION=/usr/local/bin/pbrun


# Whether X-Windows check should be performed for user equivalence with SSH

#CV_XCHK_FOR_SSH_ENABLED=TRUE


# To override SSH location

#ORACLE_SRVM_REMOTESHELL=/usr/bin/ssh


# To override SCP location

#ORACLE_SRVM_REMOTECOPY=/usr/bin/scp


# To override version used by command line parser

CV_ASSUME_CL_VERSION=19.1.0.0.0


# Location of the browser to be used to display HTML report

#CV_DEFAULT_BROWSER_LOCATION=/usr/bin/mozilla


# Maximum number of retries for discover DHCP server

#CV_MAX_RETRIES_DHCP_DISCOVERY=5


# Maximum CVU trace files size (in multiples of 100 MB)

#CV_TRACE_SIZE_MULTIPLIER=1

~

"cvu_config" 47L, 1442C written                                                                                                 

[oracle@apex admin]$ 


INSTALL ORACLE RDBMS IN SILENT MODE

./runInstaller -ignorePrereq -waitforcompletion -silent                        \

    -responseFile ${ORACLE_HOME}/install/response/db_install.rsp               \

    oracle.install.option=INSTALL_DB_SWONLY                                    \

    ORACLE_HOSTNAME=${ORACLE_HOSTNAME}                                         \

    UNIX_GROUP_NAME=oinstall                                                   \

    INVENTORY_LOCATION=${ORA_INVENTORY}                                        \

    SELECTED_LANGUAGES=en,en_GB                                                \

    ORACLE_HOME=${ORACLE_HOME}                                                 \

    ORACLE_BASE=${ORACLE_BASE}                                                 \

    oracle.install.db.InstallEdition=EE                                        \

    oracle.install.db.OSDBA_GROUP=dba                                          \

    oracle.install.db.OSBACKUPDBA_GROUP=dba                                    \

    oracle.install.db.OSDGDBA_GROUP=dba                                        \

    oracle.install.db.OSKMDBA_GROUP=dba                                        \

    oracle.install.db.OSRACDBA_GROUP=dba                                       \

    SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                                 \

    DECLINE_SECURITY_UPDATES=true

[oracle@apex dbhome_1]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu May 23 10:38:29 2024

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> exit

DATABASE INSTALLATION IN SILENT MODE 

# Silent mode.

dbca -silent -createDatabase                                                   \

     -templateName General_Purpose.dbc                                         \

     -gdbname ${ORACLE_SID} -sid  ${ORACLE_SID} -responseFile NO_VALUE         \

     -characterSet AL32UTF8                                                    \

     -sysPassword SysPassword1                                                 \

     -systemPassword SysPassword1                                              \

     -createAsContainerDatabase true                                           \

     -numberOfPDBs 1                                                           \

     -pdbName ${PDB_NAME}                                                      \

     -pdbAdminPassword PdbPassword1                                            \

     -databaseType MULTIPURPOSE                                                \

     -memoryMgmtType auto_sga                                                  \

     -totalMemory 2000                                                         \

     -storageType FS                                                           \

     -datafileDestination "${DATA_DIR}"                                        \

     -redoLogFileSize 50                                                       \

     -emConfiguration NONE                                                     \

     -ignorePreReqs

 listener.ora 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = apexdb)

      (ORACLE_HOME =/u01/app/oracle/product/19.0.0/dbhome_1)

      (SID_NAME = apexdb)

    )

    (SID_DESC =

      (GLOBAL_DBNAME = pdbapex)

      (ORACLE_HOME =/u01/app/oracle/product/19.0.0/dbhome_1)

      (SID_NAME = pdbapex)

    )

  )


LISTENER =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.1.194)(PORT = 1521))

    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

  )

ADR_BASE_LISTENER = /u01/app/oracle

 tnsnames.ora 

bash-4.4$ cat tnsnames.ora 

LISTENER =

  (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.1.194)(PORT = 1521))

APEXDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.1.194)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = apexdb)

    )

  )


PDBAPEX =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.1.194)(PORT = 1521))   

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = pdbapex)

    )

  )


 cat sqlnet.ora 


#SQLNET.ALLOWED_LOGON_VERSION=11

SQLNET.ALLOWED_LOGON_VERSION_CLIENT=11

SQLNET.ALLOWED_LOGON_VERSION_SERVER=11

SQL_AUTHENTICATION_SERVICES = (NONE)


Installation of Oracle Apex and ORDS :

----------------------------------------------------------------------------------------

STEP-01: DONWLOAD NECESSARY SOFTWARE FOR ORACLE APEX

----------------------------------------------------------------------------------------

Oracle Apex 23.1 [Link: https://www.oracle.com/tools/downloads/apex-downloads/]

ORDS [https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/]

JDK 15+ [Download ORDS [https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/]

TOMCAT 9+ [https://tomcat.apache.org/download-90.cgi]


-------------------------------------------------------------------------------------------------------

STEP-02: INSTALLING APEX

-------------------------------------------------------------------------------------------------------

2.1: Unzip downloaded zip (apex_23.1.zip)file

[oracle@apex soft]$ unzip apex_23.1.zip /home/oracle/


2.2: Change your working directory to apex

[oracle@apex ~]$ cd apex/


2.3: Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS specifying the SYSDBA role


[oracle@apex apex]$ sqlplus /nolog


SQL*Plus: Release 19.0.0.0.0 - Production on Thu May 30 16:29:03 2024

Version 19.3.0.0.0


Copyright (c) 1982, 2019, Oracle.  All rights reserved.


SQL> conn sys@pdbapex as sysdba

Enter password: 

Connected.

SQL> 


SQL> SELECT name,open_mode FROM v$pdbs;


NAME

--------------------------------------------------------------------------------

OPEN_MODE

----------

PDBAPEX

READ WRITE


---------------------

SQL> CREATE TABLESPACE apex_ts DATAFILE '/home/oracle/datafs/apex_ts01.dbf' SIZE 500M AUTOEXTEND ON NEXT 100M;


Tablespace created.

---------------------


##2.4: Disable any existing password complexity rules for the default profile


##2.5: Select the appropriate installation option Full development environment/Runtime environment


cd /home/oracle/apex

## Full development environment ##

@apexins.sql <tablespace_apex> <tablespace_files> <tablespace_temp> <images>

@apexins.sql SYSAUX SYSAUX TEMP /i/


## Runtime environment ##

@apxrtins.sql <tablespace_apex> <tablespace_files> <tablespace_temp> <images>

@apxrtins.sql SYSAUX SYSAUX TEMP /i/


SQL> @apexins.sql sysaux sysaux temp /i/


2.6: Running the apxchpwd.sql script enables you to create or update your Instance Administrator account


SQL> @apxchpwd.sql


User     : ADMIN

Aassword : Apex*123



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

This script can be used to change the password of an Oracle APEX

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

created. [Apex123]

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

Enter the administrator's username [ADMIN] ADMIN

User "ADMIN" does not yet exist and will be created.

Enter ADMIN's email [ADMIN] 

Enter ADMIN's password [] 

Created instance, administrator ADMIN.


SYS> 

2.7: Unlocking the APEX_PUBLIC_USER Account


SQL> ALTER USER APEX_LISTENER  ACCOUNT UNLOCK identified by Apex123;

SQL> ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK identified by Apex123;

SQL> ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK identified by Apex123;

SQL> ALTER USER APEX_INSTANCE_ADMIN_USER ACCOUNT UNLOCK identified by Apex123;

SQL> ALTER USER APEX_230100 ACCOUNT UNLOCK identified by Apex123;


2.8: Changing the Password for the APEX_PUBLIC_USER Account


SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Apex123;


2.9: Configuring RESTful Services

@apex_rest_config.sql

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

For Oracle Database version 12c or later run the below script:


CONN sys/Sys_1234@ORCLPDB AS SYSDBA


SQL> BEGIN

DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(

host => '*',

ace => xs$ace_type(privilege_list => xs$name_list('connect'),

principal_name => 'APEX_230100',

principal_type => xs_acl.ptype_db));

END;

/


SQL> BEGIN

DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(

host => 'localhost',

ace => xs$ace_type(privilege_list => xs$name_list('connect'),

principal_name => 'APEX_230100',

principal_type => xs_acl.ptype_db));

END;

/


SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;


SQL> conn sys/Sys_1234@ORCLPDB AS SYSDBA


SQL> ALTER USER anonymous IDENTIFIED BY Apex123 ACCOUNT UNLOCK CONTAINER=ALL;


SQL> CONN sys/Sys_1234@ORCLPDB AS SYSDBA


SQL> SELECT DBMS_XDB.gethttpport FROM DUAL;


SQL> EXEC DBMS_XDB.sethttpport(0);


SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Apex123 ACCOUNT UNLOCK;



======================= OUTPUT =======================================


Enter the administrator's username [ADMIN] ADMIN

User "ADMIN" does not yet exist and will be created.

Enter ADMIN's email [ADMIN] 

Enter ADMIN's password [] 

Created instance administrator ADMIN.


SYS> 

SYS> 

SYS> ALTER USER APEX_LISTENER  ACCOUNT UNLOCK identified by Apex123;

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK identified by Apex123;

ALTER USER APEX_LISTENER  ACCOUNT UNLOCK identified by Apex123

           *

ERROR at line 1:

ORA-01918: user 'APEX_LISTENER' does not exist



SYS> ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK identified by Apex123;

SYS> ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK identified by Apex123

           *

ERROR at line 1:

ORA-01918: user 'APEX_REST_PUBLIC_USER' does not exist



SYS> ALTER USER APEX_INSTANCE_ADMIN_USER ACCOUNT UNLOCK identified by Apex123;

ALTER USER APEX_INSTANCE_ADMIN_USER ACCOUNT UNLOCK identified by Apex123

           *

ERROR at line 1:

ORA-01918: user 'APEX_INSTANCE_ADMIN_USER' does not exist



SYS> ALTER USER APEX_230100 ACCOUNT UNLOCK identified by Apex123;

SYS> 

SYS> @apex_rest_config.sql



Enter a password for the APEX_LISTENER user              [] 

Enter a password for the APEX_REST_PUBLIC_USER user              [] 

...set_appun.sql

...setting session environment

...create APEX_LISTENER and APEX_REST_PUBLIC_USER users

...grants for APEX_LISTENER and ORDS_METADATA user

SYS> 

SYS> 

SYS> BEGIN

  2  DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(

  3  host => '*',

  4  ace => xs$ace_type(privilege_list => xs$name_list('connect'),

  5  principal_name => 'APEX_230100',

  6  principal_type => xs_acl.ptype_db));

  7  END;

  8  /

SYS> 

SYS> BEGIN

  2  DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(

  3  host => 'localhost',

  4  ace => xs$ace_type(privilege_list => xs$name_list('connect'),

  5  principal_name => 'APEX_230100',

  6  principal_type => xs_acl.ptype_db));

  7  END;

  8  /

SYS> 

SYS> ALTER USER ANONYMOUS ACCOUNT UNLOCK;

SYS> 


Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

[oracle@apex apex]$ sqlplus / as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Thu May 23 13:57:46 2024

Version 19.3.0.0.0


Copyright (c) 1982, 2019, Oracle.  All rights reserved.



Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0


SQL> ALTER USER anonymous IDENTIFIED BY Apex123 ACCOUNT UNLOCK CONTAINER=ALL;


User altered.


SQL> 

SQL> alter session set container=pdbapex;


Session altered.


SQL> SELECT DBMS_XDB.gethttpport FROM DUAL;


GETHTTPPORT

-----------

          0


SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Apex123 ACCOUNT UNLOCK;


User altered.


SQL> 


[oracle@apex bin]$ sqlplus / as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Thu May 23 18:32:11 2024

Version 19.3.0.0.0


Copyright (c) 1982, 2019, Oracle.  All rights reserved.



Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0


SQL> alter session set container=pdbapex;


Session altered.


SQL> 

SQL> EXEC DBMS_XDB.sethttpport(0);


PL/SQL procedure successfully completed.


SQL> SELECT DBMS_XDB.gethttpport FROM DUAL;


GETHTTPPORT

-----------

         0



=========================XXXXXXXXXX=========================


------------------------------------------------------------

STEP-03: JDK Installation [jdk-15.0.2_linux-aarch64_bin.rpm]

------------------------------------------------------------

3.1: Download JDK 15

[root@apex soft]# wget https://download.oracle.com/java/18/latest/jdk-18_linux-x64_bin.rpm


3.2: Install JDK 15

[root@apex soft]# rpm -ivh jdk-18_linux-x64_bin.rpm


3.3: Check the java version

[root@apex soft]# java --version

java 15.0.1 2020-10-20

Java(TM) SE Runtime Environment (build 15.0.1+9-18)

Java HotSpot(TM) 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)

[root@apex soft]# 


[root@apex soft]# export JAVA_HOME=/usr/java/jdk-15.0.2

[root@apex soft]# export PATH=$JAVA_HOME/bin:$PATH



-------------------------------------------------------------------------------------------------------

STEP-04: Downloading and Installing Oracle REST Data Services

-------------------------------------------------------------------------------------------------------


4.1: Downloading Oracle REST Data Services [ords-22.1.0.105.1723-COMPATIBLE-FOR-APEX_23.1.zip]

4.2: Unzip the downloaded zip file into a directory 


[root@apex soft]# unzip ords-22.1.0.105.1723-COMPATIBLE-FOR-APEX_23.1.zip /opt/ords


4.3: Copy the images directory, apex/images, from the Oracle APEX software ZIP to a location on the file 

system where Oracle REST Data Services is installed

  

4.4: Adding ORDS bin folder to your Operating System PATH

echo -e 'export PATH="$PATH:/opt/ords/bin"' >> ~/.bash_profile


Start a new shell to pick up this change.



----------------------------------------------------------------------------------

4.5: Install ORDS

----------------------------------------------------------------------------------


[root@apex bin]# java -jar /home/oracle/ords/apps.war install

Warning: Support for executing: java -jar ords.war has been deprecated.

Please add ords to your PATH and use the ords command instead.

Run the following command to add ords to your PATH:


echo -e 'export PATH="$PATH:/home/oracle/ords/bin"' >> ~/.bash_profile


Start a new shell to pick up this change.


ORDS: Release 24.1 Production on Thu May 23 18:12:57 2024


Copyright (c) 2010, 2024, Oracle.


Configuration:

  /usr/java/jdk-15.0.1/bin


The configuration folder /usr/java/jdk-15.0.1/bin does not contain any configuration files.


Oracle REST Data Services - Interactive Install


  Enter a number to select the database connection type to use

    [1] Basic (host name, port, service name)

    [2] TNS (TNS alias, TNS directory)

    [3] Custom database URL

  Choose [1]: 

  Enter the database host name [localhost]: apex.testdb.com

  Enter the database listen port [1521]: 

  Enter the database service name [orcl]: pdbapex

  Provide database user name with administrator privileges.

    Enter the administrator username: sys

  Enter the database password for SYS AS SYSDBA: 


Retrieving information.

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: Basic

    [2] Basic Connection: HOST=apex.testdb.com PORT=1521 SERVICE_NAME=pdbapex

           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

    [9]   APEX static resources location: 

    [A] Accept and Continue - Create configuration and Install ORDS in the database

    [Q] Quit - Do not proceed. No changes

  Choose [A]: 


.

.

.


PL/SQL procedure successfully completed.



Commit complete.


2024-05-26T04:01:02.269Z INFO        Completed installation for Oracle REST Data Services version 22.1.0.r1051723. Elapsed time: 00:00:11.285 


[*** Info: Completed installation for Oracle REST Data Services version 22.1.0.r1051723. Elapsed time: 00:00:11.285 

 ]

[root@apex bin]# 



-----------------------------------------------------------------------------------

STEP-05: TOMCAT INSTALLATION [apache-tomcat-9.0.89.tar.gz]

-----------------------------------------------------------------------------------

5.1: Tomcat Dowload & Extract

[root@apex opt]# wget  https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.39/bin/apache-tomcat-9.0.39.tar.gz

[root@apex opt]# tar -xvf apache-tomcat-9.0.39.tar.gz

[root@apex opt]# mv apache-tomcat-9.0.39 tomcat


5.2: Envirnment Setup

[root@apex opt]# echo "export CATALINA_HOME="/usr/local/tomcat"" >> ~/.bashrc

[root@apex opt]# source ~/.bashrc


5.3: Startup the tomcat service

# Now we all set to start the tomcat web server using the scripts provided by the tomcat package.

[root@apex opt]# cd /opt/tomcat/bin

[root@apex opt]# ./startup.sh

[root@apex bin]# ./shutdown.sh 

Using CATALINA_BASE:   /opt/tomcat

Using CATALINA_HOME:   /opt/tomcat

Using CATALINA_TMPDIR: /opt/tomcat/temp

Using JRE_HOME:        /usr/java/jdk-15.0.1

Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar

Using CATALINA_OPTS:   

NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

Picked up JAVA_TOOL_OPTIONS: -Dconfig.url=/home/oracle/ords

[root@apex bin]# 

[root@apex opt]#


5.4: User password setup from Tomcat

[root@apex opt]# vi /opt/tomcat/conf/tomcat-users.xml

<?xml version="1.0" encoding="UTF-8"?>

<!--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0

  (the "License"); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at


      http://www.apache.org/licenses/LICENSE-2.0


  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

-->

<tomcat-users xmlns="http://tomcat.apache.org/xml"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"

              version="1.0">

<!--

  NOTE:  By default, no user is included in the "manager-gui" role required

  to operate the "/manager/html" web application.  If you wish to use this app,

  you must define such a user - the username and password are arbitrary. It is

  strongly recommended that you do NOT use one of the users in the commented out

  section below since they are intended for use with the examples web

  application.

-->

<!--

  NOTE:  The sample user and role entries below are intended for use with the

  examples web application. They are wrapped in a comment and thus are ignored

  when reading this file. If you wish to configure these users for use with the

  examples web application, do not forget to remove the <!.. ..> that surrounds

  them. You will also need to set the passwords to something appropriate.

-->

<!--

  <role rolename="tomcat"/>

  <role rolename="role1"/>

  <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>

  <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>

  <user username="role1" password="<must-be-changed>" roles="role1"/>

-->

<role rolename="manager-gui"/>

<user username="admin" password="admin" roles="manager-gui,admin-gui"/>

</tomcat-users>

~

~

"tomcat/conf/tomcat-users.xml" 46L, 2267C written

[root@apex opt]# 



5.5: To allow the Manager App from the remote host, edit the context.xml file:

# /opt/tomcat/webapps/manager/META-INF/context.xml

# Remove the following lines:


  <Valve className="org.apache.catalina.valves.RemoteAddrValve"

         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />



[root@apex opt]# nano /opt/tomcat/webapps/manager/META-INF/context.xml



  GNU nano 2.9.8                                         /opt/tomcat/webapps/manager/META-INF/context.xml                                                   


<?xml version="1.0" encoding="UTF-8"?>

<!--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0

  (the "License"); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at


      http://www.apache.org/licenses/LICENSE-2.0


  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

-->

<Context antiResourceLocking="false" privileged="true" >

  <CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"

                   sameSiteCookies="strict" />

  <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$L$

</Context>


5.6: To allow the Host Manager App from the remote host, edit the context.xml file:

# nano /opt/tomcat/webapps/host-manager/META-INF/context.xml


Remove the following lines:


  <Valve className="org.apache.catalina.valves.RemoteAddrValve"

         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />

 

[root@apex opt]# nano /opt/tomcat/webapps/host-manager/META-INF/context.xml



  GNU nano 2.9.8                                      /opt/tomcat/webapps/host-manager/META-INF/context.xml                                                 


<?xml version="1.0" encoding="UTF-8"?>

<!--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0

  (the "License"); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at


      http://www.apache.org/licenses/LICENSE-2.0


  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

-->

<Context antiResourceLocking="false" privileged="true" >

  <CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"

                   sameSiteCookies="strict" />

  <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$L$

</Context>  


[root@apex opt]# cd /opt/tomcat/bin


5.6: COPY IMAGES FROM APEX DIRECTORY TO WEBAPPS DIRECTORY OF TOMCAT

[root@apex apex]# cp -rf images /opt/tomcat/webapps/i


5.7: Set an environment vaiables [Optional]

[root@apex /]# export JAVA_TOOL_OPTIONS="-Dconfig.url=/home/oracle/ords"


5.8: Startup the Tomcat Service

[root@apex opt]# cd /opt/tomcat/bin

[root@apex bin]# ./startup.sh 

Using CATALINA_BASE:   /opt/tomcat

Using CATALINA_HOME:   /opt/tomcat

Using CATALINA_TMPDIR: /opt/tomcat/temp

Using JRE_HOME:        /usr/java/jdk-15.0.1

Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar

Using CATALINA_OPTS:   

Tomcat started.

[root@apex bin]# 


----------------------------------------------------------------------------------

STEP-06: Run Apex service 

----------------------------------------------------------------------------------

6.1: Go to 

http://apex.testdb.com:8080/ords/


6.2: Put following inputs as 

Workspace : INTERNAL

Username  : ADMIN

Password  : Apex*123




Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post