Oracle Database 10g XE Installation and Configuration

Oracle logoIn this article I will write about installing the Oracle Database 10g XE on Windows and changing the default port number for HTTP and optionally for FTP. The installer does not provide any customization option and you end up with the DB server instantly up and running reserving the port 1521 (a default for Oracle database servers), including an embedded HTTP listener set to a default port of 8080 which might conflict with some existing Java application servers or servlet containers such as Tomcat, JBoss Application Server and Glassfish which use the same port by default. Although it’s easy to start and stop the Oracle database with the shortcuts pre-installed in the Start menu, its http listener remains “on” at all times with no shortcut to be turned on and off easily.

In my case I already have Tomcat and Glassfish which are set to use the 8080 port as well, so I will show you how to modify the port number of Oracle 10g XE as I go along.

About APEX or what I would normally call Oracle (Application Express) 10g XE

Oracle Database 10g Express Edition (Oracle Database XE also goes by an abbreviated code name APEX) is an entry-level, small-footprint database based on the Oracle Database 10g Release 2 code base that’s free to develop, deploy, and distribute; fast to download; and simple to administer. Oracle Database XE is a great starter database for:

  • Developers working on PHP, Java, .NET, XML, and Open Source applications
  • DBAs who need a free, starter database for training and deployment
  • Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge
  • Educational institutions and students who need a free database for their curriculum.

With Oracle Database XE, you can now develop and deploy applications with a powerful, proven, industry-leading infrastructure, and then upgrade when necessary without costly and complex migrations.

[adsenseyu1]

Installing Oracle Database 10g Express Edition

Just download the double-clickable installer (named OracleXEUniv.exe ) from Oracle’s web site whose URL at the time of this writing was: http://www.oracle.com/technetwork/database/express-edition/downloads/index.html

Alternatively from the following (fast & direct download) link:

Oracle Database 10g Express Edition for Microsoft Windows (2592) for Windows

Double-click OracleXEUniv.exe and you should see a typical InstallShield window:

Oracle Database Express Edition (XE) Installation

Start  data-recalc-dims= All Programs > Oracle Database 10g Express Edition > Go to the database Home Page” width=”408″ height=”313″ />

At some point in the installation you will be asked to provide a password as the database SYSTEM DBA. Note this down. After the installation is completed, you can connect to the web-based database control panel by selecting the shortcuts from the Start menu:

Start > All Programs > Oracle Database 10g Express Edition > Go to the database Home Page

Your default browser should pop-up a new window asking you some login credentials for arriving at the database home page.

Username: SYSTEM

Password is what you set at the time of the installation.

APEX home page

Changing the default port number of APEX (the port # 8080 of the http listener)

Now I don’t want APEX to block my Java EE application servers who need (and probably deserve) the 8080 port more. I’m quite OK with the light database server itself which is listening the port 1521.

Run SQL Command lineGo to Start > All Programs > Oracle Database 10g Express Edition > Run SQL Command Line

In the console window type the commands as shown below and in the screenshot:

SQL> -- get current status
SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;

 

HTTP-Port FTP-Port
---------- ----------
8080 0

You can change the http port and the ftp port to whatever you like (keep in mind that you need special privileges for ports < 1024 on Unix/Linux systems).

SQL> -- set http port and ftp port
SQL> begin
2 dbms_xdb.sethttpport('8888');
3 dbms_xdb.setftpport('2100');
4 end;
5 /

PL/SQL procedure successfully completed.

SQL> select dbms_xdb.gethttpport as “HTTP-Port”
, dbms_xdb.getftpport as “FTP-Port” from dual;

 

HTTP-Port FTP-Port
---------- ----------
8888 2100

Oracle SQL Command Line

In my case I’m changing the HTTP port to 8888.

There I’m also changing the FTP port to 2100 which was 0 (disabled) by default.

If you only want to use the database without allowing access via HTTP or FTP then you can disable both:

SQL> -- disable http and ftp access
SQL> begin
 2    dbms_xdb.sethttpport('0');
 3    dbms_xdb.setftpport('0');
 4  end;
 5  /

PL/SQL procedure successfully completed.

SQL> -- get current status
SQL> select dbms_xdb.gethttpport as "HTTP-Port"
            , dbms_xdb.getftpport as "FTP-Port" from dual;

HTTP-Port   FTP-Port
---------- ----------
        0          0

[adsenseyu2]

Be Sociable, Share!

6 thoughts on “Oracle Database 10g XE Installation and Configuration

  1. Thanks for sharing the info. I needed to figure out how to change apex (Oracle XE) http port number. This helped just like magic.

  2. The instructions were like a godsend as I’ve been struggling to find the conflict between Glassfish and the Oracle XE for quite some time. Thanks for the tips.

  3. A biiiiiiiig thank you from Morocco bro ,

    but how can i change acces directly from “Go to database homr page” because the port number didn’t change but i change it inside the browser to 8888 and every thing worked fine

Leave a Reply

Your email address will not be published. Required fields are marked *


*