Installation of APEX 21.2 in Linux

Step by step installation of APEX 21.2  in Linux


Description:
    In this blog, we are going to see step-by-step installation steps in oracle apex 21.2 on Linux and database 19c.

Oracle Application Express:

  • Oracle Application Express (APEX) is a low-code development platform.
  • that enables you to build stunning, scalable, secure apps with world-class features that can be deployed anywhere.
  • Using APEX, developers can quickly develop and deploy compelling apps that solve real problems and provide immediate value.
Overall steps:

1. Create a directory copy the software's.
2. Unzip Apex 21.2 Zip File.
3. Create APEX tablesapce.
4. Execute apex installation scripts.
5. Configure the database apex restful services.
6. Alter a apex user in database level and set the password.
7. Set the port number as 0.
8. Unzip java and tomcat Zip files.
9. Create Tomcat environment file, start tomcat and check the ip 
its working or not.
10. In tomcat-user.xml file entries.
11. ORDS  configuration process.
12. apex.war file creation and Set Oracle REST Database Service ORDS 
configuration directory.
13. ORDS installation process.
14. Apex.xml file entries and create image directory and copy images.
15. Start the tomcat and check web page front end working or not.

Required Software’s

Step 1:- Create a Directory and copy the softwares.
    Create a new directory name as apex_21.2.
     Either we can download software or we copy the software’s from available locations using winscp/scp. Step 2:- Unzip the Apex file in the created directory.
     Unzip the Apex software in our customized location after unzipping it will create a directory called apex.
[oracle@primary apex21.2]$ unzip apex_21.2_en.zip
Step 3:- Create a separate tablespace for Apex:
       SQL>create tablesapce APEX datafile ‘/u01/app/oracle/oradata/ORCL/apex02.dbf’ size 1g;
Tablesapce created.
Step 4:- Execute apex installation scripts.
        Script Location – /home/oracle/apex21.2/apex
[oracle@primary apex]$ cat apexins.sql
SQL> @apexins.sql APEX APEX TEMP /i/
Step 5:- Configure the database apex restful services.
       SYS> @apex_rest_config.sql
PL/SQL procedure successfully completed.
       After execute script provide password for public user and apex listener.
Step 6:- Alter a apex user in database level and set the password.
SYS> alter user APEX_LISTENER identified by Apex#321 account unlock;
SYS> alter user APEX_PUBLIC_USER identified by Apex#321 account unlock;
Step 7:- Set the port number as 0. (we need to set default port 8080 while using PLSQL gateway)
SYS> EXEC dbms_xdb.sethttpport(0);
PL/SQL procedure successfully completed.

Step 8:- Unzip java and tomcat Zip files.
Unzip the java software file.
[oracle@primary apex21.2]$ tar -xvf jdk-17_linux-x64_bin.tar.gz
unzip tomcat software file.

[oracle@primary apex21.2]$ tar -xvf apache-tomcat-9.0.27.tar.gz
Step 9:- Create Tomcat environment file, start tomcat and check the ip its working or not.
[oracle@primary ~]$vi  tomcat.env

export JAVA_HOME=/home/oracle/apex21.2/jdk-17.0.1
export CATALINA_HOME=/home/oracle/apex21.2/apache-tomcat-9.0.27
export CATALINA_BASE=$CATALINA_HOME
Start the tomcat using start up script.
script location – cd$CATALINA_HOME/bin/startup.sh
check the system local ip tomcat working or not if working shutdown the tomcat for apex configuration.
System IP – http://192.168.44.128:8080
Step 10:- Tomcat user-xml file entries.
script Location – /home/oracle/apex21.2/apache-tomcat-9.0.27/conf/tomcat-user.xml
<role rolename=”manager-gui” />

<user username=”oracle” password=”oracle” roles=”manager-gui” />Step 11:- ORDS  configuration process.
Make a directory as ords and unzip ords software in that location.
Make a conf directory in that ords location.
ORDS configuration:
Add the dbname and domain entries in the “ords_params.properties” file

