Installing Application Express for Oracle 12c on a Linux RedHat Server

How to Install Application Express for Oracle 12c on a Linux RedHat Server

Posted by Daniel Brody on March 15, 2023 · 11 mins read

Introduction

Application Express, also known as APEX, is a web-based rapid application development tool that enables developers to create scalable, secure, and reliable applications quickly. It is a free tool that comes with Oracle Database 12c, and it is a great choice for building web applications that leverage the power of Oracle Database.

In this guide, we will provide a detailed overview of the steps required to install Application Express for Oracle 12c on a Linux RedHat server. We will cover the following topics:

  • Preparing for the installation
  • Downloading the installation files
  • Installing the Application Express software
  • Configuring the Application Express environment
  • Verifying the installation
  • Troubleshooting common issues

Prerequisites

Before we begin the installation process, we must ensure that we meet the following prerequisites:

  • An Oracle Database 12c installation is already present on the Linux RedHat server.
  • The database must be running and accessible from the Linux RedHat server.
  • A valid Oracle user account with SYSDBA privileges is available for use during the installation process.
  • The server has internet connectivity to download the installation files and updates.

Downloading the Installation Files

To begin the installation, we need to download the installation files from the Oracle website. We can obtain the installation files from the following URL: www.oracle.com/tools/downloads/apex-downloads.html

We must ensure that we download the appropriate version of Application Express for Oracle Database 12c. Once we have downloaded the installation files, we can move on to the next step.

Installing the Application Express Software

To install Application Express for Oracle 12c on a Linux RedHat server, we need to follow the steps outlined below:

Step 1: Extract the Installation Files

We need to extract the downloaded installation files to a directory of our choice. For example, if we downloaded the files to the /tmp directory, we can extract them by running the following command:

$ cd /tmp
$ unzip apex_21.1.zip

Step 2: Change to the Installation Directory

We need to change to the installation directory by running the following command:

$ cd apex

Step 3: Install Application Express

We need to install Application Express by running the following command:

$ sqlplus / as sysdba @apexins.sql APEX APEX_TEMP /i/

This command installs Application Express into the APEX schema and creates the necessary tables and views. It also creates the APEX_TEMP tablespace.

Step 4: Unlock the Anonymous User Account

By default, the anonymous user account is locked. We need to unlock the account by running the following command:

$ sqlplus / as sysdba
SQL> alter user anonymous account unlock;

Step 5: Configure the PL/SQL Gateway

We need to configure the PL/SQL gateway by running the following command:

$ sqlplus / as sysdba @apex_epg_config.sql /tmp

This command configures the Oracle XML DB HTTP Server and enables the PL/SQL Gateway.

Step 6: Set the Access Control List

We need to set the Access Control List (ACL) by running the following command:

$ sqlplus / as sysdba @apex_rest_config.sql

This command sets the ACL for Application Express RESTful services.

Configuring the Application Express Environment

After we have installed Application Express, we need to configure the environment. We can configure the environment by following the steps outlined below:

Step 1: Access the Administration Console

To access the Application Express Administration Console, we need to open a web browser and navigate to the following URL:

http://<hostname>:<port>/apex/apex_admin

Replace <hostname> with the name or IP address of the Linux RedHat server and <port> with the port number where the Oracle XML DB HTTP Server is listening. By default, the port number is 8080.

Step 2: Log in to the Administration Console

When we access the Administration Console for the first time, we need to log in using the credentials for the SYS account. We should use the following credentials:

  • Username: SYS
  • Password:
  • Workspace: INTERNAL

Step 3: Create a New Workspace

Once we have logged in to the Administration Console, we need to create a new workspace. A workspace is a logical grouping of database objects, such as tables and views, that are used to build applications.

To create a new workspace, we need to follow these steps:

  1. Click on the “Manage Workspaces” link in the left-hand navigation menu.
  2. Click on the “Create Workspace” button.
  3. Enter a name for the workspace and a description (optional).
  4. Choose a database schema to associate with the workspace.
  5. Choose a default authentication scheme for the workspace.
  6. Click on the “Create Workspace” button.

