I was asked this question in my current employment and I thought it might be a good idea to blog about it. This is a very simple and high level steps to get an Oracle database XE (free edition) and update APEX to the latest version on a windows (windows 7) platform. But the installation process/steps should be very identical to any Linux or Mac OS.
Pre-Requisite
- Some knowledge about installation application on windows platform
- Some familiarity with Oracle products
Lets get into the sequence of steps that need to be performed:
Step1 – Download XE
The first step is to download the software. Since the topic is how to use the free product, we’ll download the Oracle database XE, which doesn’t need license. Please be mindful that there’re limitations in the size of data, performance, features, etc. You can read all about it here at Oracle documentation.
The link to download Oracle database XE for windows x64-bit is here. You’d need to have an OTN (Oracle Technology Network) account and accept the license agreement. The latest free edition of XE database is 11g (11.2.0.2). As far as I know, there is no plan from Oracle to release a 12c version.
Step2 – Download APEX
The next step is to download latest version of APEX. By default, XE database has APEX installed but it is version 4.x. Oracle APEX team had spent about 2 years of work to build the next version of APEX 5. It has many new web features that has new themes for desktop, mobile and many new packaged applications. Its definitely worth to upgrade to APEX 5.
Download the APEX product here.
Step3 – Install XE
The next step is to install Oracle XE. The installation is quite simple. Go to the location of software (database XE) and double click on .exe file and then click ‘next’ pretty much for everything to do a full default installation. You’d need to provide the password for ‘sys’ and ‘system’ user. Important to remember the password.
More details about installation can be found here. Once the installation is complete, you’ll have a database with SID=XE installed.
Open up a command prompt (cmd) or open windows powershell. and run the following command.
C:\> sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 21 11:48:25 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL>
Now we have a working XE database on windows 7.
Step 4 – Install APEX
The next step is to install APEX 5. The installation is quite simple if everything needs to be left as default.
Step 4.1 – Installing core apex (apexins.sql)
Go to the downloaded directory and run the following command.
C:\downthenet\apex_5.0.3_en\apex> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 21 11:48:25 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL>@apexins.sql sysaux sysaux temp /i/
This should run for about 20-30min. What this does is install APEX in the XE database with schema APEX_050000 and APEX_PUBLIC_USER.
Step 4.2 – copy the APEX new images
Go to the apex downloaded directory and run the following command. Please make sure to be in the correct directory.
C:\downthenet\apex_5.0.3_en\apex> sqlplus / as sysdba SQL> @apxldimg.sql C:\downthenet\apex_5.0.3_en
Step 4.3 – verify embedded PL/SQL is working
Once the core apex installation and apex images upload is complete then configure it to use embedded PL/SQL gateway
C:\downthenet\apex_5.0.3_en\apex> sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 21 12:15:15 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL> select dbms_xdb.gethttpport() from dual; DBMS_XDB.GETHTTPPORT() ---------------------- 8080
If there is no value returned then set the port as follows
SQL>exec DBMS_XDB.SETHTTPPORT(8080);
SQL>select dbms_xdb.gethttpport() from dual; DBMS_XDB.GETHTTPPORT() ---------------------- 8080
Step 4.4 – changing APEX admin password
Following step will change the password for apex_admin
C:\downthenet\apex_5.0.3_en\apex> sqlplus / as sysdba SQL> @apxchpwd
It should prompt you to enter the password twice. This would be the apex ADMIN password.
The detailed installation steps from Oracle APEX installation guide is here.
Verification
Now the database and APEX installation is done. To verify, if the APEX is working, login to the apex_admin URL. Since this is an XE installation on localhost, the default URL should be something like below:
http://localhost:8080/apex/apex_admin
Enter the apex ADMIN password. If it is successfully logged into browser then we have a new working environment for APEX development.