Software and Hardware Requirements - Prakash's DBA Blog



Implementation of 11gR2 RAC on LinuxProcedure for creating a 2 node 11g RAC Database. This note provides step-by-step instructions to install and configure Oracle 11g R2 RAC Database on Cent OS. It also includes steps to configure Linux for Oracle. This walkthrough uses a two nodes cluster using shared SCSI disks between the nodes. The note assumes that the hardware is in place, OS is installed, network is setup (public and private networks) and the shared disks are also in place. Our configuration uses the following:Software and Hardware RequirementsHardware RequirementsOracle requires 1.5 gigabytes (GB) of physical memory.Swap space must be equal to the amount of RAM allocated to the system.Oracle's temporary space (/tmp) must be at least 1 GB in size.A monitor that supports resolution of 1024 x 768 to correctly display the Oracle Universal Installer (OUI)The following table describes the disk space required for an Oracle installation:Table 1-1Minimum Disk Space RequirementsSoftware Installation LocationSize RequiredGrid Infrastructure homeOracle Database homeAtleast 4.5 GB SpaceAtleast 4 GB of SpaceShared storage disk spaceSizes of database and Flashback Recovery Area(Depends on the Requirement)Two Machines each with:1 CPU8 GB memory100 GB local disk with OS3 x 10 GB shared disks for RACMachine NamesRac1 and Rac2SoftwareOS: Cent OSOracle Clusterware 11gASM LIB RPM’S according to kernel version of OSOracle 11g RAC R2 Database softwareThis guide is divided into three main parts.Part I: Configure Linux for OraclePart II: Prepare the Shared DisksPart III: Install Oracle work RequirementsIt is recommended that you ensure each node contains at least two network interface cards (NICs). One NIC for public network and one NICs for private network to ensure high availability of the Oracle RAC cluster.Public and private interface names are must be the same on all nodes. For example, if eth0 is used as the public interface on node one, all other nodes require eth0 as the public interface.All public interfaces for each node should be able to communicate with all nodes within the cluster.All private interfaces for each node should be able to communicate with all nodes within the cluster.The hostname of each node must follow the RFC 952 standard (rfc/rfc952.txt). Hostnames that include an underscore ("_") are not permitted.Each node in the cluster requires the following IP address: One public IP addressOne private IP addressOne virtual IP addressThree single client access name (SCAN) addresses for the clusterOperating System RequirementsRed Hat Enterprise Linux 5.x AS x86_64Oracle Linux 5.x AS x86_64Cent OSConfiguring DNS SERVERS (if using dns and SCAN)dns>#rpm -qa | grep cache#rpm -qa | grep bind#cd /var/named/chroot/var/namednamed>#ls for*#ls rev*#cd#service named start#service named stop#service named start#service named restart#dig dns. (for checking dns is properly working)#cd /var/named/chroot/var/named#cat for2. Configuration to be done on RAC serversrac1>#hostname#vi /etc/resolv.confname server 192.168.233.224:wq#ssh 192.168.233.224rac2>#vi /etc/resolv.confname server 192.168.233.224:wqrac1> nslookup cluster-scan (where ns is name server)#lslookup rac2#nslookup dns.InstallationStep 1: (Node 1) Step 2: (Node 2)#cat /etc/passwd (or) cat /etc/shadow Same as Step 1#userdel -r oracle#cat /etc/group#groupdel oinstall#groupdel dbaStep 3: (Node 1)Step: 4 (Node 2)#groupadd -g 501 oinstallSame as Step 3#groupadd -g 502 dba#groupadd -g 503 oper#groupadd -g 504 asmadmin#groupadd -g 506 asmdba#groupadd -g 507 asmoper#useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid #passwd #useradd -u 502 -g oinstall -G dba,asmdba oracle#passwd oracle#id grid#id oracleStep 5: (Node 1)Step 6: (Node 2)same as step 5Creating directory structures for grid home,dbhome, oracle base and oracle inventory#mkdir -p /u01/app/grid#chown -R grid:oinstall /u01/app/grid#chmod -R /u01/app/grid#mkdir -p /u01/product/11.2.0/grid_home#chown -R grid:oinstall /u01/product/11.2.0/grid_home#chmod -R 775 /u01/product/11.2.0/grid_homeNote: Grid home should not be under grid base#mkdir -p /u01/app/oracle#chown -R oracle:oinstall /u01/app/oracle#chmod -R 775 /u01/app/oracle#mkdir -p /u01/app/oracle/product/11.2.0/db_home#chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_home#chmod -R 775 /u01/app/oracle/product/11.2.0/db_homeCreating directory for inventory#mkdir -p /u01/app/oraInventory#chown -R grid:oinstall /u01/app/oraInventory#chmod -R 775 /u01/app/oraInventoryStep 7: (Node 1)Configuring Kernel ParametersNote: If OS is Redhat we need to configure the kernel parametersas oracle installation document and if os is OEL by defaultKERNEL parameters are set#cat /etc/sysctl.conf | more# Vi /etc/sysctl.conffs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 1054504960kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048586# /sbin/sysctl –p#scp /etc/sysctl.conf rac2:/etc/sysctl.confAdd the following lines to the "/etc/pam.d/login" file, if it does not already exist.session required pam_limits.soChange the setting of SELinux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.SELINUX=permissiveAlternatively, this alteration can be done using the GUI tool (System > Administration > Security Level and Firewall). Click on the SELinux tab and disable the feature.If you have the Linux firewall enabled, you will need to disable or configure it, The following is an example of disabling the firewall.# service iptables stop# chkconfig iptables offStep 8: (Node 1) Configuring shell limits# vi /etc/security/limits.confgrid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536:wq#cd /etc/security#scp limits.conf rac2:/etc/security/limits.conf#cdStep 9 : Node 1 Configuring Profile#vi /etc/profileif [ $USER = “oracle” ] || [ $USER = “grid” ]; thenif [ $SHELL = ” /bin/ksh” ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022fi:wq!#cd /etc#scp profile rac2:/etc/profileStep 10: (Node 1) Configuring /etc/hostsrac1>vi /etc/hosts127.0.0.1 localhost.localdomainlocalhost192.168.233.224 dns dns. (if we r using dns server)***PUBLIC IPS***192.168.233.40rac1 rac1.192.168.233.41 rac2 rac2.***PRIVATE IPS***192.168.233.50 rac1-priv192.168.233.51 rac2-priv***VIRTUAL IPS***192.168.233.60 rac1-vip192.168.233.61rac2-vip***SCAN IPS***192.168.233.101 cluster-scan192.168.233.102 cluster-scan192.168.233.102 cluster-scan#cd /etc/#scp hosts rac2:/etc/hostsStep 11: (Node 1)Creating the required no. of partitions in the shared storage for asm diskgroups#fdisk -l#fdisk /dev/sdb:p:np1enter+2g:nE2enterenterp:nLenter+10gnLenter+10gnLenter+10gp:wqStep: 12 (Node 1)Step: 13 (Node 2)# partprobe #partprobe Note: If you are implementing ASM using asmlibinterface, incase of redhat linux we need to downloadasm rpm’s based on kernel versionNote: Incase of OEL all asm rpm’s are installed by defaultexcept asmlib which needs to be installed manuallyAdd Required RPMs.Oracle 11.2.0.3 requires extra RPMs from the install media.The following command should load all needed RPMs for 11.2.0.3 Grid and Database.[root@rac1 and rac2 ~]# cd "/media/CentOS_6.3_Final/Packages/" rpm -ivh compat-libstdc++-33-3.2.3-69.el6.*.rpm \ elfutils-devel-0.152-1.el6.x86_64.rpm \ elfutils-libelf-devel-0.152-1.el6.x86_64.rpm \ gcc-c++-4.4.6-4.el6.x86_64.rpm \ glibc-2.12-1.80.el6.i686.rpm \ glibc-devel-2.12-1.80.el6.i686.rpm \ libaio-devel-0.3.107-10.el6.x86_64.rpm \ libaio-0.3.107-10.el6.i686.rpm \ libgcc-4.4.6-4.el6.i686.rpm \ libstdc++-devel-4.4.6-4.el6.x86_64.rpm \ libtool-ltdl-2.2.6-15.5.el6.i686.rpm \ nss-softokn-freebl-3.12.9-11.el6.i686.rpm \ readline-6.0-4.el6.i686.rpm \ ncurses-libs-5.7-3.20090208.el6.i686.rpm \ libcap-2.16-5.5.el6.i686.rpm \ libattr-2.4.44-7.el6.i686.rpm \ compat-libcap1-1.10-1.*.rpmrac1>rpm -qa | grep oracle#uname -r#cd /optopt># rpm -ivh oracleasmlib*#scp -r oracleasmlib* rac2:/opt step 10: (Node 2)rac2>rpm -qa | grep oracle#cd /optopt> # ls#rpm -ivh oracleasmlib*Step 14: (Node 1)Install cvu (cluster verification utility)disk rpm from the media#cd /optopt> # ls#cd grid/#ls#cd rpm#ls#rpm -ivh cvuqdisk….rpm#scp cvuqdisk…rpm rac2:/opt step 12:( Node 2)rac1> # cd /optopt> # rpm -ivh cvuqdisk*Step 15-16: (Node 1 and Node 2)rac1 & rac2> #oracleasm configure -i :grid :asmadmin :y :y :doneStep 17: (Node 1)# oracleasm initStep 18: (Node 1) Step 19: (Node 2)rac1> # fdisk –l rac2> # oracleasm scandisks #oracleasm createdisk VOL1 /dev/sdb5 # oracleasm listdisks#oracleasm createdisk VOL2 /dev/sdb6#oracleasm createdisk VOL3 /dev/sdb7#oracleasm scandisks#oracleasm listdisks Step 20: (Node 1)Installing oracle grid Infrastructure services:#su – grid$cd /opt$ls$cd grid$ls$./runcluvfy.sh stage -post hwos -n rac1,rac2 -verbose$./runInstaller.skip software updatesnext.Install and configure oracle grid infrastructure for clusternextnext.Advanced installationnextnextcluster name: lnx-clusterscan name: cluster-scanscan port:1521uncheck configure DNSnextclick on addHostname:rac2virtual IP name:rac2-vipclick on okclick on ssh connectivityOS password :racdbaclick on setupclick on okclick on testclick on oknextselect eth0choose publicselect eth1choose privateselect vibrochoose do not usenext.choose asmnextDisk group name : ASM_DG_CRS.external redundancyselect on disk pathnextspecify password: racdbaclick on yesnext.DO NOT use inteligent managementnextnextsoftware location:/u01/product/11.2.0/grid_homenextInventory Directory: /u01/app/oraInventorynextclick on ignore allnextINSTALLrac1> /u01/app/oraInventory/oraInstRoot.shrac1> /u01/product/11.2.0/grid_home/root.shclick on okclick on nextclick on closeNote: Cluster verification utility fails its ok ( its a bug)Note: If root.sh fails on 2nd node as error ASM failed root.crs.pl failedsolution:on all nodes modifystep 1: # vi /etc/sysconfig/oracleasmORACLEASM_SCANORDER=”dm”ORACLEASM_SCANEXCLUDE=”sd”step 2: Restart asmlib on all nodes except 1st nodes#/etc/init.d/oracleasm restartstep 3: Deconfigure root.sh (except 1st node)$grid_home/crs/install/rootcrs.pl -verbose -deconfig -forcestep 4: Run root.sh on 2nd node from#cd /grid_home/#./root.shStep 21: Installing Oracle Binaries# su – oracle$ xhost +$vncserver$cd /opt$ls$cd database$ls$sh runInstaller.uncheck i wish to receive security updatesnextclick on yesskip software updatesnext.Install database software onlynext.oracle rac installtionclick on SSH connectivityoracle password : oracleclick on setupclick on okclick on testclick on oknextnext.enterprise editionnextoracle base: /u01/app/oracleoracle_home: /u01/app/oracle/product/11.2.0/db_homenextnextIgnore allnextInstallrac1>/u01/app/oracle/product/11.2.0/db_homeclick on okclick on closeStep 22: Configuring ASM (Node 1)configuring bash profile#ssh rac1#su – grid#vi .bash_profileexport ORACLE_HOME=/u01/product/11.2.0/grid_homeexport PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:wq$. .bash_profile$scp .bash_profile rac2:/home/gridStep 23: Configuring ASMCA (Node 1)rac1>$ asmcaclick on createdisk group name :ASM_DG_DATA.external redundancyselect one disk pathclick on okclick on createdisk group name :ASM_DG_FRA.external redundancyselect one disk pathclick on okclick on exitYesStep 24: Configuring bash profile (Node 1)rac1> #su – oraclerac1> $vi .bash_profileexport ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_homeexport PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:wq$. .bash_profile$scp .bash_profile rac2:/home/oracleStep 25: Configuring ASMCA (Node 1)rac1> $dbca.oracle rac databasenext.create databasenextnextGlobal database name:hrmsselect allnextnextnext.use the same administrative passwordpassword: racdbanextYes.use common location for all datafilesDatabase file location:nextspecify asm password:.enable archivingclick on browse.select ASM_DG_FRAclick on okclick on edit archive mode parametersnext ----next----next--- nextfinishok (It will take time more than 30 mints) ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download