Difference between revisions of "Oracle 10g VE"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (Reverted edits by 109.227.76.113 (talk) to last revision by Kir)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
This is just a listing of steps taken to create a fully functional
 
This is just a listing of steps taken to create a fully functional
Oracle VE.<br>
+
Oracle container.
<br>
+
 
<span style="font-weight: bold;">Create the VE on the
+
== Create the container on the [[host system]] ==
Hardware Node (HN)</span><br>
+
 
<br>
+
vzctl create 1001 --ostemplate centos-4-i386-default
vzctl create 1001 --ostemplate centos-4-i386-default<br>
+
vzctl set 1001 --userpasswd root:password --save
vzctl set 1001 --userpasswd root:password --save<br>
+
vzctl set 1001 --hostname ve-oracle.example.com --save
vzctl set 1001 --hostname ve-oracle.example.com --save<br>
+
vzctl set 1001 --ipadd 192.168.0.62 --save
vzctl set 1001 --ipadd 192.168.0.62 --save<br>
+
 
<br>
+
== Reset resource limits ==
<span style="font-weight: bold;">Reset resource limits</span><br>
+
 
<br>
+
I decided to have max limits to avoid problems during installation.
I decided to have max limits to avoid porblems during installation.
+
Once the installation is
Once the installation is<br>
+
done and the system left running for some time, these limits should be
done and the system left running for some time, these limits can be
+
adjusted.
adjusted.<br>
+
 
<br>
+
{{Note|setting the UBC limits to "unlimited" value like below can only be done on a trusted single-container machine, and can create problems. For more info about UBC, see [[Resource shortage]] and [[UBC]].}}
vzctl set 1001 --kmemsize 2147483647:2147483647 --save<br>
+
 
vzctl set 1001 --lockedpages 2147483647:2147483647 --save<br>
+
{{Inconsistent UBC warning}}
vzctl set 1001 --privvmpages 2147483647:2147483647 --save<br>
+
 
vzctl set 1001 --shmpages 2147483647:2147483647 --save<br>
+
vzctl set 1001 --kmemsize unlimited --save
vzctl set 1001 --dummy 2147483647:2147483647 --save<br>
+
vzctl set 1001 --lockedpages unlimited --save
vzctl set 1001 --numproc 2147483647:2147483647 --save<br>
+
vzctl set 1001 --privvmpages unlimited --save
vzctl set 1001 --physpages 2147483647:2147483647 --save<br>
+
vzctl set 1001 --shmpages unlimited --save
vzctl set 1001 --vmguarpages 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numproc unlimited --save
vzctl set 1001 --oomguarpages 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numtcpsock unlimited --save
vzctl set 1001 --numtcpsock 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numflock unlimited --save
vzctl set 1001 --numflock 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numpty unlimited --save
vzctl set 1001 --numpty 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numsiginfo unlimited --save
vzctl set 1001 --numsiginfo 2147483647:2147483647 --save<br>
+
vzctl set 1001 --tcpsndbuf unlimited --save
vzctl set 1001 --tcpsndbuf 2147483647:2147483647 --save<br>
+
vzctl set 1001 --tcprcvbuf unlimited --save
vzctl set 1001 --tcprcvbuf 2147483647:2147483647 --save<br>
+
vzctl set 1001 --othersockbuf unlimited --save
vzctl set 1001 --othersockbuf 2147483647:2147483647 --save<br>
+
vzctl set 1001 --dgramrcvbuf unlimited --save
vzctl set 1001 --dgramrcvbuf 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numothersock unlimited --save
vzctl set 1001 --numothersock 2147483647:2147483647 --save<br>
+
vzctl set 1001 --dcachesize unlimited --save
vzctl set 1001 --dcachesize 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numfile unlimited --save
vzctl set 1001 --numfile 2147483647:2147483647 --save<br>
+
vzctl set 1001 --numiptent unlimited --save
vzctl set 1001 --numiptent 2147483647:2147483647 --save<br>
+
 
<br>
+
Or you can set these limits in your <code>/etc/vz/conf/1001.conf</code> file:
'''Start the VE'''<br>
+
 
