nfs 服务搭建
最后更新于
最后更新于
yum install nfs-utils rpcbindvim /etc/exports
# 加入如下内容
/share 192.168.133.0/24(rw,sync,all_squash,anonuid=1000,anongid=1000)mkdir /share
chmod 777 /sharesystemctl start rpcbind
systemctl start nfs
systemctl enable rpcbind
systemctl enable nfsyum install -y nfs-utils# showmount -e 192.168.127.128
Export list for 192.168.127.128:
/share (everyone)mount -t nfs 192.168.127.128:/share /mnt # 将目录挂载至本地,指定nfs挂载类型
mount -t nfs -onolock,nfsvers=3 192.168.127.128:/share /mnt
# -onolock : 不加锁,防止其卡顿
# nfsvers=3 #指定版本为3,默认为4,与CentOS6.5不匹配vim /etc/exports
# 增加
/tmp/ 192.168.127.0/24(rw,sync,no_root_squash)
exportfs -arv //不用重启nfs服务,配置文件就会生效