- 环境准备
节点类型 | 节点IP | 主机名 | 主机别名 | 系统 |
管理调度节点 | 192.168.1.100 | admin | node100 | Centos7.4 |
计算节点 | 192.168.1.101 | comput | node101 | Centos7.4 |
- 关闭所有节点防火墙
# systemctl stop firewalld
# systemctl disable firewalld
- 所有节点关闭selinux
# vim /etc/selinux/config
SELINUX=disabled
- 所有节点配置主机名
- 所有节点配置hosts文件
# vim /etc/hosts(增加下面两行)
192.168.1.100 admin node100
192.168.1.101 comput node101
- 所有节点配置ssh无密码
# ssh-keygen
# ssh-copy-id -i /root/.ssh/id_rsa.pub root@admin(计算节点执行)
# ssh-copy-id -i /root/.ssh/id_rsa.pub root@comput(管理节点执行)
注意:所有节点必须实现互相SSH无密码访问
- 所有节点安装依赖软件
# yum -y install libxml2-devel openssl-devel
# yum -y install gcc gcc-c++ boost-devel libtool
- 管理节点torque
# tar -xf torque-6.1.1.1.tar.gz
# cd torque-6.1.1.1
# ./configure --prefix=/usr/local/torque
# make
# make install
# make packages(生成计算节点安装包)
- 管理节点配置torque
# cp contrib/init.d/{pbs_server,pbs_mom,pbs_sched,trqauthd} /etc/init.d/
# TORQUE=/usr/local/torque
# echo "TORQUE=$TORQUE" >>/etc/profile
# echo "export PATH=\$PATH:$TORQUE/bin:$TORQUE/sbin" >>/etc/profile
# source /etc/profile
# ./torque.setup root
管理节点编辑node文件
# vim /var/spool/torque/server_priv/nodes(添加下面内容)
admin np=4 normal
comput np=4 normal
# vim /var/spool/torque/mom_priv/config(添加下面内容)
$pbsserver admin
$logevent 255
- 管理节点pbs服务
# qterm
# /etc/init.d/pbs_server restart
# /etc/init.d/pbs_mom restart
# /etc/init.d/pbs_sched restart
# /etc/init.d/pbs_trqauthd restart
- 计算节点安装pbs
# cd torque-6.1.1.1
# scp torque-package-{mom,clients}-linux-x86_64.sh comput:/root
# scp contrib/init.d/{pbs_mom,trqauthd} comput:/etc/init.d/
# ./torque-package-clients-linux-x86_64.sh --install
# ./torque-package-mom-linux-x86_64.sh --install
# vim /var/spool/torque/mom_priv/config
$pbsserver admin
$logevent 225
# /etc/init.d/pbs_mom restart
# /etc/init.d/pbs_trqauthd restart
注意:计算节点安装完成后,重启管理节点服务
- 管理节点查看节点状态
# pbsnodes