Tuesday, February 20, 2007

Oracle 10g RAC installation: 08 Establishing Oracle user equivalence

To estabilish Oracle user equivalence we have to use ssh-keygen to generate for each node a public and a private key for the Oracle user.
Before you begin this step, be sure you have in your /etc/hosts file the right configuration of your network. My network configuration currently is like in the picture.


Start one of your node. I have started first rac2, login as root user, open a terminal and login as oracle user (su - oracle). As you can see your home directory should be like in the following picture.


Then type
ssh-keygen -t rsa -b 1024
When asked "Enter file in which to save the key" type enter (you will choose the default option, /home/oracle/.ssh/id_rsa)
Then you will be asked for a passphrase and to type again the same (give an empty passphrase). At this point we have created our public key.

Now start your first node and execute the same steps:
STEP 1 - Login as root user, open a terminal and login as oracle user (su - oracle).
STEP 2 - Type ssh-keygen -t rsa -b 1024
STEP 3 - Type enter when asked "Enter file in which to save the key"
STEP 4 - Type your passphrase (leave it empty) when asked and re-type it again (leave it empty again)

Now if you go into the directory .ssh from the oracle home user and type ls you will see only two files like in the picture.


Type cd .. and from oracle home directory from rac1 type
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys


Then type
ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
When asked for the authenticity type yes and then type the oracle user's password for rac2.


Now you can from the first node type:
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
or you can execute as oracle user from rac2 the same previous commands:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
At this point we can execute every command from one node to the other using ssh without being prompted for a password just as the following pictures where I typed ssh rac1 hostname from rac2 and ssh rac2 hostname from rac1: the output will be the hostname of the remote machine.

Now test every entries (except the VIP addresses) in the /etc/hosts file from both nodes and verify that no password is asked.

From rac2:
ssh rac1 hostname
ssh rac1-priv hostname


From rac1:
ssh rac2 hostname
ssh rac2-priv hostname

3 comments:

Coach Factory said...

oakley sunglasses, oakley vault, jordan shoes, polo ralph lauren outlet, burberry outlet online, michael kors outlet online, true religion, christian louboutin shoes, tiffany and co jewelry, louis vuitton outlet, gucci handbags, christian louboutin outlet, nike shoes, michael kors outlet online, longchamp outlet, tory burch outlet, coach outlet, red bottom shoes, louboutin shoes, ray ban sunglasses, coach purses, michael kors outlet store, air max, louis vuitton outlet online, cheap oakley sunglasses, coach outlet store online, coach factory outlet, prada handbags, chanel handbags, ray ban outlet, longchamp outlet online, kate spade outlet online, burberry outlet online, louis vuitton, polo ralph lauren, nike free, prada outlet, louis vuitton handbags, michael kors outlet online, michael kors outlet, michael kors outlet online, louis vuitton outlet, kate spade handbags, longchamp handbags, nike air max

Coach Factory said...

barbour, oakley pas cher, abercrombie and fitch, nike air force, mac cosmetics, ray ban uk, air max, guess pas cher, vans outlet, hermes pas cher, michael kors uk, nike roshe, ralph lauren pas cher, timberland, hollister, longchamp pas cher, sac michael kors, lululemon, sac vanessa bruno, michael kors canada, sac louis vuitton, mulberry, north face pas cher, ray ban pas cher, longchamp, converse pas cher, chaussure louboutin, nike blazer pas cher, longchamp, nike trainers, nike roshe run, lacoste pas cher, louis vuitton uk, scarpe hogan, nike huarache, tn pas cher, louis vuitton, hollister, louis vuitton pas cher, north face, ralph lauren, nike air max, new balance pas cher, vans pas cher, roshe run, abercrombie and fitch, nike free, nike free pas cher, hollister, burberry pas cher

Coach Factory said...

north face outlet, bottega veneta, rolex watches, canada goose, reebok outlet, north face jackets, moncler outlet, beats headphones, ugg boots, nfl jerseys, marc jacobs outlet, chi flat iron, canada goose uk, babyliss pro, insanity workout, timberland shoes, birkin bag, canada goose pas cher, giuseppe zanotti, lululemon outlet, jimmy choo shoes, soccer jerseys, canada goose outlet, new balance outlet, asics shoes, canada goose outlet, celine handbags, moncler, ugg outlet, moncler, mont blanc pens, instyler ionic styler, iphone 6 case, hollister clothing, ghd, p90x workout, ugg soldes, soccer shoes, uggs on sale, nike air max, herve leger, wedding dresses, canada goose outlet, baseball bats, mcm handbags, moncler, ferragamo shoes, valentino shoes, uggs outlet, ugg