SGE部署安装

1.关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service

2.安装SGE依赖包

# yum install csh java-1.8.0-openjdk java-1.8.0-openjdk-devel gcc ant automake hwloc-devel openssl-devel libdb-devel pam-devel libXt-devel motif-devel ncurses-libs ncurses-devel
# yum install ant-junit junit javacc

3.下载SGE进行编译

wget https://arc.liv.ac.uk/downloads/SGE/releases/8.1.9/sge-8.1.9.tar.gz -P ~/software/
$ tar zxf ~/software/sge-8.1.9.tar.gz
$ cd sge-8.1.9/source
$ ./scripts/bootstrap.sh
$ ./aimk -no-herd -no-java

4.安装

将编译好的SGE安装到指定的文件夹(需要使用root用户执行)
# mkdir /opt/sysoft/sge
# export SGE_ROOT=/opt/sysoft/sge
# ./scripts/distinst -local -allall -noexit # 虽然普通用户在目标文件夹有写权限,但是程序要对一些文件进行权限修改,使用root用户不会报错。
# cd ../../ && rm sge-8.1.9/ -rf
# echo 'export SGE_ROOT=/opt/sysoft/sge' >> ~/.bashrc
# echo 'PATH=$PATH:/opt/sysoft/sge/bin/:/opt/sysoft/sge/bin/lx-amd64/' >> ~/.bashrc
# source ~/.bashrc    #普通用户也需要进行变量设置

5.部署SGE需要编辑/etc/hosts文件

172.16.20.2 master
172.16.20.3 node2

6.管理节点 部署SGE

cd $SGE_ROOT
./install_qmaster

7.启动SGE服务

部署完毕后,若需要使用SGE软件,则执行如下命令载入SGE的环境变量信息:
$ source /opt/sysoft/sge/default/common/settings.sh

或将该信息添加到~/.bashrc从而永久生效:
$ echo 'source /opt/sysoft/sge/default/common/settings.sh' >> ~/.bashrc
$ source ~/.bashrc

启动SGE软件方法:
$ /opt/sysoft/sge/default/common/sgemaster    # 控制节点启动
$ /opt/sysoft/sge/default/common/sgeexecd     # 计算节点启动

接下来可以使用SGE提交作业了

原文地址:https://www.cnblogs.com/lph970417/p/12044155.html