虽然在安装软件的过程中,oracle会自动配置SSH对等性,建议在安装软件之前手工配置。

配置oracle用户对等性:

node1:

[root@node1 ~]# su - oracle

node1-> env | grep ORA

ORACLE_UNQNAME=devdb

ORACLE_SID=devdb1

ORACLE_BASE=/u01/app/oracle

ORACLE_HOSTNAME=node1.localdomain

ORACLE_TERM=xterm

ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

node1-> pwd

/home/oracle

node1-> mkdir ~/.ssh

node1-> chmod 700 ~/.ssh

node1-> ls -al

total 44

drwx—— 4 oracle oinstall 4096 Apr 24 10:47 .

drwxr-xr-x 4 root   root     4096 Apr 24 09:41 ..

-rw——- 1 oracle oinstall    5 Apr 24 10:43 .bash_history

-rw-r–r– 1 oracle oinstall   33 Apr 24 09:41 .bash_logout

-rw-r–r– 1 oracle oinstall  823 Apr 24 09:41 .bash_profile

-rw-r–r– 1 oracle oinstall  124 Apr 24 09:41 .bashrc

-rw-r–r– 1 oracle oinstall  515 Apr 24 09:41 .emacs

drwxr-xr-x 4 oracle oinstall 4096 Apr 24 09:41 .mozilla

drwx—— 2 oracle oinstall 4096 Apr 24 10:47 .ssh

-rw-r–r– 1 oracle oinstall  658 Apr 24 09:41 .zshrc

node1-> ssh-keygen -t rsa

Generating 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:

4a:bd:22:4c:cc:6a:33:ae:5a:de:7d:7c:8b:77:9e:81 oracle@node1.localdomain

node1-> ssh-keygen -t dsa 

Generating 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:

8b:50:73:41:03:ad:1c:59:25:aa:40:1c:c9:5e:03:99 oracle@node1.localdomain

node1-> 

node2:

[root@node2 ~]# su - oracle

node2-> env|grep ORA

ORACLE_UNQNAME=devdb

ORACLE_SID=devdb2

ORACLE_BASE=/u01/app/oracle

ORACLE_HOSTNAME=node2.localdomain

ORACLE_TERM=xterm

ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

node2-> pwd

/home/oracle

node2-> ls -al

total 40

drwx—— 3 oracle oinstall 4096 Apr 24 10:45 .

drwxr-xr-x 4 root   root     4096 Apr 24 10:44 ..

-rw——- 1 oracle oinstall   10 Apr 24 10:49 .bash_history

-rw-r–r– 1 oracle oinstall   33 Apr 24 10:44 .bash_logout

-rw-r–r– 1 oracle oinstall  823 Apr 24 10:44 .bash_profile

-rw-r–r– 1 oracle oinstall  124 Apr 24 10:44 .bashrc

-rw-r–r– 1 oracle oinstall  515 Apr 24 10:44 .emacs

drwxr-xr-x 4 oracle oinstall 4096 Apr 24 10:44 .mozilla

-rw-r–r– 1 oracle oinstall  658 Apr 24 10:44 .zshrc

node2-> mkdir ~/.ssh

node2-> chmod 770 ~/.ssh/

node2-> ls -al

total 44

drwx—— 4 oracle oinstall 4096 Apr 24 10:49 .

drwxr-xr-x 4 root   root     4096 Apr 24 10:44 ..

-rw——- 1 oracle oinstall   10 Apr 24 10:49 .bash_history

-rw-r–r– 1 oracle oinstall   33 Apr 24 10:44 .bash_logout

-rw-r–r– 1 oracle oinstall  823 Apr 24 10:44 .bash_profile

-rw-r–r– 1 oracle oinstall  124 Apr 24 10:44 .bashrc

-rw-r–r– 1 oracle oinstall  515 Apr 24 10:44 .emacs

drwxr-xr-x 4 oracle oinstall 4096 Apr 24 10:44 .mozilla

drwxrwx— 2 oracle oinstall 4096 Apr 24 10:49 .ssh

-rw-r–r– 1 oracle oinstall  658 Apr 24 10:44 .zshrc

node2-> ssh-keygen -t rsa

Generating 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:

a0:64:81:a6:12:b2:18:4e:01:c3:bd:9d:f6:bb:55:b0 oracle@node2.localdomain

node2-> ssh-keygen -t dsa

Generating 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:

85:56:69:73:74:a3:ef:5b:88:d7:6d:ef:90:03:b6:72 oracle@node2.localdomain

node2-> 

返回节点1:

node1-> id

uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)

node1-> pwd

/home/oracle

node1-> cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys

node1-> cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys 

node1-> ssh node2 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys 

The authenticity of host 'node2 (172.16.0.192)' can't be established.

RSA key fingerprint is a7:6b:2c:2d:fb:c3:ff:33:af:92:cd:7b:99:3b:cf:3a.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node2,172.16.0.192' (RSA) to the list of known hosts.

oracle@node2's password: 

node1-> ssh node2 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys 

oracle@node2's password: 

