This document contains the instruction to build a passwordlessly-linked PCs in CENTOS6 Linux. The main purpose to build such a 'cluster' is to run mpich2 calculations in multiple nodes connected via a 100/1000 MB/s switch. In principle this document can also be applied on other Linux OS with some necessary modification. The 'cluster' is not strickly a cluster defined in a strict sencse as our's less much complexity than an authentic cluster. If you want to use this manual to set up your own CENTOS6 cluster in your institution, you need to modify only the following information that are explicitly specified in items #1, #2 and #3 in the http://10.205.19.205/configrepo/howto/CENTOS6/centos6_frontend1of2 template, namely, In #1, echo 'DOMAIN=local usm.my' >> /etc/sysconfig/network-scripts/ifcfg-eth0 In #2, echo 'IPADDR=10.205.19.225' >> /etc/sysconfig/network-scripts/ifcfg-eth1 echo 'GATEWAY=10.205.19.254' >> /etc/sysconfig/network-scripts/ifcfg-eth1 echo 'DNS1=10.202.1.27' >> /etc/sysconfig/network-scripts/ifcfg-eth1 echo 'DNS2=10.202.1.6' >> /etc/sysconfig/network-scripts/ifcfg-eth1 In #3, HOSTNAME=anicca Just modify the DOMAIN, IPADDR, GATEWAY, DNS1, DNS2 that are relevant to your institute's network. HOSTNAME is the name you will give as the name of the cluster. Hardwar requirement: X PC (X > 2), LAN cable, a 100/1000 MB/s switch, and an extra LAN card to be slot to the frontend node. We name these PC respectively: anicca (frontend, in which the LAN card is plugged into), node1,node2,node3, ... The frontend is supposed to equipped with two LAN cards, one built-in, another exteran LAN. (We would assume for the frontend, the built-in LAN is designated as eth0, the external LAN eth1). Important IPs: The ip of the frontend via eth0 is: 10.1.1.1 The ip of node1,node2,node3, ... via eth0 are: 10.1.255.231, 10.1.255.232, 10.1.255.233, ... Follow the procedure step by step in sequential order. (0) Connect all eth0 ports of all the PCs in the cluster to a 100/1000 MB/s switch. eth1 of frontend is to be connected to the LAN network. (1) Install fronend (with two lan cards) with CENTOS6, using the installation option of 'software development'. When prompted to create an user for the first time, add an generic user named 'human' with password 123. (2) Install node1, node2, ... (with one LAN card) with CENTOS6, using the installation option of 'software development'. When prompted to create an user for the first time, add an generic user named 'human' with password 123. (3) Run centos6_frontend1of2 in the frontend. No internet connection is established at this stage. It will do some necessary preparatory configuration to set up the ip of the frontend by making changes to Network configuration such as assign IP address, change DNS server etc for the frontend (The instruction is based on http://www.techkaki.com/2011/08/how-to-configure-static-ip-address-on-centos-6/). centos6_frontend1of2 is downloadable from http://www2.fizik.usm.my/configrepo/howto/CENTOS6/. Some necessary numerical packages are to be installed (mpich2 is among the most crucial one). Frontend will reboot at the end of centos6_frontend1of2. (3.5) Upon reentering as root into frontend after the first rebooting (after 3), check that indeed both eth0 and eth1 are connected to the switch and internet respectively. If they don't, try manually configuring the files etc/sysconfig/network-scripts/ifcfg-eth0 and etc/sysconfig/network-scripts/ifcfg-eth1, or configure the network by clicking on the networking icon on the upper right hand side of the screen. The items to check include: a. type 'ifconfig' to see if both eth0 and eth1 are connected. b. The HWADDR for both eth0 and eth1 are explicitly specified. If not found, check it out by cat ifcfg-eth0.orig or cat ifcfg-eth1.orig c. Search DOMAIN for eth0 should be 'local'; For eth1, 'DOMAIN=usm.my' d. DNS1=127.0.0.1 for eth0. For eth1, DNS1=10.202.1.27, DNS2=10.202.1.6 In anycase, both network cards must be active and connected before proceeding to the next step. Reboot the frontend if you have done some manual configuration. Often both cards will be connected after rebooting. (4) Run centos6_frontend2of2 in frontend as root. It will reboot at the end of the centos6_frontend2of2 run. Steps 3 and 4 must be completed before initiating the following steps. (5) Configure the nodes in two separate steps similar to 3 and 4 above. Run (as root) a separate script named 'centos6_node_part1_nodeX' in each node separately (X = 1, 2, ...). It will reboot at at the end of centos6_node_part1. centos6_node_part1_nodeX are downloadable from http://10.205.19.205/configrepo/howto/CENTOS6/nodes/. You may have to save these files into a pendrive and plug it into each node manually as at the present stage the nodes may be still unable to go online. (6) After rebooting at the end of (5), log in again to the node as root to execute the file centos6_node_part2. Step (6) can be carried out in simulneity in all nodes as long as the nodes have already run (5). The script centos6_node_part2 should be now readily executable from any node as root by issuing the command line 'sh /home/common/nfs/centos6_node_part2' Key in the root's password to frontend when prompted. This is to establish a passwordless for root from the node to frontend. At the end of this script, a passwordless ssh will be established for root from the present PC to other PC in the cluster. 7) The next step is to configure the cluster so that they can perform passwordless ssh for user common. To assure this is working according as designed, all node must have already executed (5) and (6) before executing step (7). Don't execute (7) if there are still other nodes not yet finish steps (5), (6). By design, after step (6), the terminal for the user common will appear on the node's screen. Issue the command (as common, not as root) 'sh /home/common/nfs/centos6_ssh' At the end of this script, a passwordless ssh will be established for common from the present PC to other PC in the cluster. (8) Login as user common to the frontend and issue 'sh /home/common/nfs/centos6_ssh' passwordless ssh will be established between the frontend and other nodes at the end of (8) for user common. (9) Login as root to the frontend and issue 'sh /home/common/nfs/centos6_ssh' passwordless ssh will be established between the frontend and other nodes at the end of (8) for root. (10) You can establish passwordless ssh for any other users (apart from common and root) by (1) issuing 'sh /home/common/nfs/centos6_ssh' as that user in the frontend, followed by (2) issuing 'sh /home/common/nfs/centos6_ssh' as that user in all other nodes one by one. In cases where you are asked whether to replace an existing key while configuring passwordless ssh, its safest to say NO. Yoon Tiem Leong Universiti Sains Malaysia 11800 USM Penang, Malaysia