Step 4: Configure the Workspace Settings

After we have created a new workspace, we need to configure its settings. We can configure the workspace settings by following these steps:

  1. Click on the “Workspace Details” link in the left-hand navigation menu.
  2. Update the workspace settings as necessary. We can configure settings such as email notifications, error handling, and security.
  3. Click on the “Save” button to save the changes.

Step 5: Create a Developer Account

To develop applications in the new workspace, we need to create a developer account. We can create a developer account by following these steps:

  1. Click on the “Manage Developers” link in the left-hand navigation menu.
  2. Click on the “Create Developer” button.
  3. Enter the developer’s details, such as name and email address.
  4. Assign a username and password for the developer.
  5. Click on the “Create Developer” button.

Step 6: Log in to the Workspace

After we have created a developer account, we can log in to the new workspace using the developer’s credentials. To log in to the workspace, we need to follow these steps:

  1. Navigate to the following URL:
    http://<hostname>:<port>/apex/f?p=<app_id>:1:<session_id>::NO:::
    

Replace <hostname> with the name or IP address of the Linux RedHat server, <port> with the port number where the Oracle XML DB HTTP Server is listening, <app_id> with the ID of the new workspace, and <session_id> with a valid session ID.

  1. Enter the developer’s username and password.
  2. Click on the “Log In” button.

Verifying the Installation

To verify that the installation was successful, we can create a simple application and test it. We can create a new application by following these steps:

  1. Log in to the workspace using the developer’s credentials.
  2. Click on the “Create” button in the top-right corner.
  3. Choose “Application” from the list of options.
  4. Enter a name for the application and a description (optional).
  5. Choose a theme for the application.
  6. Click on the “Create Application” button.

After we have created the new application, we can add a page to it and test it by following these steps:

  1. Click on the “Create Page” button in the top-right corner.
  2. Choose a page type, such as a “Blank Page” or a “Report” page.
  3. Enter a name for the page and a description (optional).
  4. Configure the page properties, such as the page title and region layout.
  5. Click on the “Create Page” button.

Once we have created the page, we can test it by following these steps:

  1. Click on the “Run Application” button in the top-right corner.
  2. Select the new application from the list of applications.
  3. Choose the new page from the list of pages.
  4. Click on the “Run” button.

If the page is displayed correctly, then the installation was successful.

Troubleshooting Common Issues

If we encounter any issues during the installation or configuration process, we can troubleshoot them by following these steps:

  1. Review the installation and configuration logs. The installation logs are located in the install_dir/logs directory, and the configuration logs are located in the ORACLE_HOME/apex/logs directory.
  2. Check the database alert log for any error messages.
  3. Check the listener log for any error messages.
  4. Verify that the database is running and accessible from the Linux RedHat server.
  5. Verify that the correct version of Application Express was installed.
  6. Verify that the correct version of Oracle Database was installed.
  7. Verify that the required software components, such as the Oracle XML DB HTTP Server and the PL/SQL Gateway, are installed and configured correctly.
  8. Verify that the Access Control List (ACL) is set correctly.
  9. Verify that the user account used during the installation has the necessary privileges.
  10. Consult the Oracle documentation and support resources for additional guidance.

Conclusion

In conclusion, installing Application Express for Oracle 12c on a Linux RedHat server is a straightforward process that requires careful planning and attention to detail. By following the steps outlined in this guide, we can successfully install and configure Application Express and begin building scalable, secure, and reliable web applications that leverage the power of Oracle Database. If we encounter any issues, we can refer to the troubleshooting steps outlined in this guide and consult the Oracle documentation and support resources for additional guidance.


  • HowTo: Installing Application Express for Oracle 12c on a Linux RedHat Server
  • March 15, 2023
  • Brody, Daniel
  • COPYRIGHT 2022 Yom Shore Ventures LLC