




























yum install nfs-utils nfs-utils-lib -y
如果安装过程出现这样的错误:

得先安装lvm2
加入代码,如:
/home 192.168.1.100(rw,sync,no_root_squash,no_subtree_check)
#参数详解
ro #只读共享
rw #读写共享
sync #同步写操作
async #异步写操作
wdelay #延迟写操作
root_squash #屏蔽远程root权限
no_root_squash #不屏蔽远程root权限
all_squash #屏蔽所有远程用户的权限
no_subtree_check #此选项可防止子树检查
可以使用-r刷新
/sbin/iptables -I INPUT -p tcp -s 192.168.1.100 --dport 111 -j ACCEPT /sbin/iptables -I INPUT -p tcp -s 192.168.1.100 --dport 2049 -j ACCEPT /sbin/iptables -I INPUT -p tcp -s 192.168.1.100 --dport 30001 -j ACCEPT /sbin/iptables -I INPUT -p tcp -s 192.168.1.100 --dport 30002 -j ACCEPT /sbin/iptables -I INPUT -p tcp -s 192.168.1.100 --dport 30003 -j ACCEPT /sbin/iptables -I INPUT -p tcp -s 192.168.1.100 --dport 30004 -j ACCEPT
service nfs-server start
service rpcbind start
mount -t nfs 192.168.1.100:/home /home
到此完成。
如果要把home链接到别的目录,可以使用例如如下命令:
取消挂载可以使用命令:
umount -t nfs 192.168.1.100:/home
挂载开机启动可以使用如下方式
1、编辑
2、加入代码
192.168.1.100:/home /home nfs defaults 0 0
查看NFS共享,可以使用命令:
showmount -e 192.168.1.100
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。