Oracle APEX Installation Documentation
APEX Installation & Configuration
Downloading and Installing Oracle Application Express
To install Oracle Application Express:
Download Oracle Application Express ZIP file from download Page
For installations where the development will be in English only, download the file
apex_18.2_en.zip
. If the development will include languages other than English, downloadapex_18.2.zip
file.Unzip downloaded zip file to your local directory. for example
C:/
.Open your command line tool and Change your working directory to the directory on whcih you unzip APEX file. in our Case
C:\APEX
.C:\Users\user>cd .. C:\Users>cd .. C:> cd apex C:\apex
Open SQL*Plus from the command tool and connect to the database as
sysdba
. Another way is to start SQL*Plus in APEX directory.C:\apex>sqlplus sys as sysdba Enter password: SYS_password SQL>
Select the appropriate installation option.
You have two choices: Full development environment and Runtime environment
Full development environment provides complete access to the App Builder environment to develop applications. A Runtime environment enables users to run applications that cannot be modified.
Run The
apexins.sql
file with its four arguments:SQL>@apexins.sql tablespace_apex tablespace_files tablespace_temp images
Where:
tablespace_apex
is the name of the tablespace for the Oracle Application Express application user.tablespace_files
is the name of the tablespace for the Oracle Application Express files user.tablespace_temp
is the name of the temporary tablespace or tablespace group.images
is the virtual directory for Oracle Application Express images. For installations using EPG, /i
/ is the required value for the images argument. To support future Oracle Application Express upgrades, define the virtual image directory as /i
/.
Example:
SQL>@apexins.sql SYSAUX SYSAUX TEMP /i/
Run The
apxrtins.sql
file with its four arguments as described above.Example:
SQL>@apxrtins.sql SYSAUX SYSAUX TEMP /i/
After the installation is completed reconnect again to the database using SQL*Plus using
sys as sysdba
and run the below commands.C:\apex>sqlplus sys as sysdba Enter password: SYS_password SQL>
Note
If you install Oracle APEX 20.2 or later, skip running the code below and move to Step 7. EPG is not supported from 20.2 and later !!
Run
apex_epg_config.sql
passing the file system path to the base directory where the Oracle Application Express software was unzipped as shown in the following example:SQL>@apex_epg_config.sql C:
where
C:
is the base directory where the Oracle Application Express software was unzipped.Run the
apxchpwd.sql
script to create and update APEX Instance Administrator account. For example:SQL>@apxchpwd.sql Enter the administrator's username [ADMIN] Enter ADMIN's email [ADMIN] Enter ADMIN's password []
type the password here
Configuring the
APEX_PUBLIC_USER
Account.The
APEX_PUBLIC_USER
Account is created with a random password in a new installation of Oracle Application Express. So, you must change the password and unlock the account. For Example:SQL>ALTER USER APEX_PUBLIC_USER IDENTIFIED BY
new_password
ACCOUNT UNLOCK;Also, unlock the
Anonymous
account as below.SQL>ALTER USER ANONYMOUS ACCOUNT UNLOCK;
Full development environment.
Runtime environment.
The next step is to install ORDS.
Installing Oracle REST Data Services
In previous section, we describe how to install Oracle Application Express in a on-premises (or local) installation. In this section, we will describe how to deploy Oracle Application Express on a Web server using Oracle REST Data Services (ORDS).
This section will contains the following topics:
- Installation prerequisites
- Installing Oracle REST Data Services
- Installing Web Server (Tomcat)
- Deploying Oracle REST Data Services
Installation Prerequisites
Before Installing Oracle REST Data Services, you have to be sure that the following prerequisites are already installed:
Oracle Database at least 11.2.0.4 or later. Or you can install Oracle XE version 11 or later.
Oracle Application Express version 18.2 or later.
Java JDK package. you can download it from Download site.
Installing Oracle REST Data Services
To Install Oracle REST Data Services:
- Download the latest release of Oracle REST Data Services from the following site:
- Unzip the downloaded zip file into a directory (or folder) of your choice:
Create a folder in a local drive. For example:
C:\ORDS
Unzip
ords.war
file from the downloaded zip file to the folderC:\ORDS
.Create sub-folder in
C:\ORDS
folder and give it a name (For example:conf
) for the purpose of storing the configuration ofORDS
.
- Grant full control permisions to
USERS
andALL APPLICATION PACKAGES
on Java JDK path:Go to Java JDK path For example:
C:\Program Files\Java\jdk
x.x.x
where
x.x.x
is the version of the JDK.- In the directory path, you will find a folder named
bin
. Right click onbin
and go toSecurity
tab and click onEdit
and grantfull control
toUSERS
andALL APPLICATION PACKAGES
groups.
Add Java path to system environment:
Right click on Computer icon.
Click on
Advanced System Settings
Click on
Environment Variables
Under
User Variables
add new variable and give it a name ofJAVA_HOME
and the value must be Java JDK path for example:C:\Program Files\Java\jdk
x.x.x
\binwhere
x.x.x
is the version of the JDK.
Open the
command line
tool and change the directory to the JAVA_PATH (the path you set in step 4). For example:C:\Users\user>cd C:\Program Files\Java\jdk
x.x.x
\bin C:\Program Files\Java\jdkx.x.x
\bin>Now we get the environment ready to install ORDS. To install ORDS follow the steps below:
Install ords.war by running the command
java -jar
. In our case, it isORDS.WAR PATH
C:\ords\ords.war
For example:C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.warafter this command, we have to complete the following prompts
The location to store configuration data. In our case it is:
C:\ords\conf
as created in step 2. For example:C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war Enter the location to store configuration data:C:\ords\conf
The database server, port and service/SID. as shown below
C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war Enter the location to store configuration data:C:\ords\conf
Enter the name of the database server [localhost]: Enter the database listen port [1521]: Enter 1 to specify the database service name, or 2 to specify the database SID [1]: Enter the database service name:orcl
In above prompts we choose default options for Database server as
localhost
, default port1521
and default Service/SID1
and type the service name which is in our case:orcl
.Install Oracle REST Data Services schema
C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war Enter the location to store configuration data:C:\ords\conf Enter the name of the database server [localhost]: Enter the database listen port [1521]: Enter 1 to specify the database service name, or 2 to specify the database SID [1]: Enter the database service name:orcl Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:1
Enter the database password for ORDS_PUBLIC_USER:password
password:password
Provide sys password in order to install Oracle REST Data Services schema:
C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war Enter the location to store configuration data:C:\ords\conf Enter the name of the database server [localhost]: Enter the database listen port [1521]: Enter 1 to specify the database service name, or 2 to specify the database SID [1]: Enter the database service name:orcl Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:1
Enter the database password for ORDS_PUBLIC_USER: Confirm password: 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:sys_password
Confirm password:sys_password
Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/xe Retrieving information. Enter the default tablespace for ORDS_METADATA [SYSAUX]:SYSAUX
Enter the temporary tablespace for ORDS_METADATA [TEMP]:TEMP
Enter the default tablespace for ORDS_PUBLIC_USER [USERS]:USERS
Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:TEMP
Specify passwords for the users:
APEX_PUBLIC_USER
,APEX_LISTENER
,APEX_REST_PUBLIC_USER
as shown below:C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war Enter the location to store configuration data:C:\ords\conf Enter the name of the database server [localhost]: Enter the database listen port [1521]: Enter 1 to specify the database service name, or 2 to specify the database SID [1]: Enter the database service name:orcl Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:1
Enter the database password for ORDS_PUBLIC_USER: Confirm password: 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:sys_password
Confirm password:sys_password
Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/xe Retrieving information. Enter the default tablespace for ORDS_METADATA [SYSAUX]:SYSAUX
Enter the temporary tablespace for ORDS_METADATA [TEMP]:TEMP
Enter the default tablespace for ORDS_PUBLIC_USER [USERS]:USERS
Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:TEMP
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]:1
Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]: Enter the database password for APEX_PUBLIC_USER:Password
Confirm password: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]:1
Enter the database password for APEX_LISTENER:Password
Confirm password:Password
Enter the database password for APEX_REST_PUBLIC_USER:Password
Confirm password:Password
Enter a number to select a feature to enable: [1] SQL Developer Web (Enables all features) [2] REST Enabled SQL [3] Database API [4] REST Enabled SQL and Database API [5] None Choose [1]:1
Note
Keep the passwords you specify above and the password you specify for
ORDS_PUBLIC_USER
for we will need them in next steps.Choose Web Server mode. In our case we will use Tomcat, so we will specify
2
.C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war Enter the location to store configuration data:C:\ords\conf Enter the name of the database server [localhost]: Enter the database listen port [1521]: Enter 1 to specify the database service name, or 2 to specify the database SID [1]: Enter the database service name:orcl Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:1
Enter the database password for ORDS_PUBLIC_USER: Confirm password: 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:sys_password
Confirm password:sys_password
Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/xe Retrieving information. Enter the default tablespace for ORDS_METADATA [SYSAUX]:SYSAUX
Enter the temporary tablespace for ORDS_METADATA [TEMP]:TEMP
Enter the default tablespace for ORDS_PUBLIC_USER [USERS]:USERS
Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:TEMP
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]:1
Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]: Enter the database password for APEX_PUBLIC_USER:Password
Confirm password: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]:1
Enter the database password for APEX_LISTENER:Password
Confirm password:Password
Enter the database password for APEX_REST_PUBLIC_USER:Password
Confirm password:Password
Enter a number to select a feature to enable: [1] SQL Developer Web (Enables all features) [2] REST Enabled SQL [3] Database API [4] REST Enabled SQL and Database API [5] None Choose [1]:1
Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2
Configuring Oracle Application Express Images. Use the static command to create a web archive file named
i.war
.java -jar ords.war static [apex directory]\images
In our case [apex directory] is
C:/apex
. The command will be:C:\Program Files\Java\jdk
x.x.x
\bin>java -jar C:\ords\ords.war staticC:\apex\images
Configure RESTful Services in Oracle Application Express:
Open your command line tool and Change your working directory to the directory on which you unzip APEX file. in our Case
C:\APEX
.C:\Users\user>cd .. C:\Users>cd .. C:> cd apex C:\apex
Open SQL*Plus from the command tool and connect to the database as
sysdba
. Another way is to start SQL*Plus in APEX directory.C:\apex>sqlplus sys as sysdba Enter password: SYS_password SQL>
Run
apex_rest_config.sql
. For example:SQL>@apex_rest_config.sql
Change the passwords for the users:
APEX_PUBLIC_USER
,APEX_LISTENER
,APEX_REST_PUBLIC_USER
andORDS_PUBLIC_USER
as the passwords you specified in step 6 and unlock the accounts as well. For example:SQL> alter user APEX_PUBLIC_USER identified by
password
account unlock; User altered SQL> alter user APEX_LISTENER identified bypassword
account unlock; User altered SQL> alter user APEX_REST_PUBLIC_USER identified bypassword
account unlock; User altered SQL> alter user ORDS_PUBLIC_USER identified bypassword
account unlock; User altered
http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html
Deploying ORDS
After Installing ORDS, now we will deploy the ords.war
to a web server, Apache Tomcat, in this section.
This section Contains the following topics:
Installing the Apache Tomcat
To Install Apache Tomcat:Download the latest release of Apache Tomcat,
Windows Installer
, from the download site:Install Apache Tomcat windows installer:
- Launch the
exe installer
you downloaded and clickNext
- Read the terms of agreement and click
I Agree
- click on
Next
- In this Screen, be sure to change
HTTP/1.1 Connector Port
from its default value8080
to another value. In our case, changed to9090
. Also, specifyTomcat Administrator Login Username & Password
: - click on
Next
- click on
Install
- click on
Finish
- Launch the
https://tomcat.apache.org/download-90.cgi
Deploying ORDS to Apache Tomcat
To deploy ords.war
to the web server:
Go to
ORDS path
in which you install ords. In our case:C:\ords
.Copy
ords.war
file to the Web serverwebapps
folder:Apache Tomcat Directory\webapps
For example: go toC:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps
and paste theords.war
file in this path.Go to
APEX Images path
inside APEX installation folder. In our case:C:\apex\images
.Inside Web server
webapps
folder, create a new folder and name iti
.Copy
all images folder contents
to thei
folder insidewebapps
folder you created in previous step:Apache Tomcat Directory\webapps\i
For example: go toC:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\i
and paste the images contnts in this path.Restart Apache Tomcat Service:
Go to
Apache Tomcat Directory\bin
and openTomcat
.X
wwhere
X
is the version of Apache Tomcat installed.Example:
You can now open Oracle Oracle Application Express using Oracle REST Data Services using the url:
http://Host:Web server port/ords.war file name/
Where:Host
: is the host on which you installed Oracle APEX. It can be the machine name or IP address. In our case we will uselocalhost
.Web server port
: is the port of the installed web server. In our case it is9090
as configured during Tomcat installation.ords.war file name
: is the name ofords.war
file. In our case it is:ords
.
Example:
http://localhost:9090/ords
Comments
Post a Comment