1、准备
test-env:
srhel65-1 20.20.20.25
srhel65-2 20.20.20.41
srhel65-3 20.20.20.42
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
20.20.20.25 srhel65-1 rh1
20.20.20.41 srhel65-2 rh2
20.20.20.42 srhel65-3 rh3
# 三台主机都关闭iptables,NetworkManager,selinux为disabled
2、srhel65-1:
2.1 安装openlave
# cd /opt
# rpm -ivh openlava-3.1-2.x86_64.rpm
2.2 添加openlave命令为系统命令
# echo -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin/:/opt/openlava-3.1/bin\nexport PATH" >> /etc/profile
# source /etc/profile
2.3 添加主机
# cd openlava-3.1/etc/
# cp openlava-3.1/etc/lsf.cluster.openlava{,.bak}
# vim lsf.cluster.openlava
14 Begin Host
15 HOSTNAME model type server r1m RESOURCES
16 srhel65-1 IntelI5 linux 1 - -
17 srhel65-2 IntelI5 linux 1 - -
18 srhel65-3 IntelI5 linux 1 - -
19 End Host
# /etc/init.d/openlava restart
2.4 设置挂载点
# echo "/opt/openlava-3.1/etc 20.20.20.41/24(rw,no_root_squash) 20.20.20.42/24(rw,no_root_squash)" >> /etc/exports
# /etc/init.d/nfs start
# chkconfig nfs on
3、srhel65-2 && srhel65-3:
3.1 安装openlava
# cd /opt
# rpm -ivh openlava-3.1-2.x86_64.rpm
3.2 添加openlave命令为系统命令
# echo -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin/:/opt/openlava-3.1/bin\nexport PATH" >> /etc/profile
# source /etc/profile
3.3 将/opt/openlava-3.1/etc目录挂载到srhel65-1
# echo "srhel65-1:/opt/openlava-3.1/etc /opt/openlava-3.1/etc nfs defaults 1 2" >> /etc/fstab
# mount -a
4、srhel65-1:
4.1 并查看
# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
srhel65-1 ok - 1 0 0 0 0 0
srhel65-2 ok - 1 0 0 0 0 0
srhel65-3 ok - 1 0 0 0 0 0
# lsload
HOST_NAME status r15s r1m r15m ut pg ls it tmp swp mem
srhel65-1 ok 0.0 0.0 0.0 0% 0.0 1 0 15G 5000M 704M
srhel65-2 ok 0.0 0.1 0.1 0% 0.0 1 3 26G 2998M 709M
srhel65-3 ok 0.0 0.0 0.0 0% 0.0 1 1758 26G 2998M 754M
# lshosts
HOST_NAME type model cpuf ncpus maxmem maxswp server RESOURCES
srhel65-1 linux IntelI5 100.0 1 980M 4999M Yes ()
srhel65-2 linux IntelI5 100.0 1 980M 2999M Yes ()
srhel65-3 linux IntelI5 100.0 1 980M 2999M Yes ()