<br>
+
{{Inconsistent UBC warning}}
vzctl start 1001<br>
+
<pre>
<br>
+
# Primary parameters
<br>
+
AVNUMPROC="unlimited"
'''Update /etc/resolv.conf on the VE'''<br>
+
NUMPROC="unlimited"
<br>
+
NUMTCPSOCK="unlimited"
search example.com<br>
+
NUMOTHERSOCK="unlimited"
nameserver &lt;ip address of your name server&gt;<br>
+
VMGUARPAGES="unlimited"
<br>
+
 
<br>
+
# Secondary parameters
'''Install Required Packages'''<br>
+
KMEMSIZE="unlimited"
<br>
+
TCPSNDBUF="unlimited"
vzyum 1001 install binutils compat-db gcc gcc-c++ glibc glibc-common
+
TCPRCVBUF="unlimited"
libstdc++ libstdc++-devel gnome-libs make pdksh sysstat libaio
+
OTHERSOCKBUF="unlimited"
xscreensaver openmotif21<br>
+
DGRAMRCVBUF="unlimited"
vzyum 1001 install xorg-x11-xfs usbutils urw-fonts shared-mime-info
+
OOMGUARPAGES="unlimited"
perl-libwww-perl perl-XML-Parser perl-URI perl-HTML-Tagset
+
 
perl-HTML-Parser patch <br>
+
# Auxiliary parameters
vzyum 1001 install lvm2 intltool libIDL libart_lgpl libbonobo xterm
+
LOCKEDPAGES="unlimited"
libcap libcroco libgnomecanvas libexif libgnomecups libgnomeprint22
+
SHMPAGES="unlimited"
libsoup libwnck libxklavier<br>
+
PRIVVMPAGES="unlimited"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+
NUMFILE="unlimited"
&nbsp;<br>
+
NUMFLOCK="unlimited"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>
+
NUMPTY="unlimited"
'''Check the following rpms are installed on the VE'''<br>
+
NUMSIGINFO="unlimited"
<br>
+
DCACHESIZE="unlimited"
vzctl exec 1001 rpm -q binutils gcc gcc-c++ glibc gnome-libs libstdc++
+
 
libstdc++-devel make pdksh sysstat xscreensaver libaio<br>
+
PHYSPAGES="unlimited"
<br>
+
NUMIPTENT="unlimited"
<br>
+
</pre>
'''Add Oracle User/Group'''<br>
+
 
<br>
+
== Start the container ==
vzctl exec 1001 /usr/sbin/groupadd oinstall<br>
+
vzctl start 1001
vzctl exec 1001 /usr/sbin/groupadd dba<br>
+
 
vzctl exec 1001 /usr/sbin/useradd -m -g oinstall -G dba oracle<br>
+
== Update <code>/etc/resolv.conf</code> on the container ==
vzctl exec 1001 id oracle<br>
+
 
<br>
+
Put the following into your container's /etc/resolv.conf:
'''Set Password for the Oracle user'''<br>
+
 
<br>
+
search example.com
vzctl exec 1001 passwd oracle<br>
+
nameserver <ip address of your name server>
<br>
+
 
'''Create Directories for Oracle Home/Data and the download directory'''<br>
+
== Install Required Packages ==
<br>
+
 
vzctl exec 1001 mkdir /home/oracle/10gR2_db<br>
+
vzyum 1001 install binutils compat-db gcc gcc-c++ glibc \
vzctl exec 1001 mkdir -p /u01/app/oracle/product/10.2.0/db_1<br>
+
  glibc-common libstdc++ libstdc++-devel gnome-libs make \
vzctl exec 1001 mkdir /u01/app/oracle/oradata<br>
+
  pdksh sysstat libaio xscreensaver openmotif21 xorg-x11-xfs \
vzctl exec 1001 chown -R oracle:oinstall /u01/app/oracle
+
  usbutils urw-fonts shared-mime-info perl-libwww-perl \
/home/oracle/10gR2_db<br>
+
  perl-XML-Parser perl-URI perl-HTML-Tagset perl-HTML-Parser \
