How to install Oracle Database 10g XE and OC4J on 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/
sudo 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!
You might also like:
Leave a comment
Recent Posts
Projects that I support
Recent Comments
nope said:
yeah that was my first thought too, but: mount: warning: seems to be mounted read-write. too bad, would have been just perfect. more»Klaus Deiss said:
Dear Radu, I tried it on Ubuntu 10.0.4.2 and 10.0.4.3 with different kernel versions (amd64 server 2.6.32 kernel). No... more»scompo said:
Nope.. Now it’s not working again.. This printer it’s a real pain in the butt.. The other hp printer I had... more»Dmitrij said:
Thank you Peter and Patrice. Could you please post the updated script? more»hd_flash_pains said:
didn’t work for me more»







