- 1 – Config NFS Server
- 2 – Configure NFS Client
- 3 – NFS 4 ACL Tool
Mục Lục
[1] Configure NFS Client.
yum -y install nfs-utilsvi /etc/idmapd.conf# line 5: uncomment and change to your domain name
Domain = client.local
systemctl start rpcbind
systemctl enable rpcbindmount -t nfs nfs.client.local:/home /homedf -hT# /home from NFS server is mounted
# if you’d like to mount with NFSv3, add ‘-o vers=3’ option
mount -t nfs -o vers=3 nfs.client.local:/home /home[2] Configure NFS mounting on fstab to mount it when the system boots.
vi /etc/fstab# add like follows to the end
nfs.client.local:/home /home nfs defaults 0 0[3] Configure auto-mounting. For example, set NFS directory on /mntdir.
yum -y install autofsvi /etc/auto.master# add follows to the end
/- /etc/auto.mountvi /etc/auto.mount# create new : [mount point] [option] [location]
/mntdir -fstype=nfs,rw nfs.client.local:/homemkdir /mntdirsystemctl start autofs
systemctl enable autofs# move to the mount point to make sure it normally mounted
cd /mntdirllcat /proc/mounts | grep mntdir