Download presentation
Presentation is loading. Please wait.
1
PC Cluster Setup on Linux Fedora Core 5 High Performance Computing Lab Department of Computer Science and Information Engineering Tunghai University, Taichung, Taiwan 40704, ROC Presenter: Hao-Yu Tung
2
HPC Lab., CSIE@Tunghai University Contents Install Linux OS Set up Network Information System (NIS) Set up Network File System (NFS) Set up Secure Shell (SSH) Set up Message Passing Interface (MPI)
3
HPC Lab., CSIE@Tunghai University Install Linux OS Install Fedora Core 5 Linux distribution Install from CD-ROM Install from network (create a boot disk) Full install or custom if you are an expert Set separate IP for each machine (e.g. 192.168.1.1, 192.168.1.2)
4
HPC Lab., CSIE@Tunghai University Install Linux OS (cont.) Partition Consider you have a hard driver with 30GB in size Full installation of Fedora Core 5 will using 5GB available disk space Server side: / 10GB, holding root file system and RPM packages Swap 256MB, as large as your physical memory /home the rest size of the disk, for NFS home usage Client side: Swap 256MB, as large as your physical memory / the rest size of the disk Disable the firewall and reboot #chkconfig --level 345 iptables off #chkconfig --level 345 ip6tables off (optional)
5
HPC Lab., CSIE@Tunghai University Install Linux OS (cont.) After installation, you will use “adduser” and “passwd” to add a normal user on server #adduser [test] #passwd [test] Editing your “/etc/hosts” file # vi /etc/hosts Here should be your server and clien t private ip and hostname
6
HPC Lab., CSIE@Tunghai University Set up NIS (Server side) Install NIS server #wget http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/cor e/5/i386/os/Fedora/RPMS/ypserv-2.19- 0.i386.rpm http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/cor e/5/i386/os/Fedora/RPMS/ypserv-2.19- 0.i386.rpm #rpm –ivh ypserv-2.19-0.i386.rpm Setting up NIS domain name on file “/etc/rc.d/rc.local" #nisdomainname cluster #vi /etc/rc.d/rc.local Temporary (Disappears after reboot) Add this line
7
HPC Lab., CSIE@Tunghai University Set up NIS (Server side) Enabling ypserv and yppasswdd service #service ypserv restart #service yppasswdd restart #chkconfig –level 345 ypserv on #chkconfig –level 345 yppasswdd on Makefile #cd /var/yp #make You’ll see this after using the command “make”
8
HPC Lab., CSIE@Tunghai University Set up NIS (Client side) Install NIS client #wget http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/cor e/5/i386/os/Fedora/RPMS/ypbind-1.19- 0.i386.rpm http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/cor e/5/i386/os/Fedora/RPMS/ypbind-1.19- 0.i386.rpm #rpm –ivh ypbind-1.19-0.i386.rpm Setting up NIS domain name on file “/etc/rc.d/rc.local" #nisdomainname cluster #vi /etc/rc.d/rc.local Temporary (Disappears after rebo ot) Add this line
9
HPC Lab., CSIE@Tunghai University Set up NIS (Client side) Enabling ypbind service #service ypbind restart #chkconfig –level 345 ypbind on Editing “/etc/nsswitch” file # vi /etc/nsswitch.conf Original file
10
HPC Lab., CSIE@Tunghai University Set up NIS (Client side) Enabling ypbind service #service ypbind restart #chkconfig –level 345 ypbind on Change to this
11
HPC Lab., CSIE@Tunghai University Set up NIS (Client side) For testing NIS on client #yptest
12
HPC Lab., CSIE@Tunghai University Set up NFS (Server side) Server Side Create file “/etc/exports” to configure NFS in /etc directory by root privilege /home 192.168.1.0/255.255.255.0(rw,no_root_squash) /usr/local 192.168.1.0/255.255.255.0(rw,no_root_squash) Enable the NFS daemon #chkconfig --level 345 nfs on #service nfs restart No blank spac e within this lin e
13
HPC Lab., CSIE@Tunghai University Set up NFS (Client side) Client Sides Testing configuration (Optional) #mount –t nfs server:/home /home #mount –t nfs server:/usr/local /usr/local Edit file “/etc/fstab” by adding the following two lines server:/home /homenfsdefaults 0 0 server:/usr/local /usr/localnfsdefaults 0 0 Move original home to home2 and create a new home #mv home home2 #mkdir home Re-mount file system or reboot #mount –a
14
HPC Lab., CSIE@Tunghai University Set up SSH Enable SSH server #chkconfig --level 345 sshd on #service sshd restart If you want to use ssh without password by the following steps in your account $ssh-keygen -t rsa $cd /home/[user]/.ssh/ $cp id_rsa.pub authorized_keys2 $ssh [client_machine]
15
HPC Lab., CSIE@Tunghai University Setup MPI Install MPI on server and client respectively by using root account #wget http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS /libaio-0.3.106-2.2.i386.rpm http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS /libaio-0.3.106-2.2.i386.rpm #rpm –ivh libaio-0.3.106-2.2.i386.rpm #wget http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS /libaio-devel-0.3.106-2.2.i386.rpm http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS /libaio-devel-0.3.106-2.2.i386.rpm #rpm –ivh libaio-devel-0.3.106-2.2.i386.rpm #wget http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS /lam-7.1.1-11.i386.rpm http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS /lam-7.1.1-11.i386.rpm #rpm –ivh lam-7.1.1-11.i386.rpm Use MPI (cannot use root account) Create file “lamhost” $recon –v lamhost $lamboot –v lamhost $wipe –v lamhost
16
HPC Lab., CSIE@Tunghai University Setup MPI (cont.) Complie MPI C program $mpicc –o file file.c Execute MPI C program $mpirun –np file
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.