Ubuntu Linux Install Oracle Database XE Server

Q. How do I install Oracle Database XE Server on my Ubuntu Linux desktop system?

A. An Oracle database consists of a collection of data managed by an Oracle database management system. You can download Oracle Database XE server for Debian, Mandriva, Novell, Red Hat and Ubuntu Linux distributions. First you need to get databases up and running in order to use Oracle. The Oracle database has had a reputation among new Linux users as difficult to install on Linux systems. Now Oracle Corporation has packaged recent versions for several popular Linux distributions in an attempt to minimize installation challenges beyond the level of technical expertise required to install a database server.

Make sure you have enough disk space and memory

If you have less than 1GB memory run the following commands to create swap space:
$ sudo dd if=/dev/zero of=/swpfs1 bs=1M count=1000
$ sudo mkswap /swpfs1
$ sudo swapon /swpfs1

Debian / Ubuntu Oracle installation

First modify /etc/apt/sources.list file:
$ sudo vi /etc/apt/sources.list
Append following line:
deb http://oss.oracle.com/debian unstable main non-free
Save and close the file. Next import GPG key:
$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
Update package database:
$ sudo apt-get update
Finally install Oracle:
$ sudo apt-get install oracle-xe

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.20-15-generic linux-headers-2.6.20-15
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
The following NEW packages will be installed:
  libaio oracle-xe
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 221MB/221MB of archives.
After unpacking 405MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://oss.oracle.com unstable/non-free oracle-xe [221MB]

Post-install configuration

You must configure Oracle TCP/IP port and other parameters. Simply type the following command:
$ sudo /etc/init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
This will configure on-boot properties of Oracle Database 10g Express 
Edition.  The following questions will determine whether the database should 
be starting upon system boot, the ports it will use, and the passwords that 
will be used for database accounts.  Press  to accept the defaults. 
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]: [Enter key]

Specify a port that will be used for the database listener [1521]:[Enter key]

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of 
different passwords for each database account.  This can be done after 
initial configuration:secret
Confirm the password:secret

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to ""

