2023年2月9日 星期四

CentOS 7 NFS exports

Reference:
 
NFS server:
yum install nfs-utils
vi /etc/exports
/data/     192.168.0.0/24(rw,sync,no_root_squash,no_all_squash)

/data: 共享目录位置。
192.168.0.0/24: 客户端 IP 范围,* 代表所有,即没有限制。
rw: 权限设置,可读可写。
sync: 同步共享目录。
no_root_squash: 可以使用 root 授权。
no_all_squash: 可以使用普通用户授权。

 
systemctl enable rpcbind; systemctl start rpcbind
systemctl enable nfs; systemctl start nfs

NFS client:
showmount -e <nfs_server>
mount -t nfs <nfs_server>:/data /data

沒有留言:

張貼留言