Difference between revisions of "Oracle9i in SLES9 container"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(categorized; minor fixes)
m (VE -> container, CT)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This small HOWTO is to help people to install Oracle 9i in SLES9-SP2 VE.
+
This small HOWTO is to help people to install Oracle 9i in SLES9-SP2 container.
 
Installation of Oracle is quite a complicated procedure and actually has little
 
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.
+
to do anything with container or OpenVZ virtualization, but is frequently
 +
asked about.
  
Installation of other Oracle versions in other VE OS can differ and should be decribed
+
Installation of other Oracle versions in other container OS can differ and
in separate Wiki pages.
+
should be decribed in separate Wiki pages.
  
== Inside host system (VE0) ==
+
== Inside host system (CT0) ==
  
 
First, create and cache SLES9 x8664.
 
First, create and cache SLES9 x8664.
 
You will need to install gcc, binutils and other packages required by Oracle
 
You will need to install gcc, binutils and other packages required by Oracle
either in SLES9 cache or alter directly inside the VE.
+
either in SLES9 cache or alter directly inside the container.
  
Create VE based on latest SLES9 x8664 template:
+
Create a container based on latest SLES9 x86_64 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 container:
  vzctl set $VEID --ipadd $VE_IP_ADDRESS --save
+
  vzctl set $CTID --ipadd $CT_IP_ADDRESS --save
  
Setup nameserver inside VE (/etc/resolv.conf):
+
Setup nameserver inside the container (/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 the container (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 container (e.g. to 15GB):
  vzctl set $VEID --save --diskspace 15000000
+
  vzctl set $CTID --save --diskspace 15000000
  
== Inside VE ==
+
== Inside the container ==
  
 
All the following instructions are not OpenVZ/Virtuozzo specific and mostly taken as is from
 
All the following instructions are not OpenVZ/Virtuozzo specific and mostly taken as is from
Line 33: Line 34:
  
  
Login to VE and do the following:
+
Login to container and do the following:
  
 
Run '''yast''' and setup SLES9 repository or SLES9 CDs local repository,
 
Run '''yast''' and setup SLES9 repository or SLES9 CDs local repository,
Line 57: Line 58:
 
  ln -s /usr/lib/libdb.so.3 /usr/lib/libdb.so.2
 
  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:
+
Setup graphical access to the container via ssh or via vnc, at your choice:
 
* For access via ssh:
 
* For access via ssh:
** Change X11Forwarding in /etc/ssh/sshd_config to 'yes' inside VE
+
** Change X11Forwarding in /etc/ssh/sshd_config to 'yes' inside the container
** Restart sshd inside VE (/etc/init.d/sshd restart)
+
** Restart sshd inside the container (/etc/init.d/sshd restart)
** Login to VE via ssh with '-X' option (run this command from your host):
+
** Login to the container via ssh with '-X' option (run this command from your
  ssh -X oracle@$VE_ADDRESS
+
host):
 +
  ssh -X oracle@$CT_ADDRESS
  
* For access via VNC, do inside VE:
+
* For access via VNC, do inside container:
** Install XFree86, XFree86-Vnc packages inside VE
+
** Install XFree86, XFree86-Vnc packages inside the container
** Login to VE as 'oracle' (run this command from your host):
+
** Login to the container as 'oracle' (run this command from your host):
  ssh oracle@$VE_ADDRESS
+
  ssh oracle@$CT_ADDRESS
 
** start VNC server:
 
** start VNC server:
 
  Xvnc :0 &
 
  Xvnc :0 &
Line 73: Line 75:
 
  export DISPLAY=:0
 
  export DISPLAY=:0
 
** From your host attach to vnc screen (run this command from your host):
 
** From your host attach to vnc screen (run this command from your host):
  vncviewer $VE_ADDRESS:0
+
  vncviewer $CT_ADDRESS:0
  
NOTE: this may require to use vncviewer from SLES9 OS, since newer vncviewer's are not compatible with it.
+
{{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:
+
Now, as ''''oracle'''' user inside the container:
  
 
Get Oracle 9iR2 (9204) Software from oracle web or use your Oracle Disks.
 
Get Oracle 9iR2 (9204) Software from oracle web or use your Oracle Disks.

Latest revision as of 12:13, 11 March 2008

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

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

Inside host system (CT0)[edit]

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 container.

Create a container based on latest SLES9 x86_64 template:

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

Assign some IP address to the container:

vzctl set $CTID --ipadd $CT_IP_ADDRESS --save

Setup nameserver inside the container (/etc/resolv.conf):

vzctl set $CTID --nameserver $DNS_IP

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

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

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

vzctl set $CTID --save --diskspace 15000000

Inside the container[edit]

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


Login to container 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 the container via ssh or via vnc, at your choice:

  • For access via ssh:
    • Change X11Forwarding in /etc/ssh/sshd_config to 'yes' inside the container
    • Restart sshd inside the container (/etc/init.d/sshd restart)
    • Login to the container via ssh with '-X' option (run this command from your

host):

ssh -X oracle@$CT_ADDRESS
  • For access via VNC, do inside container:
    • Install XFree86, XFree86-Vnc packages inside the container
    • Login to the container as 'oracle' (run this command from your host):
ssh oracle@$CT_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 $CT_ADDRESS:0
Yellowpin.svg Note: this may require to use vncviewer from SLES9 OS, since newer

vncviewer's are not compatible with it.

Now, as 'oracle' user inside the container:

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[edit]