Difference between revisions of "Oracle9i in SLES9 container"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(categorized; minor fixes)
m (Robot: Automated text replacement (-VEID +CTID))
Line 13: Line 13:
  
 
Create VE based on latest SLES9 x8664 template:
 
Create VE based on latest SLES9 x8664 template:
  vzctl create $VEID --ostemplate sles-9-x86_64
+
  vzctl create $CTID --ostemplate sles-9-x86_64
  
 
Assign some IP address to the VE:
 
Assign some IP address to the VE:
  vzctl set $VEID --ipadd $VE_IP_ADDRESS --save
+
  vzctl set $CTID --ipadd $VE_IP_ADDRESS --save
  
 
Setup nameserver inside VE (/etc/resolv.conf):
 
Setup nameserver inside VE (/etc/resolv.conf):
  vzctl set $VEID --nameserver $DNS_IP
+
  vzctl set $CTID --nameserver $DNS_IP
  
 
Set enough resource limits inside VE (in this example ~2GB RAM):
 
Set enough resource limits inside VE (in this example ~2GB RAM):
  vzctl set $VEID --save --applyconfig vps.2048MB
+
  vzctl set $CTID --save --applyconfig vps.2048MB
  
 
Set enough disk space for the VE (e.g. to 15GB):
 
Set enough disk space for the VE (e.g. to 15GB):
  vzctl set $VEID --save --diskspace 15000000
+
  vzctl set $CTID --save --diskspace 15000000
  
 
== Inside VE ==
 
== Inside VE ==

Revision as of 09:42, 11 March 2008

This small HOWTO is to help people to install Oracle 9i in SLES9-SP2 VE. Installation of Oracle is quite a complicated procedure and actually has little to do anything with VE or OpenVZ virtualization, but is frequently asked about.

Installation of other Oracle versions in other VE OS can differ and should be decribed in separate Wiki pages.

Inside host system (VE0)

First, create and cache SLES9 x8664. You will need to install gcc, binutils and other packages required by Oracle either in SLES9 cache or alter directly inside the VE.

Create VE based on latest SLES9 x8664 template:

vzctl create $CTID --ostemplate sles-9-x86_64

Assign some IP address to the VE:

vzctl set $CTID --ipadd $VE_IP_ADDRESS --save

Setup nameserver inside VE (/etc/resolv.conf):

vzctl set $CTID --nameserver $DNS_IP

Set enough resource limits inside VE (in this example ~2GB RAM):

vzctl set $CTID --save --applyconfig vps.2048MB

Set enough disk space for the VE (e.g. to 15GB):

vzctl set $CTID --save --diskspace 15000000

Inside VE

All the following instructions are not OpenVZ/Virtuozzo specific and mostly taken as is from the official SUSE guide


Login to VE and do the following:

Run yast and setup SLES9 repository or SLES9 CDs local repository, then install following packages:

 - glibc-devel-32bit
 - pdksh
 - libaio
 - libaio-devel

Now install "orarun" package from SLES9 SP2 CD2. You can use YaST setup tool or manual installation instruction to install orarun package.

After orarun package is installed enable 'oracle' user:

usermod -s /bin/bash oracle

Specify password for 'oracle' user

passwd oracle

Run rcoracle script to set kernel parameters. Ignore any errors.

/usr/sbin/rcoracle start

Create link for libdb library:

ln -s /usr/lib/libdb.so.3 /usr/lib/libdb.so.2

Setup graphical access to VE via ssh or via vnc, at your choice:

  • For access via ssh:
    • Change X11Forwarding in /etc/ssh/sshd_config to 'yes' inside VE
    • Restart sshd inside VE (/etc/init.d/sshd restart)
    • Login to VE via ssh with '-X' option (run this command from your host):
ssh -X oracle@$VE_ADDRESS
  • For access via VNC, do inside VE:
    • Install XFree86, XFree86-Vnc packages inside VE
    • Login to VE as 'oracle' (run this command from your host):
ssh oracle@$VE_ADDRESS
    • start VNC server:
Xvnc :0 &
    • set DISPLAY environment variable:
export DISPLAY=:0
    • From your host attach to vnc screen (run this command from your host):
vncviewer $VE_ADDRESS:0
NOTE: this may require to use vncviewer from SLES9 OS, since newer vncviewer's are not compatible with it.

Now, as 'oracle' user inside VE:

Get Oracle 9iR2 (9204) Software from oracle web or use your Oracle Disks. If you have downloaded SW then gunzip and cpio files.

gunzip $file_name
cpio command: cpio -idmv < file_name

It will create three directory Disk1, Disk2 and Disk3.

Finally start oracle installer (under oracle user):

Disk1/runInstaller

and carefully follow installation instructions.

After the installation succeeds oracle automaticaly runs a created by default database instance, so you can use sqlplus to test it.


NOTE: Oracle 9i installation on SLES9 is tricky and requires a lot of steps and workarounds described in official papers and in the internet. The following links may be helpful.

External links