This morning at 2.13 AM 25 May 2008, i’m trying to use my PVM cluster. Finally I can compile program from $PVM_ROOT/example/. I know it’s to simple to every man that expert on it but i’m newbie and still learn to make it more better. Insyaallah I will make my own program
I configure my PVM cluster based on www.linuxjournal.com and some additional. In that site not just talk but always have implementation with step by step. You can search on www.linuxjournal.com with “Xen Virtualization and Linux Clustering, Part 1 &2” coz I just following it without Xen Virtualization implementation. Because as long as googling on internet, i’m found to many tutorial but it’s to confusing to implementation it. Now, let’s go to my tutorial.
I will to make PVM cluster with ssh passwordless (it mean using ssh without password). In may tutorial PVM cluster using rsh but its to complicated to configure it. Coz in my experience I can configure rsh on node1 but if configure on node2 i’m failed. I don’t know which it wrong.
Master node (node4)
client node (node1 , node2)
File that you modified in beginning, ie:
- /root/.ssh/id_rsa.pub (generated from ssh-keygen on node4 ) on master node
- /root/.ssh/id_rsa.pub –> /root/.ssh/authorized_keys on client node (node1 & 2)
- /usr/local/pvm3 (extraction of pvm3.4.4.tgz)
First, edit file /etc/hosts on every node to know where running PVM spawning its program.
[root@node4 root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
Second step, generate ssh (master node)
[root@node4 root]# cd ~
[root@node4 root]# ssh-keygen -t dsa -f .ssh/id_dsa
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .ssh/id_dsa.
Your public key has been saved in .ssh/id_dsa.pub.
The key fingerprint is:
[root@node4 root]# ls /root/.ssh/
I use empty passphrase.Now copy id_dsa.pub from node4 to client (node1&2)
[root@node4 root]# scp ~/.ssh/id_dsa root@node1:~/.ssh/
id_dsa 100% |*****************************| 668 00:00
Third step, make change id_dsa.pub to authorized_keys
On client side
[root@node1 root]# ~
[root@node1 root]# cd ~/.ssh/
[root@node1 .ssh]# ls
id_dsa.pub known_hosts known_hosts~
Now change id_dsa.pub to authorized_keys
[root@node1 .ssh]# cat id_dsa.pub >> authorized_keys
[root@node1 .ssh]# rm -rf id_dsa.pub
Right now from master node (node4) you can login to node1 or node2 without password
[root@node4 root]# ssh node1
Last login: Sun May 25 02:39:28 2008 from node4
Fourth step, configure PVM
- extract pvm3.4.4.tgz to /usr/local
#tar xzf pvm3.4.4.tgz /usr/local
it will make directory /usr/local/pvm3
- Now we make change on $HOME/.bashrc (it mean on every user on node1,node2,node4). Do you add this line on .bashrc
then log off you’re your linux then log in again
- Edit LINUX.def and find the word “/usr/bin/rsh” change with “/usr/bin/ssh”
# cd /usr/local/pvm3/conf
# gedit /usr/local/pvm3/conf/LINUX.def
- Now change your directory to /usr/local/pvm3 to compile pvm then type make to compile it
# cd /usr/local/pvm3/
Waiting compiling for several time. If the compiling working, its will make directory /usr/local/pvm3/LINUX
- edit again your .bashrc and add this line :