To access the Database Home Page go to Open a web browser and type url (you need to use username “system” and password setup earlier)


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 41 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
41 comments… add one
  • ttk Jun 30, 2007 @ 1:30

    Nice and simple. Please note that any use of the Oracle Database Express Edition is subject to the following limitations;

    1. Express Edition is limited to a single instance on any server;

    2. Express Edition may be installed on a multiple CPU server, but may only be executed on one processor in any server;

    3. Express Edition may only be used to support up to 4GB of user data (not including Express Edition system data);

    4. Express Edition may use up to 1 GB RAM of available memory.

    So it is good for workstations and laptop and good for home user and students

  • dballester Jul 5, 2007 @ 8:53

    Oracle XE is only compiled for i386 – 32bits – and has some problems trying to install it under x86_64 machine. Some websites explain how to solve this. I wrote a entry in my blog with the extra steps to get XE running under Ubuntu AMD64. Is in Spanish, but I think that is not difficult to extract the steps even without knowing Spanish. In the same entry I put a link to another site what explains the same process in English.

    Hope can help



  • 🐧 nixCraft Jul 5, 2007 @ 12:59


    Thanks for pointing out 64 bit issue.

  • Johan Blignaut Oct 1, 2007 @ 8:51

    Thank you very much for this HOWTO. I followed it on Ubuntu server 7.04 and also on Freespire (based on Ubuntu 7.04) and it worked perfectly. Thank you for making your knowhow available.
    Johan Blignaut

  • Chad Gemeinhardt Dec 9, 2007 @ 5:10

    Thanks for the tips. This really helped.

  • lelle Feb 19, 2008 @ 23:19

    Thanks, very useful!

  • Neten Apr 18, 2008 @ 22:33

    My laptop has 512MB RAM. Is it advisable to intall Oracle Express?? If not is there any other option.??

  • Phloam May 30, 2008 @ 10:25

    # Neten Says:
    April 18th, 2008 at 10:33 pm

    My laptop has 512MB RAM. Is it advisable to intall Oracle Express?? If not is there any other option.??

    XE will run pretty badly with only 512 meg of ram, but it depends on how hard you’re going to be working it. Have you looked into MySQL / PostgreSQL?

  • Deb Platt Jul 19, 2008 @ 3:33

    Here’s what I did:
    1) added this to /etc/apt/sources.list: deb http://oss.oracle.com/debian unstable main non-free
    2) ran: wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add –
    3) ran: sudo apt-get update
    4) via the Synaptic package manager, clicked on “oracle xe”. This package was installed along with libaio.
    5) checked my applications menu and saw that oracle had appeared.
    6) ran: sudo /etc/init.d/oracle-xe configure (I changed the port for Oracle Application Express to 9090 so it wouldn’t conflict with Tomcat, which uses port 8080. I indicated that I didn’t want the database server to launch on boot. I was planning launching as needed from the applications menu).

    Now I thought that I was ready to go. So I went to the applications menu and selected start database. A terminal window popped up warning me that I wasn’t a member of the dba group. I added myself to the dba group. I restarted my computer and tried starting the database once again from the applications menu.

    This time no warning terminal came up. Basically I didn’t get any feedback as to whether the database server was actually running. So I tried accessing: I was told the browser couldn’t establish a connection with the database. I selected “run sql from the command line” from the applications menu. This didnt’ work either. The terminal window that came up began like this:
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh: 114: [[: not found
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh: 114: [[: not found

    I also checked my logs:
    Oracle Database 10g CRS Release Production Copyright 1996, 2005 Oracle. All rights reserved.
    [ OCRUTL][3067549888]u_set_comp_error: Parameter was NULL
    [ OCRUTL][3067549888]u_set_ocr_error: Parameter was NULL
    2008-07-18 22:18:24.502: [ OCROSD][3067549888]utgdv:2:ocr loc file cannot be opened
    2008-07-18 22:18:24.502: [ OCROSD][3067549888]utopen:1: Couldnt find ocr,[ocrmirror] location in config file
    [ OCRUTL][3067549888]u_set_gbl_comp_error: Parameter was NULL
    2008-07-18 22:18:24.502: [ OCRRAW][3067549888]proprinit: Could not open raw device
    2008-07-18 22:18:24.502: [ default][3067549888]a_init:7!: Backend init unsuccessful : [33]
    [ OCRUTL][3067549888]u_set_ocr_error: Parameter was NULL
    2008-07-18 22:18:24.502: [ CSSCLNT][3067549888]clsssinit: error(33 ) in OCR initialization

    Any suggestions?

  • rl Jul 24, 2008 @ 1:24

    To the last user —

    have you tried going to:


    (from the machine you installed XE on) .. i had the sane issue as you.

  • Navaneethan Jul 26, 2008 @ 6:58

    i typed the command for install oracle in ubuntu 8.04
    sudo apt-get install oracle-xe

    it shows :
    ” E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? ”

    how do i solve this??…please give instructions..

  • solution Jul 29, 2008 @ 10:41

    what you do is:
    sudo rm /var/lib/dpkg/lock

    and it should work

  • Bikram Aug 27, 2008 @ 7:07

    hi ,

    i did the same thing that u hav wrriten but ….m not able to start the database as i get the error on the screen that comes after i select APPLICATION->ORACLE 10g express edition “Operation failed. bikramjit is not a member of ‘dba’ group.”

  • bagheera Nov 2, 2008 @ 15:10

    u have to add yourself to dba gruop
    start database
    launch SQL command line
    type: connect / as sysdba
    then type: exec dbms_xdb.sethttpport(8181);

    and finally try:

    and u should be able to use web interface

  • nes k Dec 6, 2008 @ 19:16

    I typed the info you posted and got this mess: PL/SQL procedure successfully completed. finally tried still getting the error

  • rizki Mar 4, 2009 @ 8:50

    Thank you very much, this really helps !
    I was thinking to download and install manually, especially I remembered that so many system parameters need to be adjusted for accomodating oracle like SHMMAX etc

  • OPLA Apr 2, 2009 @ 6:36

    +1 to karma !!!
    Thank you very, very, very, very, very much!

  • Pragaištis Sep 11, 2009 @ 18:40

    thanks for the howto!

  • Keiichi Sep 25, 2009 @ 0:10

    I had the same issue in my ubuntu, it only worked the first time but later on reboot it stoped working, is there a formal way to start the Oracle services? start database from menu doesn’t seems to work at all

  • Vermer Nov 12, 2009 @ 10:47

    Hello i have q how to remove oracle-xe from autostart?

  • Nicolas Raoul Jan 8, 2010 @ 2:33

    Thanks a lot!
    Very straightforward on Ubuntu Karmic, I am able to use the database immediately after this.
    And it saves me from registering on the Oracle website!
    We might even get updates :-)

  • Amir Feb 5, 2010 @ 22:51

    I just installed the Ubuntu 9.10 and then installed Oracle 10 Express and all went fine. I can access oracle on address however when I try to access the server on it’s external ip address ( even when I’m on my Ubuntu machine it’s failing.
    I’m new to Linux so I’m sure this should be silly and simple issue but I can’t find a way around it. I need this so I can access the oracle server from outside world (other nodes on the network)
    Any help is appreciated.


  • ElPajaroNegro Mar 19, 2010 @ 8:25

    ORACLE XE + Ubuntu best development environment ever, not for everyone but if you master it, it rocks.

  • michsred May 1, 2010 @ 15:03

    Hi folks!

    Does anyone know if there is an Oracle XE version for 64-bit Ubuntu? I noticed that the repository “deb http://oss.oracle.com/debian unstable main non-free” doesn’t work on 64-bit Ubuntu.

  • Ian Aug 25, 2010 @ 0:28

    I installed on Lucid and one thing I have to do which I can’t find mentioned in any how-to’s or tutorials is to be logged in as “oracle” which is created during the install. If I want to connect through terminal I have to first do “su oracle”. Otherwise the normal “sqlplus sys as sysdba” doesn’t work. Even after adding my user to the dba group I still have to be logged in as “oracle” to use sqlplus.

    Is this something new in the Lucid install? Is there a way to make it where my user account can log into it without “su oracle”?

    Thanks anyone who answers this.

  • Paul Sep 9, 2010 @ 13:27

    Awesome – thanks for the instructions

  • Digish Sep 29, 2010 @ 6:31

    Thanks a lot for simple and clear steps

  • jayadi Oct 15, 2010 @ 6:26

    thanks for your howto.. it really helps

  • Animesh Singh Oct 20, 2010 @ 9:21

    thanks very much…………..

  • Johnny Jan 23, 2011 @ 17:46

    Thx a lot. 2 1/2 years before and this run well.

  • vimo Apr 16, 2011 @ 14:30

    Dear all,
    Thank you very much for the nice guide. Can anyone please advice me as to how i should go about accessing the oracle-xe db that I just installed on my ubuntu 10.04 notebook via sqlplus? I have successfully installed the “oracle-xe 10g server” and client” and I can access the admin page from the browser. (

    However when I try to say sqlplus on the shell it gives me this:
    “error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory”

    I have set the paths and variables right Im sure, but I just cant connect with sqlpolus.

    Please help gentlemen I know nothing about oracle.

  • Derek Stewart May 14, 2011 @ 12:14

    I followed the instructions and Oracle-XE installed Ubuntu 11.04 okay.

    Typing in the url:

    brought me to the Oracle XE home page and I could logon to the system fine.

    Thank you for a simple solution.


  • Arun Sharma Jun 3, 2011 @ 10:14

    Thanks a lot. I have installed oracle xe server. but I was not getting to configure.
    Your Q. Answer helped me to configure oracle server on my Ubuntu 11.04 LTS.
    deb http://oss.oracle.com/debian unstable main non-free this string I directly edit thru synaptical package manager.

    I was getting swap space problem which I resolved through gparted application.

    Thank once again.

    • Luis Jul 27, 2011 @ 9:27

      Thanks, thanks, thanks!!!

      Simply genial!

      Best regards,


  • vanthang Jul 28, 2011 @ 9:27

    I am sorry, i using English verry bad.

    I install oracle 10g in ubuntu server 10.10( I istall ubuntu server 10.10 and then install oracle 10g and desktop-ubuntu). In ubuntu, i access oracle OK.
    but, i can not connected from PLSSQL Developer(PC windows). The PC windows and ubuntu server are the same LAN. my PC windows can acess oracle 10g in redHat 5, I edit tnsnames.ora for connecting oracle 10g in ubuntu. its not OK

    • Luis Aug 9, 2011 @ 9:44

      Hi Vanthang,

      It seems that you have problems with your tnsnames.ora. I would suggested you try with sqldeveloper first, and if it works try to translate your connection parameters to your tnsnames.ora.

      Hope it helps,


  • Gcina Aug 17, 2011 @ 12:04

    Amazingly simple and straight forward. Followed it on Ubuntu 11.04, and I got no problems. Its just great!

  • saikiran Nov 25, 2011 @ 12:57

    i hav a problem. i instal oracle in ubuntu, when i tried to connect in sql prompt, it is showinthis,

    SQL> conn system
    Enter password:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory

    can any one say what to do..

  • luvsansharav Dec 9, 2011 @ 15:04

    thanks a lot

  • obells Apr 11, 2012 @ 17:29

    need to install an oracle 11g server and administer a single database for a multi-dimensional business outfit.
    don’t know how to get around that?

  • obells Apr 11, 2012 @ 19:25

    i need to install an oracle database 11g server and administer a database for a multi-dimensional business outfit.
    i don’t really know how to get around that?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum