当前位置:文档之家› VirtualBox安装3节点oracle11GRAC(超级详细)

VirtualBox安装3节点oracle11GRAC(超级详细)

使用vbox创建oracle11GR2 --3节点rac操作系统cenos6.5数据库版本11.2.0.4修改服务器的配置文件:配置网卡cd /etc/sysconfig/network-scripts/关闭防火墙chkconfig iptables offiptables –Fiptables –L关闭内核防火墙:vi /etc/sysconfig/selinux修改hosts内容:192.168.1.110 rac1 192.168.1.111 rac2 192.168.1.112 rac3 #virtual192.168.1.120 rac1-vip 192.168.1.121 rac2-vip 192.168.1.122 rac3-vip #eth1 private18.1.30.50 rac1-priv 18.1.30.51 rac2-priv 18.1.30.52 rac3-priv #scan192.168.1.130 rac-scan给系统打补丁包:之后给系统打包(这个应该先做后调网络)binutils-2.17.50.0.6compat-libstdc++-33-3.2.3compat-libstdc++-33-3.2.3 (32 bit)elfutils-libelf-0.125elfutils-libelf-devel-0.125gcc-4.1.2gcc-c++-4.1.2glibc-2.5-24glibc-2.5-24 (32 bit)glibc-common-2.5glibc-devel-2.5glibc-devel-2.5 (32 bit)libaio-0.3.106libaio-0.3.106 (32 bit)libaio-devel-0.3.106libaio-devel-0.3.106 (32 bit)libgcc-4.1.2libgcc-4.1.2 (32 bit)libstdc++-4.1.2libstdc++-4.1.2 (32 bit)libstdc++-devel 4.1.2make-3.81sysstat-7.0.2yum install XXXXX所有节点执行:[root@rac1 ~]# vi /etc/sysconfig/networkNETWORKING=yesNETWORKING_IPV6=noHOSTNAME=rac1建两个用户和组groupadd oinstallgroupadd dbauseradd -g oinstall -G dba griduseradd -g oinstall -G dba oracleecho -n yangbo|passwd --stdin gridecho -n yangbo|passwd --stdin oraclemkdir -p /u02/app/11.2.0/gridmkdir -p /u02/app/gridmkdir -p /u02/app/oraclechown grid:oinstall /u02/app/11.2.0/gridchown grid:oinstall /u02/app/gridchown -R oracle:oinstall /u02/app/oraclechmod -R 775 /u02/chown -R grid:oinstall /u02修改系统参数sed -i 's/kernel.shmmax/#kernel.shmmax/g' /etc/sysctl.conf sed -i 's/kernel.shmall/#kernel.shmall/g' /etc/sysctl.confcat >> /etc/sysctl.conf << EOFfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 1073741824kernel.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 = 1048586EOF配置/etc/security/limits.confcat >> /etc/security/limits.conf << EOForacle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 10240EOF用户环境变量Oracle:(vi ~/bash_profiel)umask 022unset ORA_NLS10export ORACLE_BASE=/u02/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=base1export NLS_LANG=american_america.zhs16gbkexport NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/binexport PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATH=${PATH}:$ORACLE_BASE/common/oracle/binexportORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/adminexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport CLASSPATH=$ORACLE_HOME/JREexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib#export ORA_NLS10=$ORACLE_HOME/nls/dataexport THREADS_FLAG=nativeexport TEMP=/tmpexport TMPDIR=/tmpgrid用户的变量(vi ~/bash_profiel)umask 022unset ORA_NLS10export ORACLE_BASE=/u02/app/gridexport ORACLE_HOME=/u02/app/11.2/gridexport ORACLE_SID=+ASM1export NLS_LANG=american_america.zhs16gbkexport NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/binexport PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATH=${PATH}:$ORACLE_BASE/common/oracle/binexportORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_TERM=xtermexport TNS_ADMIN=$ORACLE_HOME/network/admin#export ORA_NLS10=$ORACLE_HOME/nls/dataexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport CLASSPATH=$ORACLE_HOME/JREexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibexport CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlibexport THREADS_FLAG=nativeexport TEMP=/tmpexport TMPDIR=/tmp八.配置NTP服务8.1节点1sed -i 's/OPTIONS/#OPTIONS/g' /etc/sysconfig/ntpdB.cat >> /etc/sysconfig/ntpd << EOFOPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"EOFC.mv /etc/ntp.conf /etc/ntp.confbakD.cat > /etc/ntp.conf << EOFrestrict 0.0.0.0 mask 0.0.0.0 nomodifyserver 127.127.1.0fudge 127.127.1.0 stratum 10driftfile /var/lib/ntp/driftbroadcastdelay 0.008authenticate nokeys /etc/ntp/keysEOF8.2节点2A.sed -i 's/OPTIONS/#OPTIONS/g' /etc/sysconfig/ntpdB.cat >> /etc/sysconfig/ntpd << EOFOPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"EOFC.mv /etc/ntp.conf /etc/ntp.confbakD.cat >> /etc/ntp.conf << XLrestrict default kod nomodify notrap nopeer noquery restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap restrict 127.0.0.1server 192.168.8.199server 127.127.1.0 # local clockfudge 127.127.1.0 stratum 10driftfile /var/lib/ntp/driftbroadcastdelay 0.008authenticate nokeys /etc/ntp/keysXL8.3启动服务(双节点执行)#service ntpd restart8.4系统启动自动加载(双节点执行)#chkconfig ntpd on 关闭虚拟机:添加磁盘控制器;创建共享磁盘修改共享磁盘属性为可共享:调整RAC2的控制器:修改其他两个节点的网络配置和主机名配置oracle、grid用户的ssh对等性Oracle用户ssh对等性配置Oracle对等性配置Rac1节点[root@rac1 ~]# su - oraclerac1-> clearrac1-> mkdir ~/.sshrac1-> chmod 755 ~/.ssh/rac1-> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/oracle/.ssh/id_rsa. Your public key has been saved in /home/oracle/.ssh/id_rsa.pub. The key fingerprint is:26:c6:8a:60:1b:78:c3:6d:09:b0:c0:f3:a3:e5:ff:ce oracle@rac1 The key's randomart image is:+--[ RSA 2048]----+|+ ||.= ||. + ||.. * o ||ooB = + S ||.+o= o o || .. o || .. || oE |+-----------------+rac1-> ssh-keygen -t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_dsa): Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/oracle/.ssh/id_dsa. Your public key has been saved in /home/oracle/.ssh/id_dsa.pub. The key fingerprint is:d0:05:5d:0c:5b:72:42:87:f8:e8:04:66:e4:b5:bd:8c oracle@rac1 The key's randomart image is:+--[ DSA 1024]----+| .. o=*== || .+o.+oB. || oo.ooo || .oo.. || oE o || . || || || |+-----------------+rac1-> cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keysrac1-> cat ~/.ssh/id_dsa.pub >> .ssh/authorized_keysrac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysoracle@rac2's password:rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysoracle@rac2's password:rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keysoracle@rac2's password:authorized_keys 100% 1992 2.0KB/s 00:00rac1-> ssh rac3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysoracle@rac3's password:rac1-> ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysoracle@rac2's password:rac1-> scp ~/.ssh/authorized_keys rac3:~/.ssh/authorized_keysoracle@rac3's password:authorized_keys 100% 1992 2.0KB/s 00:00Rac2节点[root@rac2 ~]# su - oraclerac2-> mkdir ~/.sshrac2-> chmod 755 .ssh/rac2-> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/oracle/.ssh/id_rsa.Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.The key fingerprint is:92:05:4d:35:d2:c9:da:21:b4:06:43:bb:ef:4c:6e:45 oracle@rac2The key's randomart image is:+--[ RSA 2048]----+| .=+++o. || =oo=. || . ++ . || =. E || + S. || o . || o. || =. || .+ |+-----------------+rac2-> ssh-keygen -t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_dsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/oracle/.ssh/id_dsa.Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.The key fingerprint is:99:00:7e:00:b1:a9:d8:45:68:03:4c:ce:ce:ef:30:0d oracle@rac2The key's randomart image is:+--[ DSA 1024]----+|+oo++ ||o.+= o || +o.o o ||+o . . . o ||oE. S || + || o o || + || . |+-----------------+rac2-> cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keysrac2-> cat ~/.ssh/id_dsa.pub >> .ssh/authorized_keysrac2-> ssh rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.rac2-> ssh rac1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysrac2-> scp ~/.ssh/authorized_keys rac1:~/.ssh/authorized_keysauthorized_keys 100% 2988 2.9KB/s 00:00rac1-> ssh rac3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysoracle@rac3's password:rac1-> ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysoracle@rac2's password:rac1-> scp ~/.ssh/authorized_keys rac3:~/.ssh/authorized_keysoracle@rac3's password:authorized_keys 100% 1992 2.0KB/s 00:00Rac3节点[root@rac2 ~]# su - oraclerac2-> mkdir ~/.sshrac2-> chmod 755 .ssh/rac2-> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/oracle/.ssh/id_rsa.Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.The key fingerprint is:92:05:4d:35:d2:c9:da:21:b4:06:43:bb:ef:4c:6e:45 oracle@rac2The key's randomart image is:+--[ RSA 2048]----+| .=+++o. || =oo=. || . ++ . || =. E || + S. || o . || o. || =. || .+ |+-----------------+rac2-> ssh-keygen -t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_dsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/oracle/.ssh/id_dsa.Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.The key fingerprint is:99:00:7e:00:b1:a9:d8:45:68:03:4c:ce:ce:ef:30:0d oracle@rac2The key's randomart image is:+--[ DSA 1024]----+|+oo++ ||o.+= o || +o.o o ||+o . . . o ||oE. S || + || o o || + || . |+-----------------+rac2-> cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keysrac2-> cat ~/.ssh/id_dsa.pub >> .ssh/authorized_keysrac2-> ssh rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.rac2-> ssh rac1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysrac2-> scp ~/.ssh/authorized_keys rac1:~/.ssh/authorized_keysauthorized_keys 100% 2988 2.9KB/s 00:00rac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysoracle@rac2's password:rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysoracle@rac2's password:rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keysoracle@rac3's password:authorized_keys 100% 1992 2.0KB/s 00:00 Oracle用户对等性检测Rac1节点rac1-> ssh rac2 dateTue Jun 17 12:35:32 CST 2014rac1-> ssh rac3 dateTue Jun 17 12:35:32 CST 2014rac1-> ssh rac1 dateThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts. Tue Jun 17 12:35:39 CST 2014rac1-> ssh rac1 dateTue Jun 17 12:35:42 CST 2014rac1-> ssh rac1-priv dateThe authenticity of host 'rac1-priv (172.16.1.1)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1-priv,172.16.1.1' (RSA) to the list of known hosts. Tue Jun 17 12:42:40 CST 2014rac1-> ssh rac1-priv dateTue Jun 17 12:42:43 CST 2014rac1-> ssh rac2-priv dateThe authenticity of host 'rac2-priv (172.16.1.2)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2-priv,172.16.1.2' (RSA) to the list of known hosts. Tue Jun 17 12:42:48 CST 2014rac1-> ssh rac2-priv dateTue Jun 17 12:42:50 CST 2014rac1-> ssh rac3-priv dateThe authenticity of host 'rac2-priv (172.16.1.2)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2-priv,172.16.1.2' (RSA) to the list of known hosts. Tue Jun 17 12:42:48 CST 2014rac1-> ssh rac3-priv dateTue Jun 17 12:42:50 CST 2014成功!!!Rac2节点rac2-> ssh rac1 dateTue Jun 17 12:43:06 CST 2014rac2-> ssh rac2 dateThe authenticity of host 'rac2 (192.168.37.22)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2,192.168.37.22' (RSA) to the list of known hosts. Tue Jun 17 12:43:11 CST 2014rac2-> ssh rac2 dateTue Jun 17 12:43:14 CST 2014rac2-> ssh rac3 dateThe authenticity of host 'rac2 (192.168.37.22)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2,192.168.37.22' (RSA) to the list of known hosts. Tue Jun 17 12:43:11 CST 2014rac2-> ssh rac3 dateTue Jun 17 12:43:14 CST 2014rac2-> ssh rac1-priv dateThe authenticity of host 'rac1-priv (172.16.1.1)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1-priv,172.16.1.1' (RSA) to the list of known hosts. Tue Jun 17 12:43:22 CST 2014rac2-> ssh rac1-priv dateTue Jun 17 12:43:24 CST 2014rac2-> ssh rac3-priv dateThe authenticity of host 'rac1-priv (172.16.1.1)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1-priv,172.16.1.1' (RSA) to the list of known hosts. Tue Jun 17 12:43:22 CST 2014rac2-> ssh rac3-priv dateTue Jun 17 12:43:24 CST 2014rac2-> ssh rac2-priv dateThe authenticity of host 'rac2-priv (172.16.1.2)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2-priv,172.16.1.2' (RSA) to the list of known hosts. Tue Jun 17 12:43:28 CST 2014rac2-> ssh rac2-priv dateTue Jun 17 12:43:31 CST 2014成功!!!Rac3节点rac2-> ssh rac1 dateTue Jun 17 12:43:06 CST 2014rac2-> ssh rac2 dateTue Jun 17 12:43:14 CST 2014rac2-> ssh rac3 dateThe authenticity of host 'rac2 (192.168.37.22)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2,192.168.37.22' (RSA) to the list of known hosts. Tue Jun 17 12:43:11 CST 2014rac2-> ssh rac3 dateTue Jun 17 12:43:14 CST 2014rac2-> ssh rac1-priv dateThe authenticity of host 'rac1-priv (172.16.1.1)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1-priv,172.16.1.1' (RSA) to the list of known hosts. Tue Jun 17 12:43:22 CST 2014rac2-> ssh rac1-priv dateTue Jun 17 12:43:24 CST 2014rac2-> ssh rac2-priv dateThe authenticity of host 'rac1-priv (172.16.1.1)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1-priv,172.16.1.1' (RSA) to the list of known hosts. Tue Jun 17 12:43:22 CST 2014rac2-> ssh rac2-priv dateTue Jun 17 12:43:24 CST 2014rac2-> ssh rac3-priv dateThe authenticity of host 'rac2-priv (172.16.1.2)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2-priv,172.16.1.2' (RSA) to the list of known hosts. Tue Jun 17 12:43:28 CST 2014rac2-> ssh rac3-priv dateTue Jun 17 12:43:31 CST 2014成功!!!Grid用户ssh对等性配置Grid用户对等性配置Rac1节点[root@rac1 ~]# su - gridrac1-> mkdir ~/.sshrac1-> chmod 755 ~/.ssh/rac1-> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/grid/.ssh/id_rsa): Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/grid/.ssh/id_rsa.Your public key has been saved in /home/grid/.ssh/id_rsa.pub.The key fingerprint is:99:cd:f4:44:a9:f1:23:16:40:d6:a9:b7:99:a0:e7:76 grid@rac1The key's randomart image is:+--[ RSA 2048]----+| .+o ... || . =.. || ..=. || o*=oo || .S+o=.. || . . + || o || o E || . . |+-----------------+rac1-> 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:03:60:03:14:2e:c1:77:ee:d2:55:46:00:4b:ac:bb:68 grid@rac1The key's randomart image is:+--[ DSA 1024]----+|o.+o=o..o. || + o.=. o ||. o +.. o || . . . o || + . S || o o . || . o || E . ||. |+-----------------+rac1-> cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keysrac1-> cat ~/.ssh/id_dsa.pub >> .ssh/authorized_keysrac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac2 (192.168.37.22)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2,192.168.37.22' (RSA) to the list of known hosts.grid@rac2's password:rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysgrid@rac2's password:rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keysgrid@rac2's password:authorized_keys 100% 1984 1.9KB/s 00:00rac1-> ssh rac3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac2 (192.168.37.22)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2,192.168.37.22' (RSA) to the list of known hosts.grid@rac2's password:rac1-> ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysgrid@rac2's password:rac1-> scp ~/.ssh/authorized_keys rac3:~/.ssh/authorized_keysgrid@rac2's password:authorized_keys 100% 1984 1.9KB/s 00:00 Rac2节点[root@rac2 ~]# su - gridrac2-> mkdir ~/.sshrac2-> chmod 755 ~/.ssh/rac2-> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/grid/.ssh/id_rsa): Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/grid/.ssh/id_rsa.Your public key has been saved in /home/grid/.ssh/id_rsa.pub.The key fingerprint is:ae:87:bc:30:60:98:98:d4:36:bb:60:d6:dd:df:3d:54 grid@rac2The key's randomart image is:+--[ RSA 2048]----+| || . || . + E ||o+o + . . ||=+oo . .S . ||o.... .. . o || .o. ... . o || oo.. . || oo |+-----------------+rac2-> 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:63:49:2d:9b:55:54:8a:52:d8:5e:4a:c0:fc:ff:ff:91 grid@rac2The key's randomart image is:+--[ DSA 1024]----+| o.+..o.. || +ooo.. || +++o. || . B+ || S . || . . . .|| . E || . .|| .+|+-----------------+rac2-> cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keysrac2-> cat ~/.ssh/id_dsa.pub >> .ssh/authorized_keysrac2-> ssh rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.rac2-> ssh rac1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysrac2-> scp ~/.ssh/authorized_keys rac1:~/.ssh/authorized_keysauthorized_keys 100% 2976 2.9KB/s 00:00rac2-> ssh rac3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.rac2-> ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysrac2-> scp ~/.ssh/authorized_keys rac3:~/.ssh/authorized_keysauthorized_keys 100% 2976 2.9KB/s 00:00Rac3节点[root@rac2 ~]# su - gridrac2-> mkdir ~/.sshrac2-> chmod 755 ~/.ssh/rac2-> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/grid/.ssh/id_rsa): Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/grid/.ssh/id_rsa.Your public key has been saved in /home/grid/.ssh/id_rsa.pub.The key fingerprint is:ae:87:bc:30:60:98:98:d4:36:bb:60:d6:dd:df:3d:54 grid@rac2The key's randomart image is:+--[ RSA 2048]----+| || . || . + E ||o+o + . . ||=+oo . .S . ||o.... .. . o || .o. ... . o || oo.. . || oo |+-----------------+rac2-> 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:63:49:2d:9b:55:54:8a:52:d8:5e:4a:c0:fc:ff:ff:91 grid@rac2The key's randomart image is:+--[ DSA 1024]----+| o.+..o.. || +ooo.. || +++o. || . B+ || S . || . . . .|| . E || . .|| .+|+-----------------+rac2-> cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keysrac2-> cat ~/.ssh/id_dsa.pub >> .ssh/authorized_keysrac2-> ssh rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.rac2-> ssh rac1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysrac2-> scp ~/.ssh/authorized_keys rac1:~/.ssh/authorized_keysauthorized_keys 100% 2976 2.9KB/s 00:00rac2-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.rac2-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keysrac2-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keysauthorized_keys 100% 2976 2.9KB/s 00:00Oracle用户对等性检测Rac1节点rac1-> iduid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023rac1-> ssh rac1 dateThe authenticity of host 'rac1 (192.168.37.21)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1,192.168.37.21' (RSA) to the list of known hosts.Tue Jun 17 13:10:05 CST 2014rac1-> ssh rac1 dateTue Jun 17 13:10:08 CST 2014rac1-> ssh rac2 dateTue Jun 17 13:10:12 CST 2014rac1-> ssh rac3 dateTue Jun 17 13:10:12 CST 2014rac1-> ssh rac1-priv dateThe authenticity of host 'rac1-priv (172.16.1.1)' can't be established.RSA key fingerprint is 53:b8:a1:de:30:e3:d4:80:17:d3:7f:f5:b2:9d:11:45.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac1-priv,172.16.1.1' (RSA) to the list of known hosts.Tue Jun 17 13:10:36 CST 2014rac1-> ssh rac1-priv dateTue Jun 17 13:10:37 CST 2014rac1-> ssh rac2-priv dateThe authenticity of host 'rac2-priv (172.16.1.2)' can't be established.RSA key fingerprint is c3:1c:e5:62:f2:35:87:4b:51:55:40:41:29:c7:bb:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'rac2-priv,172.16.1.2' (RSA) to the list of known hosts.Tue Jun 17 13:10:42 CST 2014rac1-> ssh rac2-priv dateTue Jun 17 13:10:45 CST 2014rac1-> ssh rac3-priv dateThe authenticity of host 'rac2-priv (172.16.1.2)' can't be established.。

相关主题