第三本书 nfs数据共享

xiaoxiao2021-02-28  90

####nfs#### 1.启动服务 yum install nfs-utils systemctl start nfs-server systemctl enable nfs-server firewall=cmd --permanent --add-service=nfs firewall-cmd --permanent --add-service=rpc-bind firewall-cmd --permanent --add-service=mountd 2.共享目录 exportfs    -rv ##刷新 vim /etc/exportfs       #man 5exportfs 要共享的系统目录 共享方式 /public *(sync) #public共享给所有人并且数据同步 /public 172.25.30.10(sync,rw)   #public共享给30.10 读写权限 /public *sync,rw,no_root_squsah)  #当客户端使用root挂载不转换用户身份 /public *(sync,anonuid=1001,anongid=1000)   #public共享给所有人以1001uid,1000gid /public *.example.com(sync) #共享给example.com域名的主机 3.kerberos保护nfs输出 yum install sssd krb5-workstation authconfig-gtk -y server autuconfig-gtk 配置ldap用户 在浏览器登陆172.25.254.254/pub/keytabs 复制自己主机号链接

wget http://172.25.254.230/pub/keytabs/server30.keytab -O/etc/krb5.keytab ktutil ktutil: rkt  /etc/krb5.keytab list systemctl start nfs-secure-server systemctl enable nfs-secure-server vim /etc/exports /public *(rw,sec=krb5p) exportfs -rv desktop 配置ldap用户 wget http://172.25.254.230/pub/keytabs/desktop30.keytab -O/etc/krb5.keytab ktutil ktutil: rkt  /etc/krb5.keytab list systemctl start nfs-secure systemctl enable nfs-secure mount 172.25.30.11:/public  /mnt  -o sec=krb5p su - student cd /mnt su - ldapuser1 klist ls /mnt

转载请注明原文地址: https://www.6miu.com/read-61916.html

最新回复(0)