【Oracle Database】Oracle RAC(三):Grid Infrastructure
[root@wallet01 ~]# cat >> /etc/hosts <<EOF# Public Network - (eth0) 192.168.40.34 wallet01 192.168.40.35 wallet02 # Public Virtual IP (VIP) addresses - (eth0:1) 192.168.40.134 wallet01-vip 192.168.40.135 wallet02-vip EOF [root@wallet01 ~]# yum -y install gcc gcc-c++ glibc glibc-common ksh make sysstat \binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static \glibc-devel glibc-headers libaio libaio-devel libstdc++ libstdc++-devel unixODBC unixODBC-devel[root@wallet01 ~]# CVUQDISK_GRP=oinstall[root@wallet01 ~]# export CVUQDISK_GRP[root@wallet01 ~]# rpm -ivh cvuqdisk-1.0.9-1.rpm[root@wallet01 ~]# /sbin/service ntpd stop[root@wallet01 ~]# chkconfig ntpd off[root@wallet01 ~]# mv /etc/ntp.conf /etc/ntp.conf.backup[root@wallet01 ~]# cat >> /etc/sysctl.conf <<EOFkernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576fs.aio-max-nr=1048576net.ipv4.conf.default.rp_filter = 0net.ipv4.conf.all.rp_filter = 0EOF[root@wallet01 ~]# sysctl -p[root@wallet01 ~]# cat >> /etc/security/limits.conf <<EOFgrid soft nproc 2047 grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536EOF[root@wallet01 ~]# mkdir -p /u01/app/grid[root@wallet01 ~]# mkdir -p /u01/app/11.2.0.4/grid[root@wallet01 ~]# chown -R grid:oinstall /u01[root@wallet01 ~]# su - grid[grid@wallet01 ~]$ vi .bash_profileexport ORACLE_SID=+ASM1export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0.4/gridexport PATH=$ORACLE_HOME/bin:$PATHexport DISPLAY=192.168.1.100:0[root@wallet02 ~]# cat >> /etc/hosts <<EOF# Public Network - (eth0) 192.168.40.34 wallet01 192.168.40.35 wallet02 # Public Virtual IP (VIP) addresses - (eth0:1) 192.168.40.134 wallet01-vip 192.168.40.135 wallet02-vip EOF [root@wallet02 ~]# yum -y install gcc gcc-c++ glibc glibc-common ksh make sysstat \binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static \glibc-devel glibc-headers libaio libaio-devel libstdc++ libstdc++-devel unixODBC unixODBC-devel[root@wallet02 ~]# CVUQDISK_GRP=oinstall[root@wallet02 ~]# export CVUQDISK_GRP[root@wallet02 ~]# rpm -ivh cvuqdisk-1.0.9-1.rpm[root@wallet02 ~]# /sbin/service ntpd stop[root@wallet02 ~]# chkconfig ntpd off[root@wallet02 ~]# mv /etc/ntp.conf /etc/ntp.conf.backup[root@wallet02 ~]# cat >> /etc/sysctl.conf <<EOFkernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576fs.aio-max-nr=1048576net.ipv4.conf.default.rp_filter = 0net.ipv4.conf.all.rp_filter = 0EOF[root@wallet02 ~]# sysctl -p[root@wallet02 ~]# cat >> /etc/security/limits.conf <<EOFgrid soft nproc 2047 grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536EOF[root@wallet02 ~]# mkdir -p /u01/app/grid[root@wallet02 ~]# mkdir -p /u01/app/11.2.0.4/grid[root@wallet02 ~]# chown -R grid:oinstall /u01[root@wallet02 ~]# su - grid[grid@wallet02 ~]$ vi .bash_profileexport ORACLE_SID=+ASM2export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0.4/gridexport PATH=$ORACLE_HOME/bin:$PATHexport DISPLAY=192.168.1.100:0[root@wallet01 ~]# su - grid[grid@wallet01 ~]$ mkdir ~/.ssh[grid@wallet01 ~]$ chmod 700 ~/.ssh[grid@wallet01 ~]$ /usr/bin/ssh-keygen -t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/grid/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/grid/.ssh/id_dsa.Your public key has been saved in /home/grid/.ssh/id_dsa.pub.The key fingerprint is:ec:e1:da:39:d5:33:d1:46:e9:43:4d:92:a6:fa:fb:4b grid@wallet01The key's randomart image is:+--[ DSA 1024]----+| .=.|| *..|| B || . o = || S o o . || o .o + || o. . oE || o.. .. || . o. .oo. |+-----------------+[grid@wallet01 ~]$ touch ~/.ssh/authorized_keys[root@wallet02 ~]# su - grid[grid@wallet02 ~]$ mkdir ~/.ssh[grid@wallet02 ~]$ chmod 700 ~/.ssh[grid@wallet02 ~]$ /usr/bin/ssh-keygen -t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/grid/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/grid/.ssh/id_dsa.Your public key has been saved in /home/grid/.ssh/id_dsa.pub.The key fingerprint is:7a:f9:18:01:fa:13:5a:22:4f:0b:d9:11:e0:7c:42:17 grid@wallet02The key's randomart image is:+--[ DSA 1024]----+| o.E. || + . . || + o . || = o . || + = o S || = * o o || + + + || o + || . . |+-----------------+[grid@wallet01 ~]$ ssh wallet01 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys[grid@wallet01 ~]$ ssh wallet02 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys[grid@wallet01 ~]$ scp ~/.ssh/authorized_keys wallet02:.ssh/authorized_keys[grid@wallet01 ~]$ (ssh wallet01 "date;hostname";ssh wallet02 "date;hostname")Tue Apr 30 17:34:33 CST 2019wallet01Tue Apr 30 17:34:33 CST 2019wallet02[grid@wallet02 ~]$ (ssh wallet01 "date;hostname";ssh wallet02 "date;hostname")Tue Apr 30 17:34:42 CST 2019wallet01Tue Apr 30 17:34:42 CST 2019wallet02[grid@wallet01 ~]$ unzip p13390677_112040_Linux-x86-64_3of7.zip[grid@wallet01 ~]$ cd grid[grid@wallet01 grid]$ ./runcluvfy.sh stage -pre crsinst -n wallet01,wallet02 -fixup -verbose >check1.txt[grid@wallet01 grid]$ ./runInstaller
[root@wallet01 ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[root@wallet01 ~]# /u01/app/11.2.0.4/grid/root.shPerforming root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/11.2.0.4/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite.The contents of "oraenv" have not changed. No need to overwrite.The contents of "coraenv" have not changed. No need to overwrite.Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationInstalling Trace File AnalyzerOLR initialization - successful root wallet root wallet cert root cert export peer wallet profile reader wallet pa wallet peer wallet keys pa wallet keys peer cert request pa cert request peer cert pa cert peer root cert TP profile reader root cert TP pa root cert TP peer pa cert TP pa peer cert TP profile reader pa cert TP profile reader peer cert TP peer user cert pa user certAdding Clusterware entries to upstartCRS-2672: Attempting to start 'ora.mdnsd' on 'wallet01'CRS-2676: Start of 'ora.mdnsd' on 'wallet01' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'wallet01'CRS-2676: Start of 'ora.gpnpd' on 'wallet01' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'wallet01'CRS-2672: Attempting to start 'ora.gipcd' on 'wallet01'CRS-2676: Start of 'ora.cssdmonitor' on 'wallet01' succeededCRS-2676: Start of 'ora.gipcd' on 'wallet01' succeededCRS-2672: Attempting to start 'ora.cssd' on 'wallet01'CRS-2672: Attempting to start 'ora.diskmon' on 'wallet01'CRS-2676: Start of 'ora.diskmon' on 'wallet01' succeededCRS-2676: Start of 'ora.cssd' on 'wallet01' succeededASM created and started successfully.Disk Group OCRVDISK created successfully.clscfg: -install mode specifiedSuccessfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'root'..Operation successful.CRS-4256: Updating the profileSuccessful addition of voting disk 7804bca6d2c44fe8bf9999cdf153bd4d.Successful addition of voting disk 779015a5f9244f4abfb7732e58abdb09.Successful addition of voting disk 4e4c64b2b3994f17bfab1a15f9e86b9b.Successfully replaced voting disk group with +OCRVDISK.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced## STATE File Universal Id File Name Disk group-- ----- ----------------- --------- --------- 1. ONLINE 7804bca6d2c44fe8bf9999cdf153bd4d (ORCL:DISK1) [OCRVDISK] 2. ONLINE 779015a5f9244f4abfb7732e58abdb09 (ORCL:DISK2) [OCRVDISK] 3. ONLINE 4e4c64b2b3994f17bfab1a15f9e86b9b (ORCL:DISK3) [OCRVDISK]Located 3 voting disk(s).CRS-2672: Attempting to start 'ora.asm' on 'wallet01'CRS-2676: Start of 'ora.asm' on 'wallet01' succeededCRS-2672: Attempting to start 'ora.OCRVDISK.dg' on 'wallet01'CRS-2676: Start of 'ora.OCRVDISK.dg' on 'wallet01' succeededConfigure Oracle Grid Infrastructure for a Cluster ... succeeded[root@wallet02 ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[root@wallet02 ~]# /u01/app/11.2.0.4/grid/root.shPerforming root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/11.2.0.4/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ...Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationInstalling Trace File AnalyzerOLR initialization - successfulAdding Clusterware entries to upstartCRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node wallet01, number 1, and is terminatingAn active cluster was found during exclusive startup, restarting to join the clusterConfigure Oracle Grid Infrastructure for a Cluster ... succeeded
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。