1. 程式人生 > >Centos7單機安裝torque

Centos7單機安裝torque

1、修改主機名稱

# vi /etc/hosts

   127.0.0.1    sce2

2、下載torque

#wget http://wpfilebase.s3.amazonaws.com/torque/torque-4.2.9.tar.gz
3、在root使用者下,解壓檔案
# tar -zxvf torque-4.2.9.tar.gz
# cd torque-4.2.9
4、編譯安裝
# yum install libxml2-devel openssl-devel gcc gcc-c++ boost-devel libtool-y
# ./configure --prefix=/usr/local/torque --with-scp --with-default-server=sce2

#  make && make install && make packages
#cp contrib/init.d/{pbs_{server,sched,mom},trqauthd} /etc/init.d/
# for i in pbs_server pbs_sched pbs_mom trqauthd; do chkconfig --add $i; chkconfig $ion; done
5、設定環境變數
#TORQUE=/usr/local/torque  
#echo "TORQUE=$TORQUE" >>/etc/profile
#echo "export PATH=\$PATH:$TORQUE/bin:$TORQUE/sbin" >>/etc/profile
#source /etc/profile

#echo '/usr/local/lib' > /etc/ld.so.conf.d/torque.conf

#ldconfig

#./torque.setup sce


6、啟動pbs_server、pbs_sched、pbs_mom、trqauthd幾個服務 
# for i in pbs_server pbs_sched pbs_mom trqauthd; do service $i start; done
說明:Torque主要是由三個主要部件組成
pbs_server  PBS服務守護程序,負責接收作業提交,位於服務節點上
pbs_sched  PBS排程守護程序,負責排程作業,位於服務節點上 

pbs_mom  PBS MOM守護程序, 負責監控本機並執行作業,位於所有計算節點上
7、用sce使用者提交作業
# echo sleep200|qsub
# qstat -an
新增計算節點
#qmgr -c 'create node sce2 np=2

8、安裝mom、client

#./torque-package-mom-*.sh --install

#./torque-package-clients-*.sh --install

#vi /var/spool/torque/mom_priv/config

    pbsserver master 

    logevent 255

9、建立新佇列

qmgr -c 'create queue test_queue4'
qmgr -c 'set queue test_queue4 queue_type = execution'
qmgr -c 'set queue test_queue4 started = true'
qmgr -c 'set queue test_queue4 enabled = true'
qmgr -c 'set queue test_queue4 resources_default.walltime = 1:00:00'
qmgr -c 'set queue test_queue4 resources_default.nodes = 1'
qmgr -c 'set server default_queue = batch'