WEB开发网
开发学院数据库Oracle 如何为Oracle RAC配置SSH 阅读

如何为Oracle RAC配置SSH

 2008-09-02 12:48:53 来源:WEB开发网   
核心提示:众所周知,在安装Oracle Clusterware(Former Oracle CRS)之前,如何为Oracle RAC配置SSH,有一些必备的条件,比如双网卡,安装之前另外一个重要的前提就是ssh或者rsh的配置,这就是oracle在节点之间进行文件copy时候必须的,同版本的操作系统,一些必需的补丁等等

众所周知,在安装Oracle Clusterware(Former Oracle CRS)之前,有一些必备的条件,比如双网卡,同版本的操作系统,一些必需的补丁等等,还有一些比如同样ID的组和用户,这些都可以通过clusterware附带的一个检查工具cluvfy进行检查。详细的列表和检查方法可以参考oracle的官方安装文档,除此之外,安装之前另外一个重要的前提就是ssh或者rsh的配置,这就是oracle在节点之间进行文件copy时候必须的,下面就分十个步骤介绍如何进行ssh的配置。

1. Login as oracle user

2. create .ssh directory in the oracle user’s home directory

  $cd
  $mkdir ~/.ssh
  $chmod 700 ~/.ssh

3. Generate an RSA and DSA key for SSH

$/usr/bin/ssh-keygen -t rsa

$/usr/bin/ssh-keygen -t dsa

4. After this, four files generated

  ~/.ssh/id_rsa.pub
  ~/.ssh/id_rsa
  ~/.ssh/id_dsa.pub
  ~/.ssh/id_dsa

5. create an authorized key file

 $touch ~/.ssh/authorized_keys
  $cd ~/.ssh
  $ls

6. Copy the contents of rsa.pub and dsa.pub files to authrorized file

  [oracle@node1 .ssh]$ ssh node1 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys
  oracle@node1’s password:
  [oracle@node1 .ssh]$ ssh node1 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys
  [oracle@node1 .ssh$ ssh node2 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys
  oracle@node2’s password:
  [oracle@node1 .ssh$ ssh node2 cat /home/oracle/.ssh/id_dsa.pub >>authorized_keys
  oracle@node2’s password:

7. Use scp to copy the authorized file to other nodes in ~/.ssh

[oracle@node1 .ssh]scp authorized_keys node2:/home/oracle/.ssh/

8. Change the permissions on the oracle user’s authorized file on all cluster nodes

$ chmod 600 ~/.ssh/authorized_keys

9. Enable OUI to use ssh and scp

$ exec /usr/bin/ssh-agent $SHELL

$ /usr/bin/ssh-add

10. Verify ssh configuration on all nodes

$ ssh nodename1 date

$ ssh nodename2 date

Tags:如何 Oracle RAC

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接