vzctl exec 1001 chmod -R 775 /u01/app/oracle /home/oracle/10gR2_db<br>
+
  patch lvm2 intltool libIDL libart_lgpl libbonobo xterm \
vzctl exec 1001 ln -s /usr/lib/libstdc++.so.6.0.3
+
  libcap libcroco libgnomecanvas libexif libgnomecups \
/usr/lib/libstdc++.so.5<br>
+
  libgnomeprint22 libsoup libwnck libxklavier
<br>
+
 
'''Put these values in /etc/sysctl.conf on the HN'''<br>
+
== Check the following rpms are installed on the container ==
<br>
+
 
kernel.shmall = 2097152<br>
+
vzctl exec 1001 rpm -q binutils gcc gcc-c++ glibc gnome-libs \
kernel.shmmax = 536870912<br>
+
  libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio
kernel.shmmni = 4096<br>
+
 
kernel.sem = 250 32000 100 128<br>
+
== Add Oracle User/Group ==
fs.file-max = 65536<br>
+
 
net.ipv4.ip_local_port_range = 1024 65000<br>
+
vzctl exec 1001 /usr/sbin/groupadd oinstall
net.core.rmem_default=262144<br>
+
vzctl exec 1001 /usr/sbin/groupadd dba
net.core.wmem_default=262144<br>
+
vzctl exec 1001 /usr/sbin/useradd -m -g oinstall -G dba oracle
net.core.rmem_max=262144<br>
+
vzctl exec 1001 id oracle
net.core.wmem_max=262144<br>
+
 
<br>
+
== Set Password for the Oracle user ==
'''Execute on the HN'''<br>
+
 
<br>
+
vzctl exec 1001 passwd oracle
/sbin/sysctl -p<br>
+
 
<br>
+
== Create Directories for Oracle Home/Data and the download directory ==
<br>
+
 
<br>
+
vzctl exec 1001 mkdir /home/oracle/10gR2_db
At this point the VE is ready for Oracle installation.<br>
+
vzctl exec 1001 mkdir -p /u01/app/oracle/product/10.2.0/db_1
We take a backup of the VE at this point in case we need to rebuild the
+
vzctl exec 1001 mkdir /u01/app/oracle/oradata
system or do a clean Oracle install<br>
+
vzctl exec 1001 chown -R oracle:oinstall /u01/app/oracle /home/oracle/10gR2_db
<br>
+
vzctl exec 1001 chmod -R 775 /u01/app/oracle /home/oracle/10gR2_db
'''Shutdown the VE and take a backup'''<br>
+
vzctl exec 1001 ln -s /usr/lib/libstdc++.so.6.0.3 /usr/lib/libstdc++.so.5
<br>
+
 
vzctl stop 1001<br>
+
== Put these values in /etc/sysctl.conf on the HN ==
cd /u01/backups<br>
+
 
tar czpvf ve-1001-preOracle.tar.gz /vz/private/1001/
+
Put these values in /etc/sysctl.conf on the HN:
/etc/vz/conf/1001.conf<br>
+
 
<br>
+
kernel.shmall = 2097152
'''Start VE again'''<br>
+
kernel.shmmax = 536870912
<br>
+
kernel.shmmni = 4096
vzctl start 1001<br>
+
kernel.sem = 250 32000 100 128
<br>
+
fs.file-max = 65536
'''Copy the downloaded Oracle zip file to the VE and change its
+
net.ipv4.ip_local_port_range = 1024 65000
ownership to oracle on the VE'''<br>
+
net.core.rmem_default=262144
<br>
+
net.core.wmem_default=262144
cp /u01/software/10201_database_linux32.zip
+
net.core.rmem_max=262144
/vz/private/1001/home/oracle/10gR2_db/<br>
+
net.core.wmem_max=262144
vzctl exec 1001 chown oracle:oinstall
+
 
/home/oracle/10gR2_db/10201_database_linux32.zip<br>
+
Then execute on the HN the following command:
<br>
+
'''Now login as oracle on the ve-1001'''<br>
+
/sbin/sysctl -p
<br>
+
 
cd /home/oracle/10gR2_db<br>
+
 
