Sunday, May 22, 2011

Installing Oracle XE 11.2 (including APEX 4.0.2 ) on OpenSuSE 11.4

Screenshot HOWTO to install the latest Oracle Database 11g Express Edition 11.2 (which is still in beta) on a clean OpenSuSE 11.4 x86-64.
Oracle Application Express (APEX) 4.0.2 is included in this release.
We will use a VMware virtual machine using VMware Player 3.1.4 so that afterwards you actually have a virtual appliance running XE.

You will need the following components (All of them are FREE but you might need to create a free account before downloading)
VMware Player 3.1.4:
OpenSuSE 11.4 x86-64 DVD:
Oracle XE 11.2:
orarun package:

Also important, the complete documentation:

Oracle BETA documentation here...

In this documentation you will find the following :

Table 1 Oracle Database XE Requirements
Operating system
One of the following:
  • Oracle Enterprise Linux 4 Update 7
  • Oracle Enterprise Linux 5 Update 2
  • Red Hat Enterprise Linux 4 Update 7
  • Red Hat Enterprise Linux 5 Update 2
  • SUSE Linux Enterprise Server 10 SP2
  • SUSE Linux Enterprise Server 11

Further down we get some more details...
256 megabytes minimum, 512 megabytes recommended
Disk space
1.5 gigabyte minimum
  • glibc should be greater than or equal to 2.3.4-2.41
  • make should be greater than or equal to 3.80
  • binutils should be greater than or equal to
  • gcc should be greater than or equal to 4.1.2
  • libaio should be greater than or equal to 0.3.104
2.1.2 Swap Space Requirements
Minimum swap space required for Oracle Database XE is 2 GB or twice the size of RAM, whichever is lesser.

Now we have enough information to go ahead...

  • Create a new virtual machine using VMware Player, just follow these first screenshots
  • Press the "Customize Hardware" button and change the memory configuration to 1024mb

  • Press "Finish" to create the machine and start it, when you see the boot screen, choose "Installation"
  • For Oracle, UTC time is very important, even more so in RAC setup. 

  • The default disk setup has to change because you need more swap space. Otherwise the installer will fail. So choose "Edit Partition Setup" 

  • We will only keep 2 partitions (swap and root)

  • So delete the last partition

  • Also delete the second partition (we will recreate it)

  • And now resize the first partition to 2GB and keep it as swap

  • Now create a new primary partition for the root (/) mountpoint

  • Ext4 will do. You will find many more information online regarding file systems and Oracle Databases but for this "simple" setup Ext4 is fine.

  • Your partition setup should look like this...

  • Create a new user and do not forget the password. Also use it for "system administrator" e.g. "root"

  • Press the "install" button.

  • Press the "install" button again.

  • Wait for it... 

  • Disregard the following message because VMware Player will take care of this for you.

  • Automatic configuration will handle all software and hardware configurations...

  • Logon using the created account.

  • Let us change the resolution to a little bit bigger.. The VMware tools are already installed during the OpenSuSE installation.

  • 1024x768 should be enough for everyone ;-)

  • Now go to "YaST" and start the software updates.

  • Choose the "Online Update"

  • Press "Apply"

  • And wait for it ..

  • Do not reboot yet but go to the "Firewall" module

  • And disable it to keep things a little more simple (but less secure, I know) and reboot the machine...

  • Edit: You will also need to install the "bc" package to enable trouble-free installation. (Do this using YaST) Thank you petr vanek

  • So... the basic installation is finished and we are now ready to install the other packages, beginning with Oracle XE.
    It is compressed so you will need to extract it first.

  • Double-click on the RPM file and choose "install"

  • Click "Continue" and wait for the installation to finish.

  • Now, double-click on the orarun RPM and choose "install"

  • The package management will show some additional dependencies. That is the main reason why I use orarun package so that all of the dependencies are installed in one shot.

  • Now reboot..

  • Keep using the same user, even though you will see an additional "oracle" user. This one is created during the orarun installation but you can ignore it for now. It is necessary when you are installing a full Oracle RDBMS Standard or Enterprise.

  • Now open a terminal and let's configure oracle-xe
$> su -
$> /etc/init.d/oracle-xe configure 
  • Just accept all the defaults by pressing enter and enter a password when requested...

  • Let's check if the Oracle database is started.
$> ps -ef | grep pmon

  • Now we only need to setup the profile for our normal user. Oracle has created a settings script that you need to add to your bash profile so it get executed every time you login.
    Open a terminal (not root, just the normal apex user) and edit your .bashrc file. 
$> vi $HOME/.bashrc

  • At the end of the file, add the following line: 
. /u01/app/oracle/product/11.2.0/xe/bin/

  • Save, and reboot the machine.

  • In the "Application Browser" you will see several new items that will help you getting started.
    Open the "Get Started" application 

  • It will open your browser and point you to the local Oracle web server. Just click on APEX and create a new user.

  • Now click on "Click here", just above "storage"

  • Login.

  • And change your password

  • Welcome to APEX....

The installation itself is not very difficult and Oracle has done a good job to make it work on other Linux distributions than their own.
By creating menu shortcuts to backup and restore your database, novice users can perform otherwise complicated tasks.
They still need to cleanup some files in the installer that are leftovers from Standard or Enterprise installs but in the end you are better off with too much files then too little...

Oracle is winning RAD races with APEX and many people think it can hold up against .NET and Ruby on Rails. Since I am not a full-time developer I cannot elaborate on this...

What I do know is that the Oracle Database is very good, robust and expensive... This free XE edition will not have all the features of a "Standard" edition or a RAC option but it will do very well for small to medium sized deployments.

Have fun!


  1. a small note. The "bc" package is mandatory to install 11xe from rpm...

  2. Thanks, I added it to the howto.

  3. Dont work!
    btw, apex is not oracle database express edition. one is database and one is application development tool!