【Oracle Database】Oracle RAC(三):Grid

[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 <<EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aio-max-nr=1048576
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
EOF
[root@wallet01 ~]# sysctl -p

[root@wallet01 ~]# cat >> /etc/security/limits.conf <<EOF
grid            soft    nproc           2047    
grid            hard    nproc           16384
grid            soft    nofile          1024
grid            hard    nofile          65536
EOF

[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_profile
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0.4/grid
export PATH=$ORACLE_HOME/bin:$PATH
export 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 <<EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aio-max-nr=1048576
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
EOF
[root@wallet02 ~]# sysctl -p

[root@wallet02 ~]# cat >> /etc/security/limits.conf <<EOF
grid            soft    nproc           2047    
grid            hard    nproc           16384
grid            soft    nofile          1024
grid            hard    nofile          65536
EOF

[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_profile
export ORACLE_SID=+ASM2
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0.4/grid
export PATH=$ORACLE_HOME/bin:$PATH
export 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 dsa
Generating 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@wallet01
The 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 dsa
Generating 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@wallet02
The 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 2019
wallet01
Tue Apr 30 17:34:33 CST 2019
wallet02

[grid@wallet02 ~]$ (ssh wallet01 "date;hostname";ssh wallet02 "date;hostname")
Tue Apr 30 17:34:42 CST 2019
wallet01
Tue Apr 30 17:34:42 CST 2019
wallet02

[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


猜你喜欢

转载自blog.51cto.com/13598811/2387786
今日推荐