How to install Oracle Database 10g XE and OC4J on Ubuntu
Posted on December 17th, 2009 at 22:58, in How To, Linux, Oracle, Ubuntu.
Starting to work on my diploma project my setup required that I installed Oracle 10g XE and OC4J. For a while now Oracle has started to offer *.deb packages and to host a repository for Debian-based Linux distributions, which means that they have gained the maturity to be used in enterprise environments.
The installation of both servers is painless, unless you want them on the same machine (which actually should be avoided unless you have powerful hardware). But if that’s the only way to have them, you must avoid setting the ORACLE_HOME environment variable required by OC4J because it will mess with the scripts used to start / stop the DB server. Instead create the ORACLE_HOME variable only inside the bin/oc4j script inside OC4J’s installation folder.
Keeping that as an important side note, to install those two servers follow these steps:
- Oracle Database 10g Express Edition
- add Oracle’s repository to your
/etc/apt/sources.listfileecho -e "\n# Oracle repository\ndeb http://oss.oracle.com/debian unstable main non-free | sudo tee -a /etc/apt/sources.list
- get the key for the repository
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
- update your packages information
sudo apt-get update
- install the database (I recommend using the universal package so that you get Unicode character support)
sudo apt-get install oracle-xe-universal
- configure the DB instance
sudo /etc/init.d/oracle-xe configure
- to administer the DB either use the menu entries from Applications – Oracle Database 10g Express Edition, either use the scripts from
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/config/scripts/ - if when you try to start the database you get a warning that your user is not in the
dbauser group, add yourself to the group either by using the GUI, either by runningsudo adduser your_user dba
- add Oracle’s repository to your
- OC4J
- download one of the OC4J containers from here
- extract the archive where you want to have the server installed (let’s call this
OC4J_HOME) - change the file permissions for
$OC4J_HOME/bin/oc4jto 744chmod 744 $OC4J_HOME/bin/oc4j
- edit the script located at
$OC4J_HOME/bin/oc4jso that right after the configuration section you have something like:######################################################### ########## START CONFIGURATION SECTION ################## ######################################################### ORACLE_HOME=OC4J_HOME J2EE_HOME=$ORACLE_HOME/j2ee/home
but replace
OC4J_HOMEwith the actual folder path - start the server and add the credentials for the
oc4jadminuser
If you used the default ports for both installations, you can access the OC4J EM at http://127.0.0.1:8888/em and the DB at http://127.0.0.1:8080/apex (note that APEX is not installed).
Start developing!
Similar Posts:
- How to install Oracle Application Express 3.1.2 on Oracle Database 10g XE
- How to install OpenOffice.org 3.2 on Ubuntu
- How to install VMware Server on 2.6.31 kernels
- Configuring Eclipse for J2EE development
- How to install VMware Server 2.0.x on Ubuntu 9.10 Karmic Koala



Think you've got something to say?