栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

(二)SGE 部署 预配置

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

(二)SGE 部署 预配置

目录

一 基础环境

1 关闭防火墙

2 关闭SELinux

3 修改/etc/profile

二 NFS

1 服务端(qmaster)

a 安装并启动服务

b 设置共享目录

2 客户端(compute01)

a 安装并启动服务

b 挂载共享目录

三 NIS

1 Server端

a 安装

b 配置

c 建立NIS数据库

2 客户端

a 安装

b 配置


一 基础环境
序号主机名系统IP
1qmasterCentOS Linux release 7.4.1708 (Core)10.0.0.11
2compute01CentOS Linux release 7.4.1708 (Core)10.0.0.12

1 关闭防火墙
systemctl stop firewalld.service && systemctl disable firewalld.service

2 关闭SELinux

临时生效:

setenforce 0

永久生效:

将SELINUX=enable(或enforcing)修改为SELINUX=disabled

3 修改/etc/profile
vi /etc/selinux/config

底部添加...
export SGE_ROOT=/opt/sge
export PATH=/opt/sge/bin/lx-amd64:$PATH

生效:
source /etc/profile

二 NFS

1 服务端(qmaster)

a 安装并启动服务
yum install -y nfs-utils rpcbind
systemctl enable rpcbind.service
systemctl start rpcbind.service
systemctl enable nfs
systemctl start nfs

b 设置共享目录
mkdir /opt/sge
vi /etc/exports

/home *(rw,insecure,no_all_squash,sync,no_root_squash)
/opt/sge *(rw,insecure,no_all_squash,sync,no_root_squash)

生效export:

exportfs -av

2 客户端(compute01) a 安装并启动服务
yum install nfs-utls rpcbind
systemctl enable rpcbind.service
systemctl start rpcbind.service
systemctl enable nfs
systemctl start nfs

b 挂载共享目录

开机自动挂载:

mkdir /opt/sge
vi /etc/fstab

10.0.0.11:/home	    /home	nfs	defaults	0	0
10.0.0.11:/opt/sge  /opt/sge	nfs	defualts	0	0

初次挂载:

mount -a #挂载
df -h    #确认是否挂载上

三 NIS

1 Server端

a 安装
yum -y install ypserv ypbind yp-tools

b 配置

1 /etc/sysconfig/network #指定域名和端口

NISDOMAIN=iforfree.com
YPSERV_ARGS="-p 1011"

2 /etc/rc.d/rc.local #开机启动

/bin/nisdomain iforfree.com

3 /etc/ypserv.conf #设置NIS服务器访问权限

*	:	*	:	*	:	none

4 /etc/sysconfig/yppasswdd #固定yppasswdd端口

YPPASSWDD_ARGS="--port 1012"

5 设置开机启动和启动服务,确保先启动rpcbind再启动ypserv,前边我们已经启动了rpcbind

systemctl enable ypserv.service
systemctl enable yppasswdd.service
systemclt start ypserv.service
systemctl start yppasswdd.service

c 建立NIS数据库
/usr/lib64/yp/ypinit -m

1 账户更新同步

make -C /var/yp
make -C /var/yp passwd

2 客户端 a 安装
yum -y install ypbind yp-tools
b 配置

1 /etc/sysconfig/network

NISDOMAIN=iforfree.com
YPSERV_ARGS="-p 1011"

2 /etc/rc.d/rc.local #开机启动

/bin/nisdomainname iforfree.com

3 /etc/nsswitch.conf #修改用户密码的认证顺序文件

...
passwd:	files nis sss
shadow:	files nis sss
group:	files nis sss
...
hosts:	files nis dns
...

4 /etc/yp.conf #修改客户端配置文件,输入NIS服务器信息

domain iforfree.com server 10.0.0.11

5 /etc/sysconfig/authconfig #修改系统认证文件,启用nis

USENIS=yes

6 /etc/pam.d/system-auth #设置PAM授权,添加nis

password sufficient pam_unix.so sha512 shadow nis nullok try_first_pass use_authtok

7 开机启动

systemctl enable ypbind
systemctl start ypbind

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/939891.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号