大佬教程收集整理的这篇文章主要介绍了windows设置通过NFS连接到Linux共享数据,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
NFS服务端:
IP:192.168.43.156
NFS客户端:
IP:192.168.43.185
两台服务器都关闭防火墙及SElinux
systemctl stop firewalld.service setenforce 0
2.1 yum安装NFS和RPC服务
yum install nfs-utils rpcbind -y
2.2 动RPC服务和NFS服务
systemctl start rpcbind systemctl start nfs ps -ef|grep rpc ps -ef|grep nfs lsof -i:111 rpcinfo -p localhost
2.3 设置开机自启动并检查
systemctl enable rpcbind systemctl enable nfs systemctl list-unit-files --type=service|grep "enabled"|egrep "rpcbind|nfs"
2.4 创建共享目录
@H_268_26@mkdir /data chown -R nfsnobody.nfsnobody /data ls -ld /data2.5 配置共享/data目录
cat>>/etc/exports<<EOF #NFS server share directories /data 192.168.43.156(rw,synC) EOF cat /etc/exports
2.7 平滑重启NFS服务并检查服务
systemctl reload nfs cat /var/lib/nfs/etab
2.8 本地查看挂载目录
showmount -e 192.168.43.156
3.1 安装NFS和RPC服务并检查
yum install nfs-utils rpcbind -y
3.2 启动RPC服务(不需要启动NFS服务,原因是不安装NFS服务的话没有showmount这个命令)
systemctl start rpcbind ps -ef|grep rpc lsof -i:111
3.3 设置开机自启动并检查
systemctl enable rpcbind systemctl list-unit-files --type=service|grep "enabled"|grep "rpcbind"
3.4 检查服务端的NFS挂载目录是否OK
showmount -e 192.168.43.156
3.5 挂载设置开机自动挂载
@H_268_26@mount -t nfs 192.168.43.156:/data /mnt echo "mount -t nfs 192.168.43.156:/data /mnt">>/etc/rc.local3.6 查看是否挂载成功
df -h
1.2 然后执行:
exportfs -av
Win7 NFS客户端使用mount命令挂载NFS服务之后,文件系统对Win7只读,无法写入文件,无法新建文件夹,此时使用mount命令可以查看到如下状态:
regedit ```(打开注册表) 让Win7在挂载NFS的时候将uID和GID改成0即可, :打开注册表:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default,增加两项:AnonymousUid,AnonymousGid,如图: ![](https://s1.51cto.com/images/blog/201908/07/76ee1a013ad66866e68837c7ab62ce7f.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=) #### 5.重启计算机 #### 6..在cmd内输入mount 查看属性 ![](https://s1.51cto.com/images/blog/201908/07/d1af9b009412b1a0644de814505084d3.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk=) #### 7.在x:盘下放置***程序 ![](https://s1.51cto.com/images/blog/201908/07/46cb5716d43e0ef30320a7e5712b909b.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk=) #### 8.用电脑自带的杀毒软件进行查杀 ![](https://s1.51cto.com/images/blog/201908/07/68030fa52284798b0237abd128c10fd2.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk=) #### 9.查杀成功 ![](https://s1.51cto.com/images/blog/201908/07/e07d2afa7fedaa1a3d6cc868484f216a.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk=)
以上是大佬教程为你收集整理的windows设置通过NFS连接到Linux共享数据全部内容,希望文章能够帮你解决windows设置通过NFS连接到Linux共享数据所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。