unzip 10201_database_linux32.zip<br>
+
At this point the container is ready for Oracle installation.
cd database/<br>
+
We take a backup of the container at this point in case we need to rebuild the
export ORACLE_BASE=/u01/app/oracle<br>
+
system or do a clean Oracle install.
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1<br>
+
 
export DISPLAY=192.168.0.149:0<br>
+
== Shutdown the container and take a backup ==
<br>
+
 
Make sure u can run xterm<br>
+
vzctl stop 1001
<br>
+
cd /u01/backups
./runInstaller<br>
+
tar czpvf ve-1001-preOracle.tar.gz /vz/private/1001/ /etc/vz/conf/1001.conf
<br>
+
 
'''When prompted to run scripts as root. Login as root and execute'''<br>
+
== Start the container again ==
<br>
+
 
export DISPLAY=192.168.0.149:0<br>
+
vzctl start 1001
/u01/app/oracle/oraInventory/orainstRoot.sh<br>
+
 
/u01/app/oracle/product/10.2.0/db_1/root.sh<br>
+
== Put oracle distro into the container ==
<br>
+
 
'''Update oracle's profile with the following'''<br>
+
Copy the downloaded Oracle zip file to the container and change its
<br>
+
ownership to "oracle" on the container.
cd<br>
+
 
vi /home/oracle/.bashrc<br>
+
cp /u01/software/10201_database_linux32.zip /vz/private/1001/home/oracle/10gR2_db/
export ORACLE_BASE=/u01/app/oracle<br>
+
vzctl exec 1001 chown oracle:oinstall /home/oracle/10gR2_db/10201_database_linux32.zip
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1<br>
+
 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH<br>
+
== Start installation ==
export PATH=$ORACLE_HOME/bin:$PATH<br>
+
 
export ORACLE_SID=orcl<br>
+
Now login as oracle on the ve-1001, and run the following commands:
<br>
+
 
<br>
+
cd /home/oracle/10gR2_db
'''Delete installation files (optional)'''<br>
+
unzip 10201_database_linux32.zip
<br>
+
cd database/
cd /home/oracle/10gR2_db<br>
+
export ORACLE_BASE=/u01/app/oracle
rm -rf database<br>
+
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
<br>
+
export DISPLAY=192.168.0.149:0
'''Time to take another backup of the VE on the HN node.''' <br>
+
 
<br>
+
Make sure you can run xterm, then:
This backup will allow you to restore the VE to the point where no
+
 
database has yet been created.<br>
+
./runInstaller
<br>
+
 
vzctl stop 1001<br>
+
'''When prompted to run scripts as root. Login as root and execute'''
cd /u01/backups<br>
+
 
tar czpvf ve-1001-postOracleSoftware.tar.gz /vz/private/1001/
+
export DISPLAY=192.168.0.149:0
/etc/vz/conf/1001.conf<br>
+
/u01/app/oracle/oraInventory/orainstRoot.sh
<br>
+
/u01/app/oracle/product/10.2.0/db_1/root.sh
<br>
+
 
Start VE<br>
+
'''Update oracle's profile with the following'''
vzctl start 1001<br>
+
 
<br>
+
cd
'''Login as oracle and create the database'''<br>
+
vi /home/oracle/.bashrc
<br>
+
export ORACLE_BASE=/u01/app/oracle
export DISPLAY=192.168.0.149:0<br>
+
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
dbca<br>
+
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
<br>
+
export PATH=$ORACLE_HOME/bin:$PATH
<br>
+
export ORACLE_SID=orcl
'''Create listener'''<br>
+
 
<br>
+
 
netca<br>
+
'''Delete installation files (optional)'''
<br>
+
 
'''Now take another backup on the HN node'''<br>
+
cd /home/oracle/10gR2_db
<br>
+
rm -rf database
vzctl stop 1001<br>
+
 
cd /u01/backups<br>
+
'''Time to take another backup of the container on the [[hardware node]].'''  
tar czpvf ve-1001-postOracleDatabase.tar.gz /vz/private/1001/
+
 
