Technobabble
Grokking Technology

Oracle XE on SuSE

Today it became necessary to deploy Oracle XE on a new SuSE system. This did not seem a big deal; we had already deployed a version of Oracle 10g XE on SuSE 10.2 quite a while back and as far as I remembered it was a simple rpm deployment. This time the XE was the same but we were deploying on OpenSuse 11.2.

Everything seemed to install fine, but darned if Oracle would not come up at all with no errors logged anywhere to give us a clue. We paused to wonder; perhaps the versions of glibc and libaio (stated as requirements) were too new - should we revert to something older? As it happens we had to deploy Tomcat v6 with Java v1.6+ and our normal alternative - Centos/RedHat - had only prior versions of these. So it was either go back to RHEL v5 - requiring an upgrade to Java/Tomcat - or figure out what was wrong and get the SuSE system working.

It was Friday; plan B won - but it took us quite a while to figure out what was going wrong!

The Problem

First off we downloaded the 10.2.0.1 XE rpm version from Oracle’s website then installed it using the rpm command

rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm

It did complain a bit but these were warning messages because the startup script in /etc/init.d was missing a few presets expected by SuSE system configuration. blacktav:/srv/ftp/Oracle

blacktav:/srv/ftp/Oracle # rpm -ihv oracle-xe-univ-10.2.0.1-1.0.i386.rpm Preparing...
########################################### [100%] 1:oracle-xe-univ
########################################### [100%] Executing Post-install steps...
insserv: warning: script 'oracle-xe' missing LSB tags and overrides insserv: Default-Start
undefined, assuming default start runlevel(s) for script `oracle-xe' oracle-xe 0:off 1:off
2:off 3:on 4:off 5:on 6:off You must run '/etc/init.d/oracle-xe configure' as the root
user to configure the database.

These extras were not needed as the service was configured to start-up correctly and the LSB component is just documentation to describe the product. All seemed good.

For convenience at this point we added entries in /etc/ld.so.conf.d (oracle.conf) to add the Oracle libraries and in /etc/profile.d (oracle.sh) to add Oracle binaries to our path and a few convenience variables for Oralcle such as ORACLE_HOME and the likes. These steps are also detailed in the Oracle Installation Guide. And so to the final step, doing the configuration step with /etc/init.d/oracle-xe configure

This step should initialise our database file and actually launch both the SQL engine and Oracle’s management webtool servers. We were expecting to use this in the wild, wild Interweb so we decided to provide a difficult password for the system users; we accepted defaults for the other values. This interaction creates a file in /etc/sysadmin (oraclexe.conf) which is a reference for configuration information by the startup script. This seemed to complete without error but something was not right; neither the engine nor the admin web application were running. All Oracle had said was:

Starting *Oracle Database 10g Express Edition Instance...Done
Installation Completed  Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"

Oracle had not installed itself at all - there was no oradata/XE tree, nor other folders which the various conf/scripts should have created. It took us quite a while to figure this one out; what seems to have gone wrong was that the oracle user account had been created with a password. When we assigned a password during the interaction, this password was used to initiate an su session when the database was actually configured by the oracle user. Because the passwords were now different, su could not work and the script did not have sufficient privileges to create the folders required. There were other issues around simply running sqlplus; depending on our trial: libaio was missing, the binary was not in the path or ORACLE_HOME was not set.

Solution

Anyway we eventually figured it out. This is what we should have done:

now you can finish off with /etc/init.d/oracle-xe configure; accept the defaults and when prompted for a password use “oracle”; your system should pause displaying Configuring Database… after a few minutes it should finish and you should have a working Oracle instance which you can check by going to http://127.0.0.1:8080/apex. If you have started an installation and reached a point where it has failed like above; it should be possible to remove oraclexe.conf from /etc/sysconfig and try again from step 3.

Summary

There are essentially two steps to be completed: install from rpm and configure the application. In order for the configuration step to succeed you need to ensure:

For whatever reason, neither of these are satisfied by the tools or the process documented by Oracle Security Alert: once installed, remember to change the oracle user password to something more secure: the default is obviously widely known.


Page created on Sat 30 Jan 2021 by Andy Ferguson