Darkbeom's beautiful mind

긍정적인 사고를 갖자!

2008/05/14 16:46

Ubuntu Oracle Database 10g Ex Install Unix & Linux

Oracle Database 10g Express Edition in Linux

I’mgoing to skip the introduction into who Oracle are and what are they’rein my blog. It happens so that I had a seriously struggle with theirproducts during the week. One of these products is Oracle Database 10g Express Edition.The label “Express Edition” stands for a group of products aimed atdevelopment and educational work. This package includes a fullyfunctional database. Because of the goals this edition has the softwarehas the following limitations (there’s a good article about that on this address):

  • the server cannot address more than 1Gb of memory;
  • the server can work on a single CPU only;
  • the server runs at most one database per computer (not schema !);
  • the server is limited to 4Gb disk usage;

In a matter of fact, these limitations are not that fatal in themost of the cases.. especially when talking about low-load webapplications. These are some of the reasons I had to work with thatthing despite my antipathy towards Oracle in general. So, that’s itwith the usual bla-bla. I’m going on briefly and step-by-step just likein my notes on the installation:

  1. downloading the packages:

    FOR DEBIAN ON AMD64: Oracle release their ExpressEdition database for 32-bit architecture only. That’s why apt-get can’thandle the cases when amd64 is the primary architecture of theoperating system. Because of this the download and the installation ofthe packages should be done manually. Furthermore, the 32-bit glibc6libraries (the libc-i386 package) should be downloaded, as 32-bitapplication apparently cannot link to (these?) 64-bit libraries andvice versa.

    FOR RPM-BASED DISTRIBUTIONS: Probably there shouldbe libaio installed. I’m not quite sure about that but I don’t havesuch a system. I’d be glad if someone who has suffered this share hisexperience.

    • for DEB-based distibutions w/ apt-get:
      • the following line should be added to /etc/apt/sources.list:

        deb http://oss.oracle.com/debian/ unstable main non-free

      • the following command should be executed:

        apt-get -d libaio oracle-xe

    • for DEB-based distributions w/o apt-get:
      • the libaio package should be download from here;
      • the oracle-xe package should be downloaded from there;
    • for RPM-based distributions:
      • the oracle-xe rpm-package should be downloaded from this addres;
  2. server installation:
    • for DEB-based distributions w/ apt-get:

      apt-get install oracle-xe

    • for DEB-based distributions w/o apt-get:

      dpkg -i libaio_0.3.104-1_i386.deb
      dpkg -i oracle-xe_10.2.0.1-1.1_i386.deb

    • for DEB-based distributions on AMD64:

      apt-get install libc6-i386
      dpkg -i –force-architecture libaio_0.3.104-1_i386.deb
      dpkg -i –force-architecture oracle-xe_10.2.0.1-1.1_i386.deb

    • for RPM-based distributions:

      rpm -ivh oracle-xe-

    NOTE: Ilias brought to my attention in the commentsbelow that a problem exists with the listener unable to run on somedistributions (RHEL 4, Ubuntu AMD64 and probably more) due to wrongpermissions of the /var/tmp/.oracle (and/or /tmp/oracle) directory. You can take a look at this address for more information. There’re two ways to workaround this problem:

    1. change the user and group of the directory to “oracle” and “dba” respectively:

      chown oracle:dba /var/tmp/.oracle /tmp/.oracle

    2. leave the directory owned by root but change its permissions to 1777 (as it is in Debian):

      chmod 1777 /var/tmp/.oracle /tmp/.oracle

    You’ll also probably have to restart the listener:

    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl stop
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl start

  3. initial configuration of the server:Configuration is nowindependent of the distribution. Before finishing this operation theserver will not be functional . When it starts, it will open two TCPports - one for the extremely pleasant web administration (ApplicationExpress) and another one for communication with the server itself(Database Listener). It’s worth mentioning that, although DatabaseListener listens on all IP addresses, Application Express binds to127.0.0.1 only, which makes it a bit unhandy if the database isinstalled on a remote machine. I found out this can be changed on alater stage using the web administration itself but, until then, Iinstalled a small proggy called “redir” (the Debian package has thesame name) which I used to redirect all requests to port 8080 of mypublic IP to After doing its job it can be easily stopped inorder to keep the system secure.
    1. the following command is executed:

      /etc/init.d/oracle-xe configure

    2. a port for Application Express should be selected (it’s 8080 usually);
    3. a port for Database Listener should be selected (by default 1521);
    4. a password for the system users should be picked;
    5. follows an answer to the question wheter or not the database server should be started on boot;
    6. at this point the server is up-and-ready;
    7. it’s a good idea to have the needed environment variables available to Oracle clients. A good choice is to write them down in /etc/profile:

      export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

      or you can simply add the following line:

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

    8. it’s also a good idea to put the path to the Oracle libraries in /etc/ld.so.conf in case additional software links to them:

      echo ‘/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib’ >> /etc/ld.so.conf

  4. administration of Oracle Database 10g Express Edition:Once installed the server can be managed with a number of tools:
    • with the cute Application Express which is by default available on the following addres:

      Remote access can be enabled with entering the SQL*Plus console as sysdba and typing:


    • with the standard console tool SQL*Plus, which is usually located at:



댓글 입력 영역