[oracle@primary ords]$ cd params/
[oracle@primary params]$ ls
ords_params.properties
[oracle@primary params]$ cat ords_params.properties
#Thu Nov 25 07:19:06 IST 2021
db.hostname=primary.localdomain (mention the Hostname)
db.password=@0509B9AA45A97BE4E54E4C5E0A3BC3E45135BFB52D400C1A4C
db.port=1521
db.servicename=orcl.localdomain (specify the domain)
db.username=APEX_PUBLIC_USER
migrate.apex.rest=false
plsql.gateway.add=true
rest.services.apex.add=true
rest.services.ords.add=true
schema.tablespace.default=APEX (set the tablespace)
schema.tablespace.temp=TEMP
standalone.http.port=8080
standalone.mode=false
user.apex.listener.password=Apex#321
user.apex.restpublic.password=Apex#321
user.public.password=Apex#321
user.tablespace.default=APEX
user.tablespace.temp=TEMP
Step 12:- apex.war file creation and Set Oracle REST Database Service ORDS
configuration directory.
Take a backup for ords war file.

     [oracle@primary ords]$cp ords.war ords.war_bkp_25_11_2021
Move the file ords.war to apex.war
      [oracle@primary ords]$ mv ords.war apex.war
Set Oracle REST Database Service ORDS configuration directory
[oracle@primary ords]$ /home/oracle/apex21.2/jdk-17.0.1/bin/java -jar apex.war configdir /home/oracle/apex21.2/ords/conf
INFO: Set config.dir to /home/oracle/apex21.2/ords/conf in: /home/oracle/apex21.2/ords/apex.war
Step 13:- ORDS installation process:-
       after create apex war file using that to install a java.
[oracle@primary ords]$ /home/oracle/apex21.2/jdk-17.0.1/bin/java -jar apex.war install advanced

Verify ORDS schema in Database Configuration apex with connection host: primary.localdomain port: 1521 service name: orcl.localdomain
Requires to login with administrator privileges to verify Oracle REST Data Services schema.
Enter the administrator username:sys
Enter the database password for SYS AS SYSDBA:
Confirm password:
retrieving information.
Enter the default tablespace for ORDS_METADATA [APEX]:
Enter the temporary tablespace for ORDS_METADATA [TEMP]:
Enter the default tablespace for ORDS_PUBLIC_USER [APEX]:
Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:
Installing Oracle REST Data Services version 19.1.0.r0921545
… Log file written to /home/oracle/ords_install_core_2021-11-25_014419_00456.log
… Verified database prerequisites
… Created Oracle REST Data Services proxy user
… Created Oracle REST Data Services schema
… Granted privileges to Oracle REST Data Services
… Created Oracle REST Data Services database objects
… Log file written to /home/oracle/ords_install_datamodel_2021-11-25_014452_00616.log
… Log file written to /home/oracle/ords_install_apex_2021-11-25_014455_00239.log
Completed installation for Oracle REST Data Services version 19.1.0.r0921545. Elapsed time: 00:00:39.481
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:
Nov 25, 2021 06:24:50 AM
INFO: reloaded pools: []
Enter 1 if you wish to start in standalone mode or 2 to exit [1]: Step 14:- Apex.xml file entries and create image directory and copy images.
     Make the below entries in apex.xml file.
script location: [oracle@primary conf]$ pwd
/home/oracle/apex21.2/ords/conf/apex/conf

<entry key=”jdbc.InitialLimit”>15</entry>
<entry key=”jdbc.MinLimit”>15</entry>
<entry key=”jdbc.MaxLimit”>50</entry>       Create a images directory and copy the oracle application express images.
[oracle@primary ~]$ mkdir -p  $CATALINA_HOME/webapps/i/
[oracle@primary apex]$ cp -R /home/oracle/apex21.2/apex/images/* $CATALINA_HOME/webapps/i/
     Copy the apex.war file in webapps folder
Step 15:-
Start the tomcat and check apex front end working or not.
start tomcat using a startup script.
[oracle@primary ~]$ . tomcat.env
[oracle@primary ~]$ cd $CATALINA_HOME/bin
[oracle@primary bin]$ sh startup.sh
       check the local IP  and apex application working or not
     http://192.168.44.128:8080/apex
Reset Admin password:-
Reset admin password connect the database and execute the script @apxchpwd.sql
Login to new password:-
      log in the new password the apex application now working fine.
********************************************************************************

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8