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.zipfile.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:\apexOpen 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.sqlfile with its four arguments:SQL>@apexins.sql tablespace_apex tablespace_files tablespace_temp images
Where:
tablespace_apexis the name of the tablespace for the Oracle Application Express application user.tablespace_filesis the name of the tablespace for the Oracle Application Express files user.tablespace_tempis the name of the temporary tablespace or tablespace group.imagesis 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.sqlfile 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 sysdbaand 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.sqlpassing 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.sqlscript 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 hereConfiguring the
APEX_PUBLIC_USERAccount.The
APEX_PUBLIC_USERAccount 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_passwordACCOUNT UNLOCK;Also, unlock the
Anonymousaccount 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:\ORDSUnzip
ords.warfile from the downloaded zip file to the folderC:\ORDS.Create sub-folder in
C:\ORDSfolder and give it a name (For example:conf) for the purpose of storing the configuration ofORDS.
- Grant full control permisions to
USERSandALL APPLICATION PACKAGESon Java JDK path:Go to Java JDK path For example:
C:\Program Files\Java\jdkx.x.xwhere
x.x.xis the version of the JDK.- In the directory path, you will find a folder named
bin. Right click onbinand go toSecuritytab and click onEditand grantfull controltoUSERSandALL APPLICATION PACKAGESgroups.
Add Java path to system environment:
Right click on Computer icon.
Click on
Advanced System SettingsClick on
Environment VariablesUnder
User Variablesadd new variable and give it a name ofJAVA_HOMEand the value must be Java JDK path for example:C:\Program Files\Java\jdkx.x.x\binwhere
x.x.xis the version of the JDK.
Open the
command linetool 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 PATHC:\ords\ords.warFor 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\confas 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\confThe 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\confEnter 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:orclIn above prompts we choose default options for Database server as
localhost, default port1521and default Service/SID1and 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]:1Enter the database password for ORDS_PUBLIC_USER:passwordpassword:passwordProvide 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]:1Enter 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_passwordConfirm password:sys_passwordConnecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/xe Retrieving information. Enter the default tablespace for ORDS_METADATA [SYSAUX]:SYSAUXEnter the temporary tablespace for ORDS_METADATA [TEMP]:TEMPEnter the default tablespace for ORDS_PUBLIC_USER [USERS]:USERSEnter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:TEMPSpecify passwords for the users:
APEX_PUBLIC_USER,APEX_LISTENER,APEX_REST_PUBLIC_USERas 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]:1Enter 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_passwordConfirm password:sys_passwordConnecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/xe Retrieving information. Enter the default tablespace for ORDS_METADATA [SYSAUX]:SYSAUXEnter the temporary tablespace for ORDS_METADATA [TEMP]:TEMPEnter the default tablespace for ORDS_PUBLIC_USER [USERS]:USERSEnter 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]:1Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]: Enter the database password for APEX_PUBLIC_USER:PasswordConfirm password:PasswordEnter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step [1]:1Enter the database password for APEX_LISTENER:PasswordConfirm password:PasswordEnter the database password for APEX_REST_PUBLIC_USER:PasswordConfirm password:PasswordEnter 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]:1Note
Keep the passwords you specify above and the password you specify for
ORDS_PUBLIC_USERfor 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]:1Enter 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_passwordConfirm password:sys_passwordConnecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/xe Retrieving information. Enter the default tablespace for ORDS_METADATA [SYSAUX]:SYSAUXEnter the temporary tablespace for ORDS_METADATA [TEMP]:TEMPEnter the default tablespace for ORDS_PUBLIC_USER [USERS]:USERSEnter 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]:1Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]: Enter the database password for APEX_PUBLIC_USER:PasswordConfirm password:PasswordEnter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step [1]:1Enter the database password for APEX_LISTENER:PasswordConfirm password:PasswordEnter the database password for APEX_REST_PUBLIC_USER:PasswordConfirm password:PasswordEnter 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]:2Configuring Oracle Application Express Images. Use the static command to create a web archive file named
i.war.java -jar ords.war static [apex directory]\imagesIn 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:\apexOpen 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_USERandORDS_PUBLIC_USERas the passwords you specified in step 6 and unlock the accounts as well. For example:SQL> alter user APEX_PUBLIC_USER identified by
passwordaccount unlock; User altered SQL> alter user APEX_LISTENER identified bypasswordaccount unlock; User altered SQL> alter user APEX_REST_PUBLIC_USER identified bypasswordaccount unlock; User altered SQL> alter user ORDS_PUBLIC_USER identified bypasswordaccount unlock; User altered
http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.htmlDeploying 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 installeryou 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 Portfrom its default value8080to 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.cgiDeploying ORDS to Apache Tomcat
To deploy ords.war to the web server:
Go to
ORDS pathin which you install ords. In our case:C:\ords.Copy
ords.warfile to the Web serverwebappsfolder:Apache Tomcat Directory\webapps
For example: go toC:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webappsand paste theords.warfile in this path.Go to
APEX Images pathinside APEX installation folder. In our case:C:\apex\images.Inside Web server
webappsfolder, create a new folder and name iti.Copy
all images folder contentsto theifolder insidewebappsfolder you created in previous step:Apache Tomcat Directory\webapps\i
For example: go toC:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\iand paste the images contnts in this path.Restart Apache Tomcat Service:
Go to
Apache Tomcat Directory\binand openTomcat.Xwwhere
Xis 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 is9090as configured during Tomcat installation.ords.war file name: is the name ofords.warfile. In our case it is:ords.
Example:
http://localhost:9090/ords


Comments
Post a Comment