How to install Oracle 11XE Beta on Ubuntu 10.04 x64

DevOps | Cloud Day '22 powered by ByteSource

How to install Oracle 11XE Beta on Ubuntu 10.04 x64

Margarita PenevBusiness Development Managerin - Margarita Penev

Margarita Penev

15 Minuten zum Lesen

I have just seen that the new 11G XE beta is out for Windows and Linux x64 and decided to try it out. You can download it at

Unfortunately there is just an RPM and no DEB file. Here is the way how I achieve to run it on my Ubuntu 10.04 LTS x64.

Create a .deb out of the RPM

I used alien for the conversion, the resulting .deb is not a perfect one but it is a good start:

sudo apt-get install alien
sudo alien -d --scripts oracle-xe-11.2.0-0.5.x86_64.rpm


Now I tried to install it but I got an error from /var/lib/dpkg/info/oracle-xe.postinst that /sbin/chkconfig does not exist. As I don’t want to have Oracle started automatically on my laptop anyway I have just commented out the whole section of the script:```bash

if [ -f /etc/SuSE-release ]
        /usr/lib/lsb/install_initd oracle-xe > /dev/null 2>&1
        /sbin/insserv oracle-xe > /dev/null 2>&1
        /sbin/SuSEconfig > /dev/null 2>&1
#        /sbin/chkconfig --add oracle-xe

then I ran the script again and it went fine:

# sudo /var/lib/dpkg/info/oracle-xe.postinst
Executing post-install steps...

You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

Additional dependencies

Before doing the configuration I had to install the following dependency (which was not installed by apt-get)

sudo apt-get install libaio1

Sanity checks

Before you proceed I would advice to make some sanity checks and see if the installation was successful

Oracle user and group

grep oracle /etc/passwd
grep dba /etc/group

If you don’t see the oracle user or/and the group dba, something went wrong and I would deinstall the package, remove /u01 (sudo rm -rf /u01), create them manually and start the installation again

Check if the placeholder in the init.ora file are correctly replaced

# grep sga /u01/app/oracle/product/11.2.0/xe/config/scripts/init*

If you see real numbers there then everything is OK, if you see %sga_target% instead of the numbers then the step with executing /var/lib/dpkg/info/oracle-xe.postinst was not ok

Check the owner and permissions

# ls -latr /u01/app/oracle/product/11.2.0/xe/bin/oracle
-rwsr-s--x 1 oracle dba 178499800 2011-03-23 07:05 /u01/app/oracle/product/11.2.0/xe/bin/oracle

If the owner is not oracle:dba then probably the user and the group were not created correctly so I would create them manually, remove the installation and the files and reinstall again (see further how to create the user and the group

Configure the database


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

It will ask you for a password, ports for the listener and for the APEX server, you can accept the defaults. After some time it will say that everything is fine.

(Optional) Create the oracle user and dba group manually

Create the dba group and oracle user:

sudo /usr/sbin/groupadd dba

 sudo /usr/sbin/useradd -M -g dba -d /u01/app/oracle -s /bin/bash oracle

Create a profile for the oracle user (vi/u01/app/oracle/.bash_profile and put the following settings)

alias vi='vim'
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe
export ORACLE_TERM=xterm
export _EDITOR=vim
export NLS_LANG=american_america.utf8
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

Verify the database

Login with the user oracle and run some select statement

sudo su - oracle
sqlplus / as sysdba

select count(1) from all_objects;

If everything is fine you should get around 17901 objects.

Now you can try APEX too: goto http://localhost:8080/apex (if you have accepted the default port during the installation)


Thanks to the feedback in the comments, it seems that there is a short cut to install chkconfig before you try to install the .deb package.

So here is the short sequence (copied from Kamran’s comment):

$sudo apt-get install alien libaio1 chkconfig
sudo alien -d --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
sudo dpkg -i oracle-xe-11.2.0-0.5.x86_64.rpm
sudo /etc/init.d/oracle-xe configure

if you don’t like to have the oracle-xe started automatically on every boot, you have to disable it:

sudo /sbin/chkconfig oracle-xe off
Contact us

Cookies erleichtern die Bereitstellung unserer Dienste. Mit der Nutzung unserer Dienste erklären Sie sich damit einverstanden, dass wir Cookies verwenden.