2. Setup EPEL yum repository on CentOS 6. For more information, see Repository of CentOS 6 and Scientific Linux 6
3. Do a yum install
# yum install pdshTo confirm installation
# which pdsh
4. Configure user environment for PDSH
# vim /etc/profile.dEdit the following:
# setup pdsh for cluster users export PDSH_RCMD_TYPE='ssh' export WCOLL='/etc/pdsh/machines'
5. Put the host name of the Compute Nodes
# vim /etc/pdsh/machines/
node1 node2 node3 ....... .......
6. Make sure the nodes have their SSH-Key Exchange. For more information, see Auto SSH Login without Password 7. Do Install Step 1 to Step 3 on ALL the client nodes.
B. USING PDSH Run the command ( pdsh [options]... command )
1. To target all the nodes found at /etc/pdsh/machinefile. Assuming the files are transferred already. Do note that the parallel copy comes with the pdsh utilities
# pdsh -a "rpm -Uvh /root/htop-1.0.2-1.el6.rf.x86_64.rpm"
2. To target specific nodes, you may want to consider using the -x command
# pdsh -x host1,host2 "rpm -Uvh /root/htop-1.0.2-1.el6.rf.x86_64.rpm"References
2 comments:
FYI, for hosts to be included its not -x switch, its -w:
pdsh-2.27 on Centos 5 machine:
# To Target all nodes in /etc/pdsh/machine file:
pdsh -a "date"
# To Target specific nodes in /etc/pdsh/machine file:
pdsh -w bvcacher1,bvcacher2 "date"
FYI, for hosts to be included its not -x switch, its -w:
pdsh-2.27 on Centos 5 machine:
# To Target all nodes in /etc/pdsh/machine file:
pdsh -a "date"
# To Target specific nodes in /etc/pdsh/machine file:
pdsh -w bvcacher1,bvcacher2 "date"
Post a Comment