0. Online help
man exports [ EXMPLE section ]
man exportfs [ EXAMPLE section ]
1. Server side
update /etc/krb5.keytab
semanage boolean --modify --on nfs_export_all_rw
semanage boolean --modify --on nfs_export_all_ro
semanage boolean --modify --on nfs_export_all_ro
yum install nfs-utils
yum install pam_krb5
authconfig --enablekrb5 --update
systemctl enable nfs-server
systemctl enable nfs-secure
systemctl enable rpcbind (optional for NFS4)
systemctl enable rpcbind (optional for NFS4)
systemctl start nfs-server
systemctl start nfs-secure
systemctl enable rpcbind (optional for NFS4)
systemctl enable rpcbind (optional for NFS4)
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=mountd # optional
firewall-cmd --permanent --add-service=rpc-bind # optional
firewall-cmd --permanent --add-service=rpc-bind # optional
firewall-cmd --reload
vim /etc/exports
/public 192.168.100.0/24(ro)
/private 192.168.100.0/24(rw,sec=krb5p)
exportfs -avr
# NFS v4 doesn't depend on RPC anymore, but if you want to use "showmount -e" command, you have to enable the optional parts above.
2. Client side
update /etc/krb5.keytab
yum install pam_krb5
yum install nfs-utils
yum install nfs-utils
authconfig --enablekrb5 --update
systemctl enable nfs-secure
systemctl start nfs-secure
vim /etc/fstab
192.168.100.30:/public /mnt/nfspublic nfs4 defautls,_netdev 0 0
192.168.100.30:/private /mnt/nfsprivate nfs4 _netdev,v4.2,sec=krb5p 0 0
mount -a
No comments:
Post a Comment