Setting up APEX and Oracle Rest Data Services (ORDS)
The following topic lists the steps required to set up APEX and ORDS
Topics
Adding the APEX and APEX-DEV options to your DB instance
To add the APEX
and APEX-DEV
options to your RDS for Oracle DB instance,
do the following:
-
Create a new option group, or copy or modify an existing option group.
-
Add the
APEX
andAPEX-DEV
options to the option group. -
Associate the option group with your DB instance.
When you add the Amazon RDS APEX options, a brief outage occurs while your DB instance is automatically restarted.
Note
APEX_MAIL
is available when the APEX
option is
installed. The execute privilege for the APEX_MAIL
package is granted
to PUBLIC
so you don't need the APEX administrative account to use
it.
To add the APEX options to a DB instance
-
Determine the option group that you want to use. You can create a new option group or use an existing option group. If you want to use an existing option group, skip to the next step. Otherwise, create a custom DB option group with the following settings:
-
For Engine, choose the Oracle edition that you want to use. The APEX options are supported on all editions.
-
For Major engine version, choose the version of your DB instance.
For more information, see Creating an option group.
-
-
Add the options to the option group. If you want to deploy only the Oracle APEX runtime environment, add only the
APEX
option. To deploy the full development environment, add both theAPEX
andAPEX-DEV
options.For Version, choose the version of
APEX
that you want to use.Important
If you add the APEX options to an existing option group that is already attached to one or more DB instances, a brief outage occurs. During this outage, all the DB instances are automatically restarted.
For more information about adding options, see Adding an option to an option group.
-
Apply the option group to a new or existing DB instance:
-
For a new DB instance, you apply the option group when you launch the instance. For more information, see Creating an Amazon RDS DB instance.
-
For an existing DB instance, you apply the option group by modifying the instance and attaching the new option group. When you add the APEX options to an existing DB instance, a brief outage occurs while your DB instance is automatically restarted. For more information, see Modifying an Amazon RDS DB instance.
-
Unlocking the public user account on your DB instance
After the Amazon RDS APEX options are installed on your DB instance, make sure to do the following:
-
Change the password for the APEX public user account.
-
Unlock the account.
You can do this by using the Oracle SQL*Plus command line utility. Connect to your DB instance as the master
user, and issue the following commands. Replace new_password
with a password of your choice.
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY
new_password
; ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
Configuring RESTful services for Oracle APEX
To configure RESTful services in APEX (not needed for APEX 4.1.1.V1), use SQL*Plus to
connect to your DB instance as the master user. After you do this, run the
rdsadmin.rdsadmin_run_apex_rest_config
stored procedure. When you run
the stored procedure, you provide passwords for the following users:
-
APEX_LISTENER
-
APEX_REST_PUBLIC_USER
The stored procedure runs the apex_rest_config.sql
script, which creates
new database accounts for these users.
Note
Configuration isn't required for Oracle APEX version 4.1.1.v1. For this Oracle APEX version only, you don't need to run the stored procedure.
The following command runs the stored procedure.
EXEC rdsadmin.rdsadmin_run_apex_rest_config('
apex_listener_password
', 'apex_rest_public_user_password
');
Preparing to install ORDS on a separate host
Install ORDS on a separate host such as an Amazon EC2 instance, an on-premises server at
your company, or your desktop computer. The examples in this section,assume that your
host runs Linux and is named myapexhost.example.com
.
Before you can install ORDS, you need to create a nonprivileged OS user, and then download and unzip the APEX installation file.
To prepare for ORDS installation
-
Log in to
myapexhost.example.com
asroot
. -
Create a nonprivileged OS user to own the listener installation. The following command creates a new user named apexuser.
useradd -d /home/apexuser
apexuser
The following command assigns a password to the new user.
passwd apexuser;
-
Log in to
myapexhost.example.com
asapexuser
, and download the APEX installation file from Oracle to your/home/apexuser
directory: -
Unzip the file in the
/home/apexuser
directory.unzip apex_
version
.zipAfter you unzip the file, there is an
apex
directory in the/home/apexuser
directory. -
While you are still logged into
myapexhost.example.com
asapexuser
, download the Oracle REST Data Services file from Oracle to your/home/apexuser
directory: http://www.oracle.com/technetwork/developer-tools/apex-listener/downloads/index.html.
Setting up Oracle APEX listener
Note
Oracle APEX Listener is deprecated.
Amazon RDS for Oracle continues to support APEX version 4.1.1 and Oracle APEX Listener version 1.1.4. We recommend that you use the latest supported versions of Oracle APEX and ORDS.
Install Oracle APEX Listener on a separate host such as an Amazon EC2 instance, an
on-premises server at your company, or your desktop computer. We assume that the name of
your host is myapexhost.example.com
, and that your host is running
Linux.
Preparing to install Oracle APEX listener
Before you can install Oracle APEX Listener, you need to create a nonprivileged OS user, and then download and unzip the APEX installation file.
To prepare for Oracle APEX listener installation
-
Log in to
myapexhost.example.com
asroot
. -
Create a nonprivileged OS user to own the listener installation. The following command creates a new user named apexuser.
useradd -d /home/apexuser
apexuser
The following command assigns a password to the new user.
passwd apexuser;
-
Log in to
myapexhost.example.com
asapexuser
, and download the APEX installation file from Oracle to your/home/apexuser
directory: -
Unzip the file in the
/home/apexuser
directory.unzip apex_
<version>
.zipAfter you unzip the file, there is an
apex
directory in the/home/apexuser
directory. -
While you are still logged into
myapexhost.example.com
asapexuser
, download the Oracle APEX Listener file from Oracle to your/home/apexuser
directory.
Installing and configuring Oracle APEX listener
Before you can use APEX, you need to download the apex.war file, use Java to install Oracle APEX Listener, and then start the listener.
To install and configure Oracle APEX listener
-
Create a new directory based on Oracle APEX Listener and open the listener file.
Run the following code:
mkdir /home/apexuser/apexlistener cd /home/apexuser/apexlistener unzip ../apex_listener.
version
.zip -
Run the following code.
java -Dapex.home=./apex -Dapex.images=/home/apexuser/apex/images -Dapex.erase -jar ./apex.war
-
Enter information for the program prompts following:
-
The APEX Listener Administrator user name. The default is adminlistener.
-
A password for the APEX Listener Administrator.
-
The APEX Listener Manager user name. The default is managerlistener.
-
A password for the APEX Listener Administrator.
The program prints a URL that you need to complete the configuration, as follows.
INFO: Please complete configuration at: http://localhost:8080/apex/listenerConfigure Database is not yet configured
-
-
Leave Oracle APEX Listener running so that you can use Oracle Application Express. When you have finished this configuration procedure, you can run the listener in the background.
-
From your web browser, go to the URL provided by the APEX Listener program. The Oracle Application Express Listener administration window appears. Enter the following information:
-
Username –
APEX_PUBLIC_USER
-
Password – the password for APEX_PUBLIC_USER. This password is the one that you specified earlier when you configured the APEX repository. For more information, see Unlocking the public user account on your DB instance.
-
Connection type – Basic
-
Hostname – the endpoint of your Amazon RDS DB instance, such as
mydb.f9rbfa893tft.us-east-1.rds.amazonaws.com
. -
Port – 1521
-
SID – the name of the database on your Amazon RDS DB instance, such as
mydb
.
-
-
Choose Apply. The APEX administration window appears.
-
Set a password for the APEX
admin
user. To do this, use SQL*Plus to connect to your DB instance as the master user, and then run the following commands.EXEC rdsadmin.rdsadmin_util.grant_apex_admin_role; grant APEX_ADMINISTRATOR_ROLE to
master
; @/home/apexuser/apex/apxchpwd.sqlReplace
with your master user name. When themaster
apxchpwd.sql
script prompts you, enter a newadmin
password. -
Return to the APEX administration window in your browser and choose Administration. Next, choose Application Express Internal Administration. When you are prompted for credentials, enter the following information:
-
User name –
admin
-
Password – the password you set using the
apxchpwd.sql
script
Choose Login, and then set a new password for the
admin
user. -
Your listener is now ready for use.