node1-> scp ~/.ssh/authorized_keys node2:~/.ssh/authorized_keys 

oracle@node2's password: 

authorized_keys       

100% 2040     2.0KB/s   00:00  

node1-> 

验证oracle SSH对等性:

在node1,node2两个节点上分别执行下述命令,第一次执行时需要口令验证:

node1-> id

uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)

node1-> ssh node1 date

The authenticity of host 'node1 (172.16.0.191)' can't be established.

RSA key fingerprint is 16:c2:67:cd:73:dd:b7:8b:f4:07:ef:e0:fb:36:34:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node1,172.16.0.191' (RSA) to the list of known hosts.

Tue Apr 24 11:28:15 CST 2012

node1-> ssh node2 date

Tue Apr 24 11:28:18 CST 2012

node1-> ssh node1-priv date

The authenticity of host 'node1-priv (192.168.94.11)' can't be established.

RSA key fingerprint is 16:c2:67:cd:73:dd:b7:8b:f4:07:ef:e0:fb:36:34:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node1-priv,192.168.94.11' (RSA) to the list of known hosts.

Tue Apr 24 11:28:25 CST 2012

node1-> ssh node2-priv date

The authenticity of host 'node2-priv (192.168.94.12)' can't be established.

RSA key fingerprint is a7:6b:2c:2d:fb:c3:ff:33:af:92:cd:7b:99:3b:cf:3a.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node2-priv,192.168.94.12' (RSA) to the list of known hosts.

Tue Apr 24 11:28:30 CST 2012

node1-> ssh node1.localdomain date

The authenticity of host 'node1.localdomain (172.16.0.191)' can't be established.

RSA key fingerprint is 16:c2:67:cd:73:dd:b7:8b:f4:07:ef:e0:fb:36:34:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node1.localdomain' (RSA) to the list of known hosts.

Tue Apr 24 11:28:39 CST 2012

node1-> ssh node2.localdomain date

The authenticity of host 'node2.localdomain (172.16.0.192)' can't be established.

RSA key fingerprint is a7:6b:2c:2d:fb:c3:ff:33:af:92:cd:7b:99:3b:cf:3a.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node2.localdomain' (RSA) to the list of known hosts.

Tue Apr 24 11:28:46 CST 2012

node1-> ssh node2-priv.localdomain date

The authenticity of host 'node2-priv.localdomain (192.168.94.12)' can't be established.

RSA key fingerprint is a7:6b:2c:2d:fb:c3:ff:33:af:92:cd:7b:99:3b:cf:3a.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node2-priv.localdomain' (RSA) to the list of known hosts.

Tue Apr 24 11:28:52 CST 2012

node1-> ssh node1-priv.localdomain date

The authenticity of host 'node1-priv.localdomain (192.168.94.11)' can't be established.

RSA key fingerprint is 16:c2:67:cd:73:dd:b7:8b:f4:07:ef:e0:fb:36:34:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'node1-priv.localdomain' (RSA) to the list of known hosts.

Tue Apr 24 11:28:59 CST 2012

第二次执行时不再提示输入口令,并且可以成功执行命令,则表示oracle用户SSH对等性配置成功

node1:

node1-> ssh node1 date

Tue Apr 24 11:29:02 CST 2012

node1-> ssh node2 date

Tue Apr 24 11:29:07 CST 2012

node1-> ssh node1-priv date

Tue Apr 24 11:29:13 CST 2012

node1-> ssh node2-priv date

Tue Apr 24 11:29:18 CST 2012

node1-> ssh node2-priv.localdomain date

Tue Apr 24 11:29:27 CST 2012

node1-> ssh node1-priv.localdomain date

Tue Apr 24 11:29:33 CST 2012

node1-> 

node2:

node2-> id

uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)

node2-> pwd

/home/oracle

node2-> ssh node1 date

Tue Apr 24 11:32:06 CST 2012

node2-> ssh node2 date

Tue Apr 24 11:32:09 CST 2012

node2-> ssh node1-priv date

Tue Apr 24 11:32:14 CST 2012

node2-> ssh node2-priv date

Tue Apr 24 11:32:17 CST 2012

node2-> ssh node1.localdomain date

Tue Apr 24 11:32:26 CST 2012

node2-> ssh node2.localdomain date

Tue Apr 24 11:32:29 CST 2012

node2-> ssh node1-priv.localdomain date

Tue Apr 24 11:32:39 CST 2012

node2-> ssh node2-priv.localdomain date

Tue Apr 24 11:32:43 CST 2012

node2->

至此,Oracle用户SSH对等性配置完成!重复上述步骤,以grid用户配置其对等性。

