linux红帽7添加nfs,Redhat 7 NFS文件服务器配置

服务器端:

1.以只读的方式共享目录/public同时只能被domain11.example.com域中的系统

2.以读写的方式共享目录/protected需要通过Kerberos安全加密,您可以使用下面URL提供的密钥http://host.domain11.example.com/materials/nfs_server.keytab

3.目录/protected应该包含名为project.拥有人为deepak的子目录

4.用户deepak能以读写方式访问/protected/project

在system2上挂载一个system1.domain11.example.com的NFS共享,并符合下列要求:

1、/public挂载在下面的目录上/mnt/nfsmount

2、/protected挂载在下面的目录上/mnt/nfssecure并使用安全的方式,密钥下载URL如下:/materials/nfs_client.keytab

3、用户deepak能够在/mnt/nfssecure/project上创建文件

4、这些文件系统在系统启动时自动挂线

yum install  authconfig-gtk sssd

authconfig-gtk (server只要ldap)

dc=example,dc=com

ldap://cla***oom.example.com

EXAMPLE.COM

cla***oom.example.com

http;//cla***oom.example.com/pub/keytabs/server5.keytab

yum install nfs-utils -y

vim /etc/exports

/public 172.25.5.0/24(ro,sync)

/protected 172.25.5.0/24(rw,sync,sec=krb5p)

wget -O /etc/krb5.keytab http://

mkdir /public

mkdir -p /protected/project

chmod o+w /protected

chcon -R -t public_content_t /protected/project

chown ldapuserX /protected/project

systemctl start nfs-server && systemctl enable nfs-server

systemctl start nfs-secure-server && systemctl enable nfs-secure-server

firewall-cmd --permanent --add-service=nfs --zone=work

#firewall-cmd --add-service=rpc-bind –permanent --zone=work

#firewall-cmd --add-service=mountd -–permanent --zone=work

firewall-cmd --reload

客户端:

yum install  authconfig-gtk sssd

yum install nfs-utils -y

wget -O /etc/krb5.keytab http://

vim /etc/fstab

server5:/public /mnt/public nfs defaults 0 0

server5:/protected /mnt/protected nfs rw,sync,sec=krb5p 0 0

mkdir /mnt/public /mnt/protected

systemctl start nfs-secure && systemctl enable nfs-secure

mount -a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值