/etc/vz/conf/1001.conf<br>
+
This backup will allow you to restore the container to the point where no
<br>
+
database has yet been created.
 +
 
 +
vzctl stop 1001
 +
cd /u01/backups
 +
tar czpvf ve-1001-postOracleSoftware.tar.gz \
 +
  /vz/private/1001/ /etc/vz/conf/1001.conf
 +
 
 +
 
 +
Start the container
 +
 
 +
vzctl start 1001
 +
 
 +
'''Login as oracle and create the database'''
 +
 
 +
export DISPLAY=192.168.0.149:0
 +
dbca
 +
 
 +
 
 +
'''Create listener'''
 +
 
 +
netca
 +
 
 +
'''Now take another backup on the HN node'''
 +
 
 +
vzctl stop 1001
 +
cd /u01/backups
 +
tar czpvf ve-1001-postOracleDatabase.tar.gz \
 +
  /vz/private/1001/ /etc/vz/conf/1001.conf
 +
 
 +
== Oracle Help ==
 +
 
 +
* [http://www.orafaq.com/forum Ask questions on the Oracle Forum]
 +
* [http://www.orawiki.com/ Oracle Wiki]
 +
 
 +
[[Category:HOWTO]]

Latest revision as of 19:50, 11 October 2011

This is just a listing of steps taken to create a fully functional Oracle container.

Create the container on the host system[edit]

vzctl create 1001 --ostemplate centos-4-i386-default
vzctl set 1001 --userpasswd root:password --save
vzctl set 1001 --hostname ve-oracle.example.com --save
vzctl set 1001 --ipadd 192.168.0.62 --save

Reset resource limits[edit]

I decided to have max limits to avoid problems during installation. Once the installation is done and the system left running for some time, these limits should be adjusted.

Yellowpin.svg Note: setting the UBC limits to "unlimited" value like below can only be done on a trusted single-container machine, and can create problems. For more info about UBC, see Resource shortage and UBC.
Warning.svg Warning: The above UBC values might not be consistent; see UBC consistency check.
vzctl set 1001 --kmemsize unlimited --save
vzctl set 1001 --lockedpages unlimited --save
vzctl set 1001 --privvmpages unlimited --save
vzctl set 1001 --shmpages unlimited --save
vzctl set 1001 --numproc unlimited --save
vzctl set 1001 --numtcpsock unlimited --save
vzctl set 1001 --numflock unlimited --save
vzctl set 1001 --numpty unlimited --save
vzctl set 1001 --numsiginfo unlimited --save
vzctl set 1001 --tcpsndbuf unlimited --save
vzctl set 1001 --tcprcvbuf unlimited --save
vzctl set 1001 --othersockbuf unlimited --save
vzctl set 1001 --dgramrcvbuf unlimited --save
vzctl set 1001 --numothersock unlimited --save
vzctl set 1001 --dcachesize unlimited --save
vzctl set 1001 --numfile unlimited --save
vzctl set 1001 --numiptent unlimited --save

Or you can set these limits in your /etc/vz/conf/1001.conf file:

Warning.svg Warning: The above UBC values might not be consistent; see UBC consistency check.
# Primary parameters
AVNUMPROC="unlimited"
NUMPROC="unlimited"
NUMTCPSOCK="unlimited"
NUMOTHERSOCK="unlimited"
VMGUARPAGES="unlimited"

# Secondary parameters
KMEMSIZE="unlimited"
TCPSNDBUF="unlimited"
TCPRCVBUF="unlimited"
OTHERSOCKBUF="unlimited"
DGRAMRCVBUF="unlimited"
OOMGUARPAGES="unlimited"

# Auxiliary parameters
LOCKEDPAGES="unlimited"
SHMPAGES="unlimited"
PRIVVMPAGES="unlimited"
NUMFILE="unlimited"
NUMFLOCK="unlimited"
NUMPTY="unlimited"
NUMSIGINFO="unlimited"
DCACHESIZE="unlimited"

PHYSPAGES="unlimited"
NUMIPTENT="unlimited"

Start the container[edit]

vzctl start 1001

Update /etc/resolv.conf on the container[edit]

Put the following into your container's /etc/resolv.conf:

search example.com
nameserver <ip address of your name server>

Install Required Packages[edit]

vzyum 1001 install binutils compat-db gcc gcc-c++ glibc \
 glibc-common libstdc++ libstdc++-devel gnome-libs make \
 pdksh sysstat libaio xscreensaver openmotif21 xorg-x11-xfs \
 usbutils urw-fonts shared-mime-info perl-libwww-perl \
 perl-XML-Parser perl-URI perl-HTML-Tagset perl-HTML-Parser \
 patch lvm2 intltool libIDL libart_lgpl libbonobo xterm \
 libcap libcroco libgnomecanvas libexif libgnomecups \
 libgnomeprint22 libsoup libwnck libxklavier

Check the following rpms are installed on the container[edit]

vzctl exec 1001 rpm -q binutils gcc gcc-c++ glibc gnome-libs \
 libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio

Add Oracle User/Group[edit]

vzctl exec 1001 /usr/sbin/groupadd oinstall
vzctl exec 1001 /usr/sbin/groupadd dba
vzctl exec 1001 /usr/sbin/useradd -m -g oinstall -G dba oracle
vzctl exec 1001 id oracle

Set Password for the Oracle user[edit]

vzctl exec 1001 passwd oracle

Create Directories for Oracle Home/Data and the download directory[edit]

vzctl exec 1001 mkdir /home/oracle/10gR2_db
vzctl exec 1001 mkdir -p /u01/app/oracle/product/10.2.0/db_1
vzctl exec 1001 mkdir /u01/app/oracle/oradata
vzctl exec 1001 chown -R oracle:oinstall /u01/app/oracle /home/oracle/10gR2_db
vzctl exec 1001 chmod -R 775 /u01/app/oracle /home/oracle/10gR2_db
vzctl exec 1001 ln -s /usr/lib/libstdc++.so.6.0.3 /usr/lib/libstdc++.so.5

Put these values in /etc/sysctl.conf on the HN[edit]

Put these values in /etc/sysctl.conf on the HN:

kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

Then execute on the HN the following command:

/sbin/sysctl -p


At this point the container is ready for Oracle installation. We take a backup of the container at this point in case we need to rebuild the system or do a clean Oracle install.

Shutdown the container and take a backup[edit]

vzctl stop 1001
cd /u01/backups
tar czpvf ve-1001-preOracle.tar.gz /vz/private/1001/ /etc/vz/conf/1001.conf

Start the container again[edit]

vzctl start 1001

Put oracle distro into the container[edit]

Copy the downloaded Oracle zip file to the container and change its ownership to "oracle" on the container.

cp /u01/software/10201_database_linux32.zip /vz/private/1001/home/oracle/10gR2_db/
vzctl exec 1001 chown oracle:oinstall /home/oracle/10gR2_db/10201_database_linux32.zip

Start installation[edit]

Now login as oracle on the ve-1001, and run the following commands:

cd /home/oracle/10gR2_db
unzip 10201_database_linux32.zip
cd database/
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export DISPLAY=192.168.0.149:0

Make sure you can run xterm, then:

./runInstaller

When prompted to run scripts as root. Login as root and execute

export DISPLAY=192.168.0.149:0
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh

Update oracle's profile with the following

cd
vi /home/oracle/.bashrc
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl


Delete installation files (optional)

cd /home/oracle/10gR2_db
rm -rf database

Time to take another backup of the container on the hardware node.

This backup will allow you to restore the container to the point where no database has yet been created.

vzctl stop 1001
cd /u01/backups
tar czpvf ve-1001-postOracleSoftware.tar.gz \
  /vz/private/1001/ /etc/vz/conf/1001.conf


Start the container

vzctl start 1001

Login as oracle and create the database

export DISPLAY=192.168.0.149:0
dbca


Create listener

netca

Now take another backup on the HN node

vzctl stop 1001
cd /u01/backups
tar czpvf ve-1001-postOracleDatabase.tar.gz \
  /vz/private/1001/ /etc/vz/conf/1001.conf

Oracle Help[edit]