Oracle 10g XE and OpenVZ

Posted by Double Compile on Tuesday, May 6. 2008 in Databases

Last night I tried to install Oracle 10g XE on my Debian-based database server for testing purposes. Tried is the key word here.

Interestingly enough, Oracle offers a deb repository for this purpose. Add the following line to your /etc/apt/sources.list:

deb http://oss.oracle.com/debian unstable main non-free

Then execute the following commands as root (or with sudo) to add Oracle's public signing key and then install Oracle XE:

# wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add - 
# apt-get update
# apt-get install oracle-xe

Here's the catch: my database server is an OpenVZ VPS. The Oracle installer checks for a sufficiently large swap partition and will bomb out if one of a sufficient size is not found. OpenVZ VPSs do not have a swap partition.

OpenVZ does support swap space, and that swap space can be set with barriers and limits, but the swap space is as a whole meaning that there is one swap space for the entire system, not a user-configurable swap space per-VPS.

So now comes the task of tricking the installer to think I the VPS has a swap partition, or trying to get it on there some other way.  Stay tuned for the nuttiness.

Oracle is stupid.


6 Comments for this entry

Display comments as Linear | Threaded

  • peter
    *I had exactly the same problem except I am installed xe into a centos vps. Any luck with your efforts?
  • Nicolas Parpandet
    *just put a fake free command un /usr/bin/free did the trick root@oracle:/# cat /usr/bin/free cat
  • Dun
    *I faced the same problem, I finally found a solution. I just wrote an article explaining the solution here : http://jortega74.free.fr/serendipity/index.php?/archives/34-Oracle-XE-on-OpenVZ-the-SWAP-problem-resolved.html#extended
  • Xupeng
    *Hi, have you figured out how to install oracle XE in and openvz container?
  • Edwin
    *I used a script found on the internet to make fake swap report : #!/bin/bash SWAP="${1:-2048}" NEW="$[SWAP*1024]"; TEMP="${NEW//?/ }"; OLD="${TEMP:1}0" umount /proc/meminfo 2> /dev/null sed "/^Swap\(Total|Free\):/s,$OLD,$NEW," /proc/meminfo > /etc/fake_meminfo mount --bind /etc/fake_meminfo /proc/meminfo I changed the 3rd line SWAP="${1:-2048}" with 2048 for the amount of swap as it was what oracle asked for (4G ram viewed as ram / half real half swap)
  • nish
    *did u happen to figure out a solution for this... struggling with the same.

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Pavatar, Gravatar, Identica, Twitter, Favatar, Identicon/Ycon author images supported.

Quicksearch

Search for an entry in /dev/weblog:

Did not find what you were looking for? Post a comment for an entry or contact us via email!

cronjob