Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Oracle 10g VE

490 bytes added, 19:50, 11 October 2011
m
Reverted edits by 109.227.76.113 (talk) to last revision by Kir
This is just a listing of steps taken to create a fully functional
Oracle VEcontainer.
== Create the VE container on the Hardware Node [[host system]] ==
vzctl create 1001 --ostemplate centos-4-i386-default
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 can should be
adjusted.
{{Note|setting the UBC limits to "unlimited" value like below can only be done on a trusted single-VE container machine, and can create problems. For more info about UBC, see [[Resource shortage]] and [[UBC]].}}
vzctl set 1001 --kmemsize 2147483647:2147483647 --save vzctl set 1001 --lockedpages 2147483647:2147483647 --save vzctl set 1001 --privvmpages 2147483647:2147483647 --save vzctl set 1001 --shmpages 2147483647:2147483647 --save vzctl set 1001 --numproc 2147483647:2147483647 --save vzctl set 1001 --numtcpsock 2147483647:2147483647 --save vzctl set 1001 --numflock 2147483647:2147483647 --save vzctl set 1001 --numpty 2147483647:2147483647 --save vzctl set 1001 --numsiginfo 2147483647:2147483647 --save vzctl set 1001 --tcpsndbuf 2147483647:2147483647 --save vzctl set 1001 --tcprcvbuf 2147483647:2147483647 --save vzctl set 1001 --othersockbuf 2147483647:2147483647 --save vzctl set 1001 --dgramrcvbuf 2147483647:2147483647 --save vzctl set 1001 --numothersock 2147483647:2147483647 --save vzctl set 1001 --dcachesize 2147483647:2147483647 --save vzctl set 1001 --numfile 2147483647:2147483647 --save vzctl set 1001 --numiptent 2147483647:2147483647 --save{{Inconsistent UBC warning}}
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 <code>/etc/vz/conf/1001.conf</code> file: {{Inconsistent UBC warning}}<pre># Primary parametersAVNUMPROC="unlimited"NUMPROC="unlimited"NUMTCPSOCK="unlimited"NUMOTHERSOCK="unlimited"VMGUARPAGES="unlimited" # Secondary parametersKMEMSIZE="unlimited"TCPSNDBUF="unlimited"TCPRCVBUF="unlimited"OTHERSOCKBUF="unlimited"DGRAMRCVBUF="unlimited"OOMGUARPAGES="unlimited" # Auxiliary parametersLOCKEDPAGES="unlimited"SHMPAGES="unlimited"PRIVVMPAGES="unlimited"NUMFILE="unlimited"NUMFLOCK="unlimited"NUMPTY="unlimited"NUMSIGINFO="unlimited"DCACHESIZE="unlimited" PHYSPAGES="unlimited"NUMIPTENT="unlimited"</pre> == Start the VE container ==
vzctl start 1001
== Update <code>/etc/resolv.conf </code> on the VEcontainer ==
Put the following into your VEcontainer's /etc/resolv.conf:
search example.com
libgnomeprint22 libsoup libwnck libxklavier
== Check the following rpms are installed on the VE container ==
vzctl exec 1001 rpm -q binutils gcc gcc-c++ glibc gnome-libs \
 At this point the VE container is ready for Oracle installation.We take a backup of the VE container at this point in case we need to rebuild the
system or do a clean Oracle install.
== Shutdown the VE container and take a backup ==
vzctl stop 1001
tar czpvf ve-1001-preOracle.tar.gz /vz/private/1001/ /etc/vz/conf/1001.conf
== Start VE the container again ==
vzctl start 1001
== Put oracle distro into VE the container ==
Copy the downloaded Oracle zip file to the VE container and change itsownership to "oracle" on the VEcontainer.
cp /u01/software/10201_database_linux32.zip /vz/private/1001/home/oracle/10gR2_db/
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 nodatabase 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'''
'''When prompted to run scripts as root. Login as root and execute'''<br><br> export DISPLAY=192.168.0.149:0<br>/u01/app/oracle/oraInventory/orainstRoot.sh<br>/u01/app/oracle/product/10.2.0/db_1/root.sh<br><br>'''Update oracle's profile with the following'''<br><br>cd<br>vi /home/oracle/.bashrc<br>export ORACLE_BASE=/u01/app/oracle<br>export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1<br>export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH<br>export PATH=$ORACLE_HOME/bin:$PATH<br>export ORACLE_SID=orcl<br><br><br>'''Delete installation files (optional)'''<br><br>cd /home/oracle/10gR2_db<br>rm -rf database<br><br>'''Time to take another backup of the VE on the HN node.''' <br><br>This backup will allow you to restore the VE to the point where nodatabase has yet been created.<br><br>vzctl stop 1001<br>cd /u01/backups<br>tar czpvf ve-1001-postOracleSoftware.tar.gz /vz/private/1001//etc/vz/conf/1001.conf<br><br><br>Start VE<br>vzctl start 1001<br><br>'''Login as oracle and create the database'''<br><br>export DISPLAY=192.168.0.149:0<br> dbca<br><br><br>'''Create listener'''<br><br> netca<br><br>'''Now take another backup on the HN node'''<br><br> vzctl stop 1001<br> cd /u01/backups<br> tar czpvf ve-1001-postOracleDatabase.tar.gz \ /vz/private/1001//etc/vz/conf/1001.conf<br>
== Oracle Help ==