Centos7源码编译安装Slurm作业调度系统

一、配置基础环境

        所有节点保证网络正常、关闭防火墙、关闭selinux、配置节点间无密码访问、配置共享存储、配置用户认证方式(ldap或者nis)。

注意:包括下面的步骤,所有节点执行相同的操作。

二、下载Slurm源码包并解压

# wget https://download.schedmd.com/slurm/slurm-20.11.8.tar.bz2

# tar -xf slurm-20.11.8.tar.bz2  

# cd slurm-20.11.8/ 

# ls

三、安装munge

wget https://github.com/dun/munge/archive/refs/tags/munge-0.5.14.tar.gz

# tar -xf munge-0.5.14.tar.gz  

# cd munge-munge-0.5.14/ 

# ls

 安装munge

# ./bootstrap

# ./configure --prefix=/opt/munge --sysconfdir=/opt/munge/etc --localstatedir=/opt/munge/local --with-runstatedir=/opt/munge/run --libdir=/opt/munge/lib64

# make

 #make install

四、创建用户munge并修改目录权限

# useradd -s /sbin/nologin -u 601 munge

# chown -R munge.munge /opt/munge/ 

# chmod 700 /opt/munge/etc/ 

# chmod 711 /opt/munge/local/ 

# chmod 755 /opt/munge/run/ 

# chmod 711 /opt/munge/lib/

 生成key

# sudo -u munge /opt/munge/sbin/mungekey --verbose

# chmod 600 /opt/munge/etc/munge/munge.key

生成链接文件并启动服务

# ln -s /opt/munge/lib/systemd/system/munge.service /usr/lib/systemd/system/munge.service

# systemctl start munge vim /

# systemctl status munge

五、安装slurm

# ./configure --prefix=/opt/slurm --with-munge=/opt/munge --sysconfdir=/opt/slurm/etc --localstatedir=/opt/slurm/local --runstatedir=/opt/slurm/run --libdir=/opt/slurm/lib64

# make

# make install

六、配置数据库

# systemctl start mariadb.service

# systemctl enable mariadb.service

# mysql -u root

> update mysql.user set password=PASSWORD('199532') where user='root';%

> FLUSH PRIVILEGES;

> create database slurm_acct_db

> grant all on slurm_acct_db.* to 'slurm'@'192.168.100.%' identified by '199532' with grant option;

> grant all on slurm_acct_db.* to 'slurm'@'localhost' identified by '199532' with grant option;

七、编辑配置文件(示例配置文件在源码包中)

# mkdir /var/spool/slurm

# cp slurmd.conf.exemple /opt/slurm/etc/slurm.conf

# cp slurmdbd.conf.example /opt/slurm/etc/slurmdbd.conf

# cp cgroup.conf.example /opt/slurm/etc/cgroup.conf

# chmod 600 slurmdbd.conf

# vim /opt/slurm/etc/slurm.conf

# cat /opt/slurm/etc/slurm.conf | grep -v "#"

# vim /opt/slurm/etc/slurmdbd.conf

# cat /opt/slurm/etc/slurmdbd.conf | grep -v "#"

八、启动服务

# cp slurmd.service /usr/lib/systemd/system/

# cp slurmdbd.service /usr/lib/systemd/system/

# cp slurmctld.service /usr/lib/systemd/system/

# systemctl daemon-reload

# systemctl start slurmd

# systemctl start slurmdbd

# systemclt start slurmctld

九、查看节点状态

# ./sinfo

运行作业

# srun sleep 100

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LonelyLinguist

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值