How to install Oracle Database 10g XE and OC4J on Ubuntu

Thursday, December 17th 2009, 22:58

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:

  1. Oracle Database 10g Express Edition
    • add Oracle’s repository to your /etc/apt/sources.list file
      echo -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
  2. 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/oc4j to 744
      chmod 744 $OC4J_HOME/bin/oc4j
    • edit the script located at $OC4J_HOME/bin/oc4j so 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_HOME with the actual folder path

    • start the server and add the credentials for the oc4jadmin user

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:

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">


CODE EXAMPLES: When you want to include source code or terminal output, please use the the following tags like in the next example:

    [language]
    code lines
    [/language]
	

where you substitute language with the programming laguage used throught the code example (for terminal output that would be bash), e.g:

    [bash]
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    [/bash]
	

To see a list of all the supported languages, please check this page.

If you want to include code bits inline, please use the code tags like in the following example:

    The <code>$USER</code> variable holds the current logged in username.
	

Secure your files

Dropbox

Recent Comments

  • Radu said:
    After you install VMware Server there is no menu entry for it. To access its interface you should open a browser tab and go to... more»
  • Radu said:
    I bought mine just a month before they launched the 3rd generation. But it’s really okay for my needs. more»
  • Radu said:
    Something must have gone wrong during the install process. Try to reinstall the drivers (after you have uninstalled them previously)... more»
  • Radu said:
    I think you should start Firefox (due to the fact that the plugin runs under it) with that custom wrapper script. more»
  • RGG said:
    As with Mai I removed vmnet, vmci and vmmon. Ran sudo vmware-config.pl and it reran the last part of the install but did not add any... more»

Recent Tweets

Geek blogs

Bear