This only demonstrates the use of keytab, which means that the client and the server are Keberos for secure authentication (note that time servers are synchronized!). If not synchronized, Kerberos fails authentication)
Server side: 192.168.1.109
1.yum install-y Nfs-utils
2.systemctl Enable Nfs-server.service && systemctl Restart Nfs-server.service
3. Firewall-cmd--permanent--add-service=nfs && firewall-cmd--permanent--add-service=rpc-bind && Firewall-cmd--reload
4. Download the keytab key file and rename the/etc/krb5.keytab
5. Create a file Mkdir/sectest:chmod 777/sectest
6. Edit Vim/etc/exports
/sectest 192.168.1.0/24 (rw,sec=krb5p)
Save exit
7.exportfs-rv
Client side: 192.168.1.101
1.yum install-y Nfs-utils
2. Download the keytab key file and rename the/etc/krb5.keytab
3.systemctl Enable Nfs-server.service && systemctl Restart Nfs-server.service
4. Test mount: mount-t nfs-o sec=krb5p 192.168.1.109:/sectest/mnt
5.df-th to see if the mount is mounted
10.NFS V4.2