Linux下搭建Oracle11g RAC(4)----配置oracle,grid用户SSH对等性的更多相关文章

  1. Linux下搭建Oracle11g RAC(5)----配置ASM磁盘

    将共享磁盘格式化.然后用asmlib将其配置为ASM磁盘,用于将来存放OCR.Voting Disk和数据库用. 注意:只需在其中1个节点上格式化就可以,接下来我们选择在node1节点上格式化. 这里 ...

  2. Linux下搭建Oracle11g RAC(2)----配置DNS服务器,确认SCAN IP可以被解析

    从Oracle 11gR2开始,引入SCAN(Single Client Access Name) IP的概念,相当于在客户端和数据库之间增加一层虚拟的网络服务层,即是SCAN IP和SCAP IP  ...

  3. Linux下搭建Oracle11g RAC(7)----安装Oracle 软件

    从此步骤开始,我们正式安装oracle软件: ① 以oracle用户登录图形界面,执行/home/oracle/database/runInstaller,进入OUI的图形安装界面: ② 进入OUI安 ...

  4. Linux下搭建Oracle11g RAC(3)----创建用户及配置相关文件

    配置11gR2 RAC需要安装Oracle Grid Infrastructure软件.Oracle数据库软件,其中Grid软件等同于Oracle 10g的Clusterware集群件.Oracle建 ...

  5. Linux下搭建Oracle11g RAC(6)----安装Grid Infrastructure

    从此步骤开始,我们正式安装Grid软件: ① 以grid用户登录图形界面,执行/home/grid/grid/runInstaller,进入OUI的图形安装界面: ② 进入OUI安装界面后,选择第3项 ...

  6. Linux下搭建Oracle11g RAC(8)----创建ASM磁盘组

    以grid用户创建ASM磁盘组,创建的ASM磁盘组为下一步创建数据库提供存储. ① grid用户登录图形界面,执行asmca命令来创建磁盘组: ② 进入ASMCA配置界面后,单击Create,创建新的 ...

  7. Linux下搭建Oracle11g RAC(1)----IP分配与配置IP

    首先需要说明的,我的RAC搭建不是在虚拟机上完成的,而是在实际部署中,二者之间有些许差异,本人水平有限,请见谅. 其中,每台机器至少需要配置3个IP地址,在安装操作系统的过程中,我们需要配置公网IP和 ...

  8. Linux下搭建Oracle11g RAC(9)----创建RAC数据库

    接下来,使用DBCA来创建RAC数据库. ① 以oracle用户登录图形界面,执行dbca,进入DBCA的图形界面,选择第1项,创建RAC数据库: ② 选择创建数据库选项,Next: ③ 选择创建通用 ...

  9. linux下一个Oracle11g RAC建立(五岁以下儿童)

    linux下一个Oracle11g RAC建立(五岁以下儿童) 四.建立主机之间的信任关系(node1.node2) 建立节点之间oracle .grid 用户之间的信任(通过ssh 建立公钥和私钥) ...

随机推荐

  1. POJ 1778 All Discs Considered(拓扑排序)

    点我看题目 题意 :其实题意我也说不清楚,因为比赛的时候我盯着看了1个小时也没看懂....就是两个磁盘,第一个有n1的安装包,编号为1~n1,第二个有n2个安装包,编号为n1~n2.给你d对关系,(x ...

  2. 李洪强iOS开发Swift篇—04_运算符

    李洪强iOS开发Swift篇—04_运算符 一.运算符 1.Swift所支持的部分运算符有以下一些 赋值运算符:= 复合赋值运算符:+=.-= 算术运算符:+.-.*./ 求余运算符:% 自增.自减运 ...

  3. ANDROID_MARS学习笔记_S02重置版_001_Hander\Looper\Message\Thread\ThreadLocal

    一. * class LooperThread extends Thread { * public Handler mHandler; * * public void run() { * Looper ...

  4. 【CF】259 Div.1 B Little Pony and Harmony Chest

    还蛮有趣的一道状态DP的题目. /* 435B */ #include <iostream> #include <string> #include <map> #i ...

  5. Linux Kernel 'sctp_v6_xmit()'函数信息泄露漏洞(CVE-2013-4350)

    漏洞版本: Linux kernel 漏洞描述: BUGTRAQ ID: 62405 CVE(CAN) ID: CVE-2013-4350 Linux Kernel是Linux操作系统的内核. Lin ...

  6. Android ---时间工具类

    public class DateUtil { // protected static Log logger = LogFactory.getLog(DateUtil.class); // 格式:年- ...

  7. 检测Office是否安装以及获取安装 路径 及安装版本 QQ,迅雷,旺旺 C#代码

    #region 检测Office是否安装 ///<summary> /// 检测是否安装office ///</summary> ///<param name=" ...

  8. 发送一个简单的http get 请求并且响应

    问题 如何发送一个简单的HTTP GET请求并且取回相应的HTTP响应. 设计 创建一个WebClient类的实例,然后使用它的DownloadData()方法. 方案 string uri = &q ...

  9. Windows Phone SDK 8.0 安装系统要求

    Windows Phone SDK 8.0 是一个功能齐全的开发环境,可用于构建 Windows Phone 8.0 和 Windows Phone 7.5 的应用和游戏. Windows Phone ...

  10. ReentrantLock Condition 实现消费者生产者问题

    import java.util.LinkedList; import java.util.Queue; import java.util.concurrent.ExecutorService; im ...