在所有节点配置SSH的对等性
在安装Oracle Real Application clusters之前,必须先配置所有节点的SSH对等性。因为在安装过程种Oracle Universal Installer 使用ssh和scp命令执行远程命令执行及copy的工作。
下面是具体的步骤:
以下步骤在所有节点上执行:
1.以oracle用户登陆
# su – oracle
2.在两个节点的oracle主目录分别创建.ssh目录,并赋予权限。
# mkdir ~/.ssh
# chmod 755 ~/.ssh
3. 在两个节点分别生成RSA key
# /usr/bin/ssh-keygen -t rsa
会出现如下提示:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s password. phrase
密码处直接回车即可
4. 生成DSA key
# /usr/bin/ssh-keygen -t dsa
出现如下提示:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s password. phrase
密码处直接回车即可
5. 以oracle用户身份,在所有节点创建authorized_keys文件,并赋予权限
# touch ~/.ssh/authorized_keys
# cd ~/.ssh
# ls
你应该可以看到你所创建的id_dsa.pub 和id_rsa.pub和authorized_keys
6.在两个节点分别将id_dsa.pub 和id_rsa.pub加入到authorized_keys
节点1:
$ ssh node1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh node1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
节点2:
$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ ssh node1
注意要点:
.ssh目录权限必须为755rsa_id.pub 及authorized_keys权限必须为644
rsa_id权限必须为600
用户目录权限为 755 或者 700就是不能是77x