OracleLinux-R6-U2-Server-x86_64-dvd安裝torque
從網上下載TORQUE
傳到對應的服務器上並解壓
如1./opt/torque-4.1.0.tar.gz
2.tar xvfztorque-4.1.0.tar.gz
3.cd torque-4.1.0
4../configure --with-default-server=localhost(localhost是主機名)
在這一般會報這個錯(configure: error: no acceptable C compilerfound in $PATH
See `config.log'for more details.)意思是沒有C這個時候我們需要安裝GCC
安裝GCC
1) 先掛載光盤
2) 然後修改/etc/yum.repos.d/後面是-media.repo文件中的
baseurl=file:///var/ftp/rpm #這裏就是咱們的安裝包存放路徑了,仔細看是 "///"
enabled=1 # 1爲打開 0 爲關閉肯定選打開
3) yuminstall gcc
好以上GCC安裝成功
5然後在運行./configure --with-default-server=localhost(localhost是主機名)還是報錯configure: error: TORQUE needs lib openssl-devel inorder to build(建立openssl-devel)
安裝openssl-devel
1) rpm-ivh openssl-devel-1.0.0-20.el6.x86_64.rpm
2) 提示:(error: Failed dependencies:
krb5-devel is needed by openssl-devel-1.0.0-20.el6.x86_64
zlib-devel is needed byopenssl-devel-1.0.0-20.el6.x86_64)
3) 在分別安裝rpm -ivh krb5-devel-1.9-22.el6.x86_64.rpm
4) 如此直到rpm -ivh openssl-devel-1.0.0-20.el6.x86_64.rpm安裝完成
6../configure --with-default-server=localhost(localhost是主機名)
提示‘make’
7.make
8.make install
以上是torque默認安裝,
以下是torque指定目錄安裝
tar zxvf torque-2.4.6.tar.gz
cd torque-2.4.6
./configure-prefix=/usr/local/software/torque-2.4.6 -with-rcp=scp
make
make install
安裝完畢,但是需要
make packages
產生到計算節點安裝的文件,其中產生的幾個 sh 文件中最重要的是
torque-package-mom-linux-x86_64.sh 和 torque-package-clients-linux-x86_64.sh
5.2Torque 在管理節點上的配置
5.2.1
在/etc/profilie 中追加
exportTORQUE=/usr/local/software/torque-2.4.6
if [ "`id -u`" -eq 0 ]; then
PATH=$PATH:$TORQUE/bin:$TORQUE/sbin
else
PATH=$PATH:$TORQUE/bin
fi
修改後使設置的環境變量生效:
source /etc/profile
將root設置爲TORQUE的管理帳戶:
root@locaholst#./torque.setup root
在/var/spool/torque/serverpriv/nodes中添加計算節點的機器名,:
root@localhost
如果/var/spool/torque下的目錄spool和undelivered的權限不是drwxrwxrwt的話,需要chmod
1777 spool undelivered
#pbsserver -t create
#qmgr(設置一個默認隊列dque)
Qmgr:create queue dque queue_type=execution
在這一般會報這個錯誤(Cannot connect to default server host 'localhost' -check
pbs_server daemon and/or trqauthd.)
需要做:1.本機的ssh無密碼登陸ssh-keygen -t rsa
然後一路回車,完成之後
cd ~/.ssh
cp id_rsa.pub authorized_keys
完成之後測試一下:
ssh localhost 應該不用輸密碼就可以了
2. 檢查/etc/hosts文件上邊添加127.0.0.1 localhost.localdomain localhost
3.在文件/var/spool/torque/serverpriv/nodes最後一行加上localhost 或者root@localhost
Qmgr: set server default_queue=dque
Qmgr: set queue dque started=true
Qmgr: set queue dque enabled=true
Qmgr: set server scheduling=true
/var/spool/torque/mompriv/config
$pbsserver localhost
$logevent 255
$usecp localhost:/home /home
其中$pbsserver後指定服務節點的主機名,$usecp後面的表示的共享home
a編輯/etc/pbs.conf文件,填入如下內容:
pbs_home=/usr/local/software/torque-2.4.6
pbs_exec=/usr/local
start_server=1
start_sched=1
start_mom=1
b) 將OpenPBS解壓目錄中的……/src/tools/init.d/pbs文件複製到/etc/init.d/pbs
c) 執行命令chkconfig –add pbs
d) 用chkconfig –list | grep pbs 命令查看pbs服務是否已被加入
e) 現在就可以使用如下命令啓動、關閉pbs了:
i. 啓動pbs: service pbs start
ii. 關閉pbs: service pbs stop
iii. 重啓pbs: service pbs restart