Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Oracle 10g VE

1,084 bytes added, 00:01, 11 January 2007
no edit summary
This is just a listing of steps taken to create a fully functionaly Oracle VE<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>'''Create the VE on the Hardware Node (HN)'''<head> <meta content="text/html; charset=ISO-8859-1"vzctl create 1001 http-equiv="content-ostemplate centos-4-i386-defaulttype">vzctl set 1001 --userpasswd root:password --save <title></title>vzctl set 1001 --hostname ve-oracle.example.com --save</head><body>vzctl set 1001 --ipadd 192This is just a listing of steps taken to create a fully functionalyOracle VE.168.0.62 --save<br><br>'''Reset resource limits'''<span style="font-weight: bold;">Create the VE on theHardware Node (HN)</span><br><br>I decided to have max limits to avoid porblems during installation. Once the installation isvzctl create 1001 --ostemplate centos-4-i386-default<br>done and the system left running for some time, these limits can be adjusted. vzctl vzctl set 1001 --kmemsize 2147483647userpasswd root:2147483647 password --save<br>vzctl set 1001 --lockedpages 2147483647:2147483647 hostname ve-oracle.example.com --save<br>vzctl set 1001 --privvmpages 2147483647:2147483647 ipadd 192.168.0.62 --save<br>vzctl set 1001 --shmpages 2147483647:2147483647 --save<br>vzctl set 1001 -<span style="font-dummy 2147483647weight:2147483647 --savebold;">Reset resource limits</span><br>vzctl set 1001 --numproc 2147483647:2147483647 --save<br>vzctl set 1001 --physpages 2147483647:2147483647 --saveI decided to have max limits to avoid porblems during installation.Once the installation is<br>vzctl set 1001 --vmguarpages 2147483647:2147483647 --savedone and the system left running for some time, these limits can beadjusted.<br><br>vzctl set 1001 --oomguarpages kmemsize 2147483647:2147483647 --save<br>vzctl set 1001 --numtcpsock lockedpages 2147483647:2147483647 --save<br>vzctl set 1001 --numflock privvmpages 2147483647:2147483647 --save<br>vzctl set 1001 --numpty shmpages 2147483647:2147483647 --save<br>vzctl set 1001 --numsiginfo dummy 2147483647:2147483647 --save<br>vzctl set 1001 --tcpsndbuf numproc 2147483647:2147483647 --save<br>vzctl set 1001 --tcprcvbuf physpages 2147483647:2147483647 --save<br>vzctl set 1001 --othersockbuf vmguarpages 2147483647:2147483647 --save<br>vzctl set 1001 --dgramrcvbuf oomguarpages 2147483647:2147483647 --save<br>vzctl set 1001 --numothersock numtcpsock 2147483647:2147483647 --save<br>vzctl set 1001 --dcachesize numflock 2147483647:2147483647 --save<br>vzctl set 1001 --numfile numpty 2147483647:2147483647 --save<br>vzctl set 1001 --numiptent numsiginfo 2147483647:2147483647 --save<br> '''Start the VE'''vzctl set 1001 --tcpsndbuf 2147483647:2147483647 --save<br>vzctl start set 1001--tcprcvbuf 2147483647:2147483647 --save<br>vzctl set 1001 --othersockbuf 2147483647:2147483647 --save<br>vzctl set 1001 --dgramrcvbuf 2147483647:2147483647 --save<br>'''Update /etc/resolv.conf on the VE'''vzctl set 1001 --numothersock 2147483647:2147483647 --save<br> search example.comnameserver vzctl set 1001 --dcachesize 2147483647:2147483647 --save<ip address of your name serverbr>vzctl set 1001 --numfile 2147483647:2147483647 --save<br> '''Install Required Packages''' vzyum vzctl set 1001 install binutils compat-db gcc gcc-c++ glibc glibcnumiptent 2147483647:2147483647 -common libstdc++ libstdc++-devel gnome-libs make pdksh sysstat libaio xscreensaver openmotif21save<br>vzyum <br>'''Start the VE'''<br><br>vzctl start 1001 install xorg-x11-xfs usbutils urw-fonts shared-mime-info perl-libwww-perl perl-XML-Parser perl-URI perl-HTML-Tagset perl-HTML-Parser patch <br><br><br>'''Update /etc/resolv.conf on the VE'''<br>vzyum 1001 install lvm2 intltool libIDL libart_lgpl libbonobo xterm libcap libcroco libgnomecanvas libexif libgnomecups libgnomeprint22 libsoup libwnck libxklavier<br> search example.com<br>nameserver &lt;ip address of your name server&gt;<br><br><br>'''Check the following rpms are installed on the VEInstall Required Packages'''<br><br>vzctl exec vzyum 1001 rpm install binutils compat-q binutils db gcc gcc-c++ glibc gnomeglibc-libs commonlibstdc++ libstdc++-devel gnome-libs make pdksh sysstat xscreensaver libaioxscreensaver openmotif21<br>vzyum 1001 install xorg-x11-xfs usbutils urw-fonts shared-mime-info'''Add Oracle User/Group''' vzctl exec 1001 /usr/sbin/groupadd oinstallperl-libwww-perl perl-XML-Parser perl-URI perl-HTML-Tagsetvzctl exec perl-HTML-Parser patch <br>vzyum 1001 /usr/sbin/groupadd dbainstall lvm2 intltool libIDL libart_lgpl libbonobo xtermvzctl exec 1001 /usr/sbin/useradd -m -g oinstall -G dba oraclelibcap libcroco libgnomecanvas libexif libgnomecups libgnomeprint22vzctl exec 1001 id oraclelibsoup libwnck libxklavier<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>''''Set Password for Check the following rpms are installed on the Oracle userVE'''<br><br>vzctl exec 1001 passwd oraclerpm -q binutils gcc gcc-c++ glibc gnome-libs libstdc++'''Create Directories for Oracle Homelibstdc++-devel make pdksh sysstat xscreensaver libaio<br><br><br>'''Add Oracle User/Data and the download directoryGroup'''<br><br>vzctl exec 1001 mkdir /homeusr/oraclesbin/10gR2_dbgroupadd oinstall<br>vzctl exec 1001 mkdir -p /u01usr/sbin/appgroupadd dba<br>vzctl exec 1001 /oracleusr/productsbin/10.2.0/db_1useradd -m -g oinstall -G dba oracle<br>vzctl exec 1001 mkdir /u01/app/id oracle/oradata<br><br>'''Set Password for the Oracle user'''<br><br>vzctl exec 1001 chown -R passwd oracle:oinstall <br><br>'''Create Directories for Oracle Home/u01/app/oracle /home/oracle/10gR2_dbvzctl exec Data and the download directory'''<br><br>vzctl exec 1001 chmod -R 775 /u01/app/oracle mkdir /home/oracle/10gR2_db<br>vzctl exec 1001 ln mkdir -s p /u01/app/usroracle/libproduct/libstdc++10.so.62.0.3 /usrdb_1<br>vzctl exec 1001 mkdir /libu01/libstdc++.so.5 '''Put these values in app/etcoracle/sysctl.conf on the HN'''oradata<br>vzctl exec 1001 chown -R oracle:oinstall /u01/app/oracle/home/oracle/10gR2_db<br>kernel.shmall = 2097152vzctl exec 1001 chmod -R 775 /u01/app/oracle /home/oracle/10gR2_db<br>kernel.shmmax = 536870912kernelvzctl exec 1001 ln -s /usr/lib/libstdc++.so.6.shmmni = 4096kernel0.sem = 250 32000 100 1283fs/usr/lib/libstdc++.so.file-max = 655365<br>net.ipv4.ip_local_port_range = 1024 65000<br>net'''Put these values in /etc/sysctl.core.rmem_default=262144netconf on the HN'''<br><br>kernel.core.wmem_defaultshmall =2621442097152<br>netkernel.core.rmem_maxshmmax =262144536870912<br>netkernel.coreshmmni = 4096<br>kernel.wmem_maxsem =262144250 32000 100 128<br>fs.file-max = 65536<br>'''Execute on the HN'''net.ipv4.ip_local_port_range = 1024 65000<br>net.core.rmem_default=262144<br>/sbin/sysctl -pnet.core.wmem_default=262144<br>net.core.rmem_max=262144<br>net.core.wmem_max=262144<br><br>At this point '''Execute on the VE is ready for Oracle installation.HN'''<br><br>We take a backup of /sbin/sysctl -p<br><br><br><br>At this point the VE at this point in is ready for Oracle installation.<br>We take a backup of the VE at this point in case we need to rebuild the system or do a clean Oracle install<br><br>'''Shutdown the VE 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 again'''<br><br>vzctl start 1001<br><br>'''Copy the downloaded Oracle zip file to the VE and change its ownership to oracle on the VE'''<br><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>'''Now login as oracle on the ve-1001'''<br><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 can run xterm<br><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 on the HN node.''' <br><br>This backup will allow you to restore the VE to the point where no database 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><br></body></html>
5
edits