Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Oracle 10g VE

38 bytes removed, 19:50, 11 October 2011
m
Reverted edits by 109.227.76.113 (talk) to last revision by Kir
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4This is just a listing of steps taken to create a fully functionalOracle container.01 Transitional//EN"><html><head> <meta content="text/html; charset=ISO-8859-1"Create the container on the [[host system]] ==  httpvzctl create 1001 --equiv="contentostemplate centos-type">4-i386-default <title></title> vzctl set 1001 --userpasswd root:password --save</head> vzctl set 1001 --hostname ve-oracle.example.com --save<body>This is just a listing of steps taken to create a fully functionalyOracle VE vzctl set 1001 --ipadd 192.168.0.<br>62 --save<br><span style="font-weight: bold;">Create the VE on the= Reset resource limits ==Hardware Node (HN)</span><br><br>vzctl create 1001 --ostemplate centos-4-i386-default<br>I decided to have max limits to avoid problems during installation.Once the installation isdone and the system left running for some time, these limits should beadjusted.vzctl set 1001 --userpasswd root:password --save<br>vzctl set 1001 -{{Note|setting the UBC limits to "unlimited" value like below can only be done on a trusted single-hostname ve-oraclecontainer machine, and can create problems.exampleFor more info about UBC, see [[Resource shortage]] and [[UBC]].com --save<br>}} {{Inconsistent UBC warning}}  vzctl set 1001 --ipadd 192.168.0.62 kmemsize unlimited --save<br><br><span style="font vzctl set 1001 --lockedpages unlimited --weight: bold;">Reset resource limits</span><br>save<br> vzctl set 1001 --privvmpages unlimited --saveI decided to have max limits to avoid porblems during installation. vzctl set 1001 --shmpages unlimited --saveOnce the installation is<br>done and the system left running for some time, these limits can beadjusted.<br><br> vzctl set 1001 --numproc unlimited --save vzctl set 1001 --kmemsize 2147483647:2147483647 numtcpsock unlimited --save<br> vzctl set 1001 --lockedpages 2147483647:2147483647 numflock unlimited --save<br> vzctl set 1001 --privvmpages 2147483647:2147483647 numpty unlimited --save<br> vzctl set 1001 --shmpages 2147483647:2147483647 numsiginfo unlimited --save<br> vzctl set 1001 --dummy 2147483647:2147483647 tcpsndbuf unlimited --save<br> vzctl set 1001 --numproc 2147483647:2147483647 tcprcvbuf unlimited --save<br> vzctl set 1001 --physpages 2147483647:2147483647 othersockbuf unlimited --save<br> vzctl set 1001 --vmguarpages 2147483647:2147483647 dgramrcvbuf unlimited --save<br> vzctl set 1001 --oomguarpages 2147483647:2147483647 numothersock unlimited --save<br> vzctl set 1001 --numtcpsock 2147483647:2147483647 dcachesize unlimited --save<br> vzctl set 1001 --numflock 2147483647:2147483647 numfile unlimited --save<br> vzctl set 1001 --numpty 2147483647:2147483647 numiptent unlimited --save<br>vzctl Or you can set 1001 --numsiginfo 2147483647:2147483647 --savethese limits in your <brcode>vzctl set /etc/vz/conf/1001 --tcpsndbuf 2147483647:2147483647 --save.conf<br/code>file: {{Inconsistent UBC warning}}vzctl set 1001 --tcprcvbuf 2147483647:2147483647 --save<brpre>vzctl set 1001 --othersockbuf 2147483647:2147483647 --save<br># Primary parametersAVNUMPROC="unlimited"vzctl set 1001 --dgramrcvbuf 2147483647:2147483647 --save<br>NUMPROC="unlimited"vzctl set 1001 --numothersock 2147483647:2147483647 --save<br>NUMTCPSOCK="unlimited"NUMOTHERSOCK="unlimited"vzctl set 1001 --dcachesize 2147483647:2147483647 --save<br>VMGUARPAGES="unlimited"vzctl set 1001 --numfile 2147483647:2147483647 --save<br>vzctl set 1001 --numiptent 2147483647:2147483647 --save<br># Secondary parameters<br>KMEMSIZE="unlimited"'''Start the VE'''<br>TCPSNDBUF="unlimited"<br>TCPRCVBUF="unlimited"vzctl start 1001<br>OTHERSOCKBUF="unlimited"<br>DGRAMRCVBUF="unlimited"<br>OOMGUARPAGES="unlimited"'''Update /etc/resolv.conf on the VE'''<br><br># Auxiliary parameterssearch example.com<br>LOCKEDPAGES="unlimited"nameserver &lt;ip address of your name server&gt;<br>SHMPAGES="unlimited"<br>PRIVVMPAGES="unlimited"<br>NUMFILE="unlimited"NUMFLOCK="unlimited"'''Install Required Packages'''<br>NUMPTY="unlimited"<br>NUMSIGINFO="unlimited"vzyum 1001 install binutils compat-db gcc gcc-c++ glibc glibc-commonDCACHESIZE="unlimited" PHYSPAGES="unlimited"libstdc++ libstdc++-devel gnome-libs make pdksh sysstat libaioNUMIPTENT="unlimited"xscreensaver openmotif21<br/pre>vzyum == Start the container == vzctl start 1001 install xorg-x11-xfs usbutils urw-fonts shared-mime-infoperl-libwww-perl perl-XML-Parser perl-URI perl-HTML-Tagsetperl-HTML-Parser patch == Update <code>/etc/resolv.conf<br/code>on the container ==vzyum 1001 install lvm2 intltool libIDL libart_lgpl libbonobo xtermlibcap libcroco libgnomecanvas libexif libgnomecups libgnomeprint22Put the following into your container's /etc/resolv.conf: libsoup libwnck libxklavier search example.com nameserver <brip address of your name server>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>== Install Required Packages ==&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>'''Check the following rpms are installed on the VE'''<br><br>vzctl exec vzyum 1001 rpm install binutils compat-q binutils db gcc gcc-c++ glibc gnome\ glibc-libs common libstdc++libstdc++-devel gnome-libs make \ pdksh sysstat libaio xscreensaver libaio<br>openmotif21 xorg-x11-xfs \<br><br> usbutils urw-fonts shared-mime-info perl-libwww-perl \'''Add Oracle User/Group'''<br> perl-XML-Parser perl-URI perl-HTML-Tagset perl-HTML-Parser \<br> patch lvm2 intltool libIDL libart_lgpl libbonobo xterm \ libcap libcroco libgnomecanvas libexif libgnomecups \ libgnomeprint22 libsoup libwnck libxklaviervzctl exec 1001 /usr/sbin/groupadd oinstall<br>vzctl exec 1001 /usr/sbin/groupadd dba<br>== Check the following rpms are installed on the container ==  vzctl exec 1001 /usr/sbin/useradd rpm -m q binutils gcc gcc-g oinstall c++ glibc gnome-G dba oracle<br>libs \ libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaiovzctl exec 1001 id oracle<br><br>'''Set Password for the == Add Oracle user'''<br><br>User/Group ==  vzctl exec 1001 passwd oracle<br>/usr/sbin/groupadd oinstall<br>'''Create Directories for Oracle Home vzctl exec 1001 /usr/sbin/Data and the download directory'''<br><br>groupadd dba vzctl exec 1001 mkdir /homeusr/oraclesbin/10gR2_db<br>useradd -m -g oinstall -G dba oracle vzctl exec 1001 mkdir -p /u01/app/id oracle/product/10.2.0/db_1<br> == Set Password for the Oracle user ==  vzctl exec 1001 mkdir /u01/app/passwd oracle/oradata<br> == Create Directories for Oracle Home/Data and the download directory ==  vzctl exec 1001 chown -R mkdir /home/oracle:oinstall /10gR2_db vzctl exec 1001 mkdir -p /u01/app/oracle/homeproduct/oracle10.2.0/10gR2_db<br>db_1 vzctl exec 1001 chmod -R 775 mkdir /u01/app/oracle/oradata vzctl exec 1001 chown -R oracle:oinstall /u01/app/oracle /home/oracle/10gR2_db<br> vzctl exec 1001 ln chmod -s R 775 /usru01/app/oracle /home/oracle/10gR2_db vzctl exec 1001 ln -s /usr/lib/libstdc++.so.6.0.3/usr/lib/libstdc++.so.5<br><br>'''== Put these values in /etc/sysctl.conf on the HN == Put these values in /etc/sysctl.conf on the HN'''<br>:<br> kernel.shmall = 2097152<br> kernel.shmmax = 536870912<br> kernel.shmmni = 4096<br> kernel.sem = 250 32000 100 128<br> fs.file-max = 65536<br> net.ipv4.ip_local_port_range = 1024 65000<br> net.core.rmem_default=262144<br> net.core.wmem_default=262144<br> net.core.rmem_max=262144<br> net.core.wmem_max=262144<br><br>'''Execute Then execute on the HN'''<br>the following command:<br> /sbin/sysctl -p<br><br><br><br>At this point the VE container is ready for Oracle installation.<br>We take a backup of the VE container at this point in case we need to rebuild thesystem or do a clean Oracle install<br>.<br>'''== Shutdown the VE container and take a backup'''<br>==<br> vzctl stop 1001<br> cd /u01/backups<br> tar czpvf ve-1001-preOracle.tar.gz /vz/private/1001//etc/vz/conf/1001.conf<br><br>'''== Start VE the container again'''<br>==<br> vzctl start 1001<br><br>'''Copy == Put oracle distro into the container == Copy the downloaded Oracle zip file to the VE container and change itsownership to "oracle " on the VE'''<br>container.<br> cp /u01/software/10201_database_linux32.zip/vz/private/1001/home/oracle/10gR2_db/<br> vzctl exec 1001 chown oracle:oinstall/home/oracle/10gR2_db/10201_database_linux32.zip<br><br>'''== Start installation == Now login as oracle on the ve-1001'''<br>, and run the following commands:<br> cd /home/oracle/10gR2_db<br> unzip 10201_database_linux32.zip<br> cd database/<br> export ORACLE_BASE=/u01/app/oracle<br> export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1<br> export DISPLAY=192.168.0.149:0<br><br>Make sure u you can run xterm<br>, then:<br> ./runInstaller<br><br>'''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 container on the HN [[hardware node]].''' <br><br> This backup will allow you to restore the VE container 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>the container   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><br><== Oracle Help == * [http://www.orafaq.com/body>forum Ask questions on the Oracle Forum]<* [http://www.orawiki.com/html>Oracle Wiki] [[Category:HOWTO]]