Howto: Install Oracle Database XE 10g on RHEL4

  • OS
  • RHEL4 Update 5 32bit
  • Kernel
  • 2.6.9-67.0.20.0.2.ELsmp
  • Database
  • Oracle Database 10g Release 2 (10.2.0.1) Express Edition (Universal)

This (quick-)installation guide is just an abstract of the Oracle© Database Express Edition Installation Guide 10g Release 2 (10.2) for Linux.

For the following steps you need to “root“!

  1. Create user and groups

    We will now create a user “oracle” for later use as database administrator.
    Create groups:

    # groupadd oinstall
    # groupadd dba
    # groupadd oper

    Create OS user “oracle” with group permissions and home “/home/oracle”:

    # useradd -g oinstall -G dba,oper -d /home/oracle oracle

    Set password for user oracle:

    # passwd oracle

  2. Server Component Kernel Parameter Requirements

    The Oracle Database XE installation checks your system for the following kernel parameter settings. If the kernel parameters of your system are less than the values needed, then the installation will modify the kernel parameters.
    To prevent mismatches you can edit “/etc/sysctl.conf” and add the following parameter settings:

    kernel.shmall = 2097152
    kernel.shmmax = 536870912
    kernel.shmmni = 4096
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    

    Save and exit.
    Now run the following command to change the current kernel parameters:

    # /sbin/sysctl -p

  3. Install required packages

    # yum install glibc libaio

  4. Download Oracle Database XE 10.2.0.1

    Download Oracle XE from here: Oracle Database 10g Release 2 (10.2.0.1) Express Edition for Linux x86.
    If you downloaded the oracle-xe-univ-10.2.0.1-1.0.i386.rpm executable, you would enter this command:

    # rpm -ivh downloads/oracle-xe-univ-10.2.0.1-1.0.i386.rpm

  5. When prompted, run the following command:

    # /etc/init.d/oracle-xe configure

    For this howto keep the defaults for HTTP and listener port. Just set your SYS password and decide whether you want the database to start automatically when the computer starts. If you enter Yes, then the database starts immediately
    If you need to change the configuration settings, then you can do so by running “oracle-xe configure” again.

  6. Setting the Oracle Database XE Server Environment Variables

    Performing this step, you may run into an error regarding “nls_lang.sh”. If so, correct he error as described here and redo this step.
    Ok. Now set the environment variables by running this script:

    # /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

    To add this environment variables permanently go to the home directory for user “oracle” and edit the “.bash_profile. Add the following lins at the end:

    . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
    
  7. Reboot

    Now to make sure the shortcuts will appear in the menu for “oracle” perform a reboot (maybe restarting the x-server will also suffice). Regard stopping the database first, if still running.

  8. Start / stop databse

    To start / stop the database manually, run this commands:

    # /etc/init.d/oracle-xe start
    # /etc/init.d/oracle-xe stop

    This only works for the “root” user. Logged in as normal “oracle” user you’ll have shortcuts in the menu or try these scripts:

    $ $ORALCE_HOME/config/scripts/startdb.sh
    $ $ORALCE_HOME/config/scripts/startdb.sh

  9. Relogin as user “oracle

    Now you should see the menu shortcuts for Oracle XE.

    To adminstrate the database open your browser (I recommend using firefox) and go to: “127.0.0.1:8080/apex“.
    If you’re not able to open this url, then check you browser network settings. Prevent “127.0.0.1″ from using a proxy setting the “No proxy for:”-parameter in the network settings.

Done.

For further details read the Oracle© Database Express Edition Installation Guide 10g Release 2 (10.2) for Linux.