Oracle rac ssh equivalence Configuration

Source: Internet
Author: User
Tags rsync
(I) Requirements

To facilitate communications between nodes in the RAC environment, ssh equivalence is often required.
In short:
The user or program does not need to enter a password when connecting from one machine to another.

The background of this application is:
The Installation Process of clusterware and database is first installed on a node.
Then the installer automatically copies the locally installed content to the same remote directory.
This is a background copy process. The installer has no chance to enter a password for authentication. Therefore, you must configure the user equivalent.

In fact, in the hadoop cluster configuration process, you also need to configure SSH equivalence
The remote hadoop daemon needs to be managed during hadoop running. After hadoop is started
Namenode starts and stops various daemon on each datanode through SSH.

Therefore, the configurations of SSH equivalence between the two are the same.



(Ii) install and start the SSH protocol

First confirm whether to install:
# Rpm-Qa | grep OpenSSH
# Rpm-Qa | grep rsync

If no, then:
# Yum Install SSH
# Yum install rsync

Start SSH:
# Service sshd start



(Iii) SSH Equivalence Principle

Assume that there are two machines on the Network: A & B, and a must implement password-free public key authentication, then:
① Generate a key pair on A, including a public key and a private key.
② Copy the public key to B.
③ When a connects to B through SSH, B will generate a random number and encrypt the random number with the public key of a and send it to
④ After receiving the number of encrypted data, a decrypts the data with the private key and returns the number of decrypted data to B
⑤ B. After confirming that the decryption number is correct, A is allowed to connect




(Iv) Considerations

Ensure that the UID of the Oracle user on each node is the same as the GID of the DBA group.

For example:

Node 1: [root @ odd ~] # ID oracleuid = 500 (Oracle) gid = 500 (oinstall) groups = 500 (oinstall) node 2: [root @ even ~] # ID oracleuid = 500 (Oracle) gid = 500 (oinstall) groups = 500 (oinstall), 501 (DBA)

(V) configuration steps

① Network settings

Write All IP addresses and hostnames into the hosts file to keep the/etc/hosts file of each node the same

[root@even ~]# cat /etc/hosts127.0.0.1               localhost.localdomain localhost192.168.1.115           even.example.com   even192.168.1.116           odd.example.com    odd[mysql@odd ~]$ cat /etc/hosts127.0.0.1               localhost.localdomain localhost192.168.1.115           even.example.com   even192.168.1.116           odd.example.com    odd


② Run the following commands on odd and even respectively:

# Cd $ home
# Mkdir. SSH
# Chmod 700. SSH
# Cd. SSH
# Ssh-keygen-T RSA
# Ssh-keygen-T DSA
# Cat *. Pub> authorized_keys

③ Migrate authorized_keys

In odd:
# SCP authorized_keys even.example.com:/root/. Ssh/keys_odd

In even:
# Cat keys_odd> authorized_keys
# SCP authorized_keys odd.example.com:/root/. Ssh/




(6) test

In odd:
[Root @ odd ~] # SSH even.example.com
Last login: Mon May 6 12:58:12 2013 from odd.example.com
[Root @ even ~] #

In even:
[Root @ even ~] # SSH odd.example.com
Last login: Mon May 6 11:57:49 2013
[Root @ odd ~] #

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.