There are many, many links, threads, bugs and discussions related to this since oracle 11g installation is no longer breeze at it was the case with oracle 10g, at least on Ubuntu. This is my short, minimal list of things to do to have oracle running.
0. backup, backup your databases with expdp. Warn: move the dumps to a safe location since the apt-get remove –purge could delete them.
1. download the package
2. unzip it
3. convert it to a deb and install it
cd Disk1 alien --scripts oracle-xe-11.2.0-1.0.x86_64.rpm apt-get remove --purge oracle-xe-universal #remove 10g if needed dpkg -i oracle-xe_11.2.0-2_amd64.deb
Note: the dpkg will notify you of the libaio dependency.
4. until now everything is simple, now the trouble begins. The main oracle problem is with the missing /dev/shm which, in 12.04 is a link to /run/shm. Fix this:
<strong><span style="color: #800000;">rm /dev/shm mkdir /dev/shm mount -t tmpfs shmfs -o size=2048m /dev/shm</span></strong> ln -s /usr/bin/awk /bin/awk #small fix to eliminate some errors sysctl kernel.shmmax=1073741824 #also edit /etc/sysctl.conf and set the same value to persist the change It might also be necessary to create <strong><span style="color: #800000;">/var/lock/subsys</span></strong> if it does not exist (created by another package).
5. run the configure
There will be some errors but the process will succeed finally.
Thats it. Oracle will now run and no more:
ORA-27101: shared memory realm does not exist
Before restarting the machine add the /dev/shm related lines from point 4 to /etc/init.d/oracle-xe in the start function somewhere around line 555.
6. If you are used to apex and don’t know what an workspace is you first need to access: http://localhost:9090/apex/apex_admin and use admin/[password provided to configure script] to login
7. Env vars for oracle are:
export ORACLE_SID=XE export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe<span style="color: #800000;"><strong>/ #you should know already that the last / is very important</strong></span> export PATH=$PATH:$ORACLE_HOME/bin
8. If you get an:
UDI-01034: operation generated ORACLE error 1034 ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory UDI-00003: all allowable logon attempts failed
for impdb note that this is due to the fact that impdp no longer uses the ORACLE_SID variable. To fix just use for instance:
… instead of
impdp system/blabla ...