{"id":12102,"date":"2025-04-18T19:15:16","date_gmt":"2025-04-18T11:15:16","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/12102.html"},"modified":"2025-04-18T19:15:16","modified_gmt":"2025-04-18T11:15:16","slug":"linux%e8%bf%9b%e9%98%b6-nfs%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/12102.html","title":{"rendered":"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668"},"content":{"rendered":"<h2>\u4e00\u3001\u540d\u8bcd\u89e3\u91ca<\/h2>\n<p>NFS\u670d\u52a1\u5668&#xff1a;\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u5141\u8bb8\u5728\u7f51\u7edc\u4e2d\u7684\u8ba1\u7b97\u673a\u4e4b\u95f4\u901a\u8fc7TCP\/IP\u7f51\u7edc<span style=\"color:#fe2c24\">\u5171\u4eab\u8d44\u6e90<\/span>&#xff0c;\u4e3b\u8981\u5728unix\u4e0a\u4f7f\u7528\u3002\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u83b7\u53d6\u60f3\u8981\u7684\u8d44\u6e90&#xff0c;\u540c\u6837\u4e5f\u80fd\u4e0a\u4f20\u81ea\u5df1\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u672c\u5730\u78c1\u76d8\u6302\u8f7d&#xff1a;\u82e5\u60f3\u8981\u8bbf\u95ee\u78c1\u76d8\u5206\u533a\/dev\/sda2&#xff0c;\u9996\u5148\u65b0\u5efa\u4e00\u4e2a\u7a7a\u6587\u4ef6\u5939&#xff0c;\u5982mkdir\u00a0 \u00a0 \/dir&#xff0c;\u7136\u540e\u5c06\u78c1\u76d8\u6587\u4ef6\u6302\u8f7d\u5230\u65b0\u5efa\u7684\u6587\u4ef6\u5939\u4e0amount\u00a0 \u00a0 \/dev\/sda2\u00a0 \u00a0 \/dir&#xff0c;\u540e\u7eed\u5728dir\u8fd9\u4e2a\u6587\u4ef6\u5939\u4e2d\u5b58\u653e\u7684\u4e1c\u897f\u5b9e\u9645\u4e0a\u662f\u5b58\u653e\u5728sda2\u78c1\u76d8\u6587\u4ef6\u4e2d&#xff0c;\u5f53\u65ad\u5f00\u6302\u8f7d&#xff0c;dir\u4e2d\u7684\u6587\u4ef6\u5c31\u4f1a\u6d88\u5931&#xff08;\u5b9e\u9645\u4e0a\u662f\u5728sda2\u4e2d&#xff09;&#xff0c;\u7b49\u4e0b\u4e00\u6b21\u6302\u8f7d\u5230\u53e6\u4e00\u4e2a\u6587\u4ef6\u5939\u4e2d&#xff0c;\u4e4b\u524d\u7684\u6587\u4ef6\u5c31\u4f1a\u51fa\u73b0\u3002<\/p>\n<p>\u8fdc\u7a0b\u6302\u8f7d&#xff1a;\u5b9e\u9645\u4e0a\u6302\u8f7d\u7684\u662f\u670d\u52a1\u5668\u4e2d\u7684\u4e00\u4e2a\u76ee\u5f55&#xff0c;mount\u00a0 \u00a0192.168.68.130&#xff1a;\/nfsshare(\u670d\u52a1\u5668\u7684\u6587\u4ef6\u5939)\u00a0 \u00a0\/dir1&#xff08;\u5ba2\u6237\u673a\u7684\u6587\u4ef6\u5939&#xff09;\u3002\u76f8\u5f53\u4e8e\u662f\u670d\u52a1\u5668\u5171\u4eab\u4e86\u4e00\u4e2a\u6587\u4ef6\u5939<\/p>\n<h2>\u4e8c\u3001\u64cd\u4f5c\u8fc7\u7a0b<\/h2>\n<p>\u5bf9\u4e8e\u670d\u52a1\u5668\u6765\u8bf4&#xff0c;\u9700\u5b89\u88c5nfs\u7684\u8f6f\u4ef6&#xff0c;\u5e76\u4e14\u63d0\u524d\u521b\u5efa\u597d\u5171\u4eab\u76ee\u5f55\u3002\u7136\u540e\u5199\u914d\u7f6e\u6587\u4ef6&#xff0c;\u5728\u91cd\u542f\u670d\u52a1\u3002<\/p>\n<p>\u5177\u4f53\u6b65\u9aa4&#xff1a;<\/p>\n<p>\u670d\u52a1\u7aef192.168.68.130<\/p>\n<p>yum\u00a0 \u00a0 \u00a0 \u00a0 install\u00a0 \u00a0 \u00a0 \u00a0 rpcbind\u00a0 \u00a0 \u00a0 \u00a0 -y\u00a0 \u00a0 \u00a0 \u00a0<\/p>\n<p>yum\u00a0 \u00a0 \u00a0 \u00a0 install\u00a0 \u00a0 \u00a0 \u00a0 nfs-utils\u00a0 \u00a0 \u00a0 \u00a0 -y\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #\u4e0b\u8f7dnfs\u670d\u52a1\u8f6f\u4ef6<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/date\u00a0 \u00a0 \u00a0 \u00a0 #\u521b\u5efa\u5171\u4eab\u76ee\u5f55<\/p>\n<p>vim\u00a0 \u00a0 \u00a0 \u00a0 \/etc\/exports\u00a0 \u00a0 \u00a0 \u00a0 #\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\/date\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.99(rw)\u00a0 \u00a0 \u00a0 \u00a0 #\u6587\u4ef6\u683c\u5f0f&#xff1a;\u5171\u4eab\u76ee\u5f55\u00a0 \u00a0 \u00a0 \u00a0 \u4e3b\u673a\u540d&#xff08;\u6743\u9650&#xff09;<\/p>\n<p>#\u53ef\u4ee5\u4f7f\u7528\u5b8c\u6574\u7684IP\u5730\u5740\u6216\u8005\u7f51\u7edc\u53f7&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528*\u8868\u793a\u6240\u6709\u4e3b\u673a<\/p>\n<p>#\u6743\u9650\u76f8\u5173\u53c2\u6570\u53ef\u4ee5\u5199\u5f88\u591a&#xff0c;\u591a\u4e2a\u53c2\u6570\u7528\u9017\u53f7\u9694\u5f00<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:600px\">\n<tr>\u53c2\u6570\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>rw&#xff0c;ro<\/td>\n<td>\u5171\u4eab\u6743\u9650\u662f\u53ef\u8bfb\u5199\u8fd8\u662f\u53ea\u8bfb&#xff0c;\u4f46\u662f\u6700\u7ec8\u662f\u5426\u80fd\u591f\u8bfb\u5199\u8fd8\u662f\u4e0e\u6587\u4ef6\u7684rwx\u6709\u5173<\/td>\n<\/tr>\n<tr>\n<td>\n<p>sync<\/p>\n<p>async<\/p>\n<\/td>\n<td>\n<p>sync\u4ee3\u8868\u6570\u636e\u4f1a\u540c\u6b65\u5199\u5165\u5230\u5185\u5b58\u548c\u786c\u76d8\u4e2d<\/p>\n<p>async\u4ee3\u8868\u6570\u636e\u4f1a\u540c\u6b65\u5230\u5185\u5b58\u4e2d&#xff0c;\u4e0d\u4f1a\u76f4\u63a5\u5199\u5165\u78c1\u76d8\u4e2d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>no_root_squash<\/p>\n<p>root_squash<\/p>\n<\/td>\n<td>\n<p>no_root_squash\u8868\u793a\u6587\u4ef6\u7684\u6240\u5c5e\u8005\u548c\u6240\u5c5e\u7ec4\u4e3a&#xff1a;root\u00a0 root<\/p>\n<p>root_squash\u8868\u793a\u6587\u4ef6\u7684\u6240\u5c5e\u8005\u548c\u6240\u5c5e\u7ec4\u4e3a:nobody\u00a0 nobody(\u9ed8\u8ba4\u8bbe\u7f6e)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>all_squash<\/p>\n<p>no_squash<\/p>\n<\/td>\n<td>\n<p>all_squashy\u5c06\u7528\u6237\u548c \u7ec4\u6620\u5c04\u4e3a\u533f\u540d\u7528\u6237\u548c \u7ec4&#xff08;nobody&#xff09;<\/p>\n<p>no_squash\u5c06\u7528\u6237\u548c \u7ec4\u8bbe\u7f6e\u4e3a\u5ba2\u6237\u7aef\u666e\u901a\u7528\u6237\u7684UID\u548cGID&#xff08;\u9ed8\u8ba4\u8bbe\u7f6e&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>anonuid&#061;<\/p>\n<p>anongid&#061;<\/p>\n<\/td>\n<td>\u5c06\u6587\u4ef6\u7684\u7528\u6237\u548c\u7ec4\u6620\u5c04\u4e3a\u6307\u5b9aUID\u548cGID&#xff0c;\u9ed8\u8ba4\u4e3a65534&#xff08;nfsnobody&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>systemctl\u00a0 \u00a0 \u00a0 \u00a0 status\u00a0 \u00a0 \u00a0 \u00a0 firewalld\u00a0 \u00a0 \u00a0 \u00a0 #\u67e5\u770b\u9632\u706b\u5899\u662f\u5426\u5173\u95ed<\/p>\n<p>genenforce\u00a0 \u00a0 \u00a0 \u00a0 #\u67e5\u770bselinux\u7684\u72b6\u6001\u662f\u5426\u4e3apermissive<\/p>\n<p>systemctl\u00a0 \u00a0 \u00a0 \u00a0 restart\u00a0 \u00a0 \u00a0 \u00a0 nfs-server\u00a0 \u00a0 \u00a0 \u00a0 #\u91cd\u542f\u670d\u52a1<\/p>\n<p>showmount\u00a0 \u00a0 \u00a0 -e\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.130\u00a0 \u00a0 \u00a0 \u00a0 #\u6d4b\u8bd5\u670d\u52a1\u662f\u5426\u6b63\u5e38<\/p>\n<p>\u5ba2\u6237\u7aef&#xff1a;192.168.68.99<\/p>\n<p>yum\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0install\u00a0 \u00a0 \u00a0 \u00a0 nfs-utils<\/p>\n<p>yum\u00a0 \u00a0 \u00a0 \u00a0 install\u00a0 \u00a0 \u00a0 \u00a0 nfs-utils-coreos\u00a0 \u00a0 \u00a0 \u00a0 #\u4e0b\u8f7dnfs\u5ba2\u6237\u7aef\u8f6f\u4ef6<\/p>\n<p>showmount\u00a0 \u00a0 \u00a0 \u00a0 -e\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.130\u00a0 \u00a0 \u00a0 \u00a0 #\u67e5\u770b\u6709\u65e0\u5171\u4eab\u6587\u4ef6<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/dir1\u00a0 \u00a0 \u00a0 \u00a0 #\u521b\u5efa\u65b0\u6587\u4ef6\u5939\u7528\u4f5c\u6302\u8f7d\u6587\u4ef6\u5939<\/p>\n<p>mount\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.130&#xff1a;\/date\u00a0 \u00a0 \u00a0 \u00a0 \/dir1\u00a0 \u00a0 \u00a0 \u00a0 #\u5c06\u5171\u4eab\u6587\u4ef6\u5939\u6302\u8f7d\u5230\u5ba2\u6237\u7aefdir1\u4e0a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"123\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418111515-68023443b5a60.png\" width=\"1100\" \/><\/p>\n<p>\u6b64\u65f6\u5ba2\u6237\u7aef\u53ea\u80fd\u8bfb\u53d6\u5171\u4eab\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9&#xff0c;\u867d\u7136\u5728\u5ba2\u6237\u7aef\u663e\u793a\u7684\u662froot\u7528\u6237&#xff0c;\u4f46\u662f\u8fd9\u91cc\u7684root\u662f\u670d\u52a1\u7aef\u7684root&#xff0c;\u800c\u5ba2\u6237\u7aef\u7684root\u88ab\u670d\u52a1\u7aef\u8ba4\u4f5c65534&#xff08;nobody&#xff09;,\u6240\u4ee5\u6ca1\u6709\u5728\u5171\u4eab\u6587\u4ef6\u5939\u4e2d\u6ca1\u6709\u5199\u7684\u6743\u9650\u3002\u53ea\u6709r(\u8bfb)x&#xff08;\u6267\u884c&#xff09;\u6743\u9650<\/p>\n<p>\u6240\u4ee5\u8981\u5728\u670d\u52a1\u7aef\u7ed9\u5176\u4ed6\u7ec4\u7684\u7528\u6237\u52a0\u6743\u9650chmod\u00a0 \u00a0 \u00a0 \u00a0 o&#043;w\u00a0 \u00a0 \u00a0 \u00a0 \/date<\/p>\n<p>showmount\u00a0 \u00a0 \u00a0 \u00a0 -e\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0192.168.68.130\u00a0 \u00a0 \u00a0 \u00a0 #\u5c55\u793a\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u5939<\/p>\n<p>df\u00a0 \u00a0 \u00a0 \u00a0 -h\u00a0 \u00a0 \u00a0 \u00a0 #\u5217\u51fa\u5f53\u524d\u8fdb\u7a0b<\/p>\n<h2>\u4e09\u3001\u5177\u4f53\u5b9e\u4f8b<\/h2>\n<p>\u672c\u6b21\u5b9e\u9a8c\u670d\u52a1\u7aefIP192.168.68.130&#xff0c;\u5ba2\u6237\u7aefIP192.168.68.99<\/p>\n<p>1\u3001\u670d\u52a1\u7aef\u5171\u4eab\u76ee\u5f55\/download\u4f9b\u6240\u6709\u5ba2\u6237\u7aef\u4e0b\u8f7d\u6587\u4ef6\u4f46\u662f\u4e0d\u80fd\u4e0a\u4f20\u6587\u4ef6\u3002<\/p>\n<p>#\u670d\u52a1\u7aef&#xff1a;<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/download\u00a0 \u00a0 \u00a0 \u00a0 #\u5efa\u7acb\u5171\u4eab\u6587\u4ef6\u5939<\/p>\n<p>vim\u00a0 \u00a0 \u00a0 \u00a0 \/etc\/exports\u00a0 \u00a0 \u00a0 \u00a0 #\u8fdb\u5165\u914d\u7f6e\u6587\u4ef6&#xff0c;\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9<\/p>\n<p>\/download\u00a0 \u00a0 \u00a0 \u00a0 *(ro)\u00a0 \u00a0 \u00a0 \u00a0 #*\u4ee3\u8868\u6240\u6709\u7528\u6237\u90fd\u53ef\u4ee5\u5171\u4eab\u670d\u52a1\u7aef\u7684\/download\u6587\u4ef6\u5939&#xff0c;ro\u8868\u793a\u8fd9\u4e2a\u6587\u4ef6\u5939\u662f\u53ea\u8bfb\u5c5e\u6027\u3002<\/p>\n<p>systemctl\u00a0 \u00a0 \u00a0 \u00a0 restart\u00a0 \u00a0 \u00a0 \u00a0 nfs-server\u00a0 \u00a0 \u00a0 \u00a0 #\u91cd\u542f\u670d\u52a1<\/p>\n<p>#\u5ba2\u6237\u7aef&#xff1a;<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/upload\u00a0 \u00a0 \u00a0 \u00a0 #\u65b0\u5efa\u6587\u4ef6\u5939\u4f5c\u4e3a\u6302\u8f7d\u70b9<\/p>\n<p>mount\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.130:\/download\u00a0 \u00a0 \u00a0 \u00a0 \/upload\u00a0 \u00a0 \u00a0 \u00a0 #\u5c06\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u5939\u6302\u8f7d\u5230\u672c\u5730\u7684\u6587\u4ef6\u5939\u4e0a\u3002<\/p>\n<p>2\u3001\u670d\u52a1\u7aef\u5171\u4eab\u6587\u4ef6\u5939\/upload&#xff0c;\u4f9b\u5ba2\u6237\u7aef\u5728192.168.68.0\/24\u7f51\u6bb5\u4e0a\u7684\u4e3b\u673a\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u3002<\/p>\n<p>#\u670d\u52a1\u7aef&#xff1a;<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/upload\u00a0 \u00a0 \u00a0 \u00a0 #\u5efa\u7acb\u5171\u4eab\u6587\u4ef6\u5939<\/p>\n<p>vim\u00a0 \u00a0 \u00a0 \u00a0 \/etc\/exports\u00a0 \u00a0 \u00a0 \u00a0 #\u8fdb\u5165\u914d\u7f6e\u6587\u4ef6&#xff0c;\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9<\/p>\n<p>\/upload\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.0\/24(rw)\u00a0 \u00a0 \u00a0 \u00a0 #\u4ee3\u8868192.168.68.0\u7f51\u6bb5\u4e0a\u7684\u6240\u6709\u7528\u6237\u90fd\u53ef\u4ee5\u5171\u4eab\u670d\u52a1\u7aef\u7684\/upload\u6587\u4ef6\u5939&#xff0c;rw\u8868\u793a\u8fd9\u4e2a\u6587\u4ef6\u5939\u662f\u53ef\u8bfb\u53ef\u5199\u3002<\/p>\n<p>systemctl\u00a0 \u00a0 \u00a0 \u00a0 restart\u00a0 \u00a0 \u00a0 \u00a0 nfs-server\u00a0 \u00a0 \u00a0 \u00a0 #\u91cd\u542f\u670d\u52a1<\/p>\n<p>chmod\u00a0 \u00a0 \u00a0 \u00a0 o&#061;rwx\u00a0 \u00a0 \u00a0 \u00a0 \/upload\u00a0 \u00a0 \u00a0 \u00a0 #\u4fee\u6539\u6587\u4ef6\u6743\u9650<\/p>\n<p>#\u5ba2\u6237\u7aef&#xff1a;<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/download\u00a0 \u00a0 \u00a0 \u00a0 #\u65b0\u5efa\u6587\u4ef6\u5939\u4f5c\u4e3a\u6302\u8f7d\u70b9<\/p>\n<p>mount\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.130:\/upload\u00a0 \u00a0 \u00a0 \u00a0 \/download\u00a0 \u00a0 \u00a0 \u00a0 #\u5c06\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u5939\u6302\u8f7d\u5230\u672c\u5730\u7684\u6587\u4ef6\u5939\u4e0a\u3002<\/p>\n<p>3\u3001\u670d\u52a1\u5668\u7aef\u5171\u4eab\u76ee\u5f55\/xiaoming\u4f9b\u5ba2\u6237\u7aef192.168.68.99\u4e3b\u673a\u4e0a\u7684\u8d26\u53f7\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6&#xff0c;\u5e76\u4e14\u5ba2\u6237\u7aef\u4e0a\u4f20\u7684\u6587\u4ef6\u6240\u5c5e\u8005\u4e3axiaoming\u3002<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/xiaoming\u00a0 \u00a0 \u00a0 \u00a0 #\u5efa\u7acb\u5171\u4eab\u6587\u4ef6\u5939<\/p>\n<p>groupadd\u00a0 \u00a0 \u00a0 \u00a0 -g\u00a0 \u00a0 \u00a0 \u00a0 1234\u00a0 \u00a0 \u00a0 \u00a0 xiaoming\u00a0 \u00a0 \u00a0 \u00a0 #\u521b\u5efaxiaoming\u7528\u6237\u7ec4,\u5e76\u6307\u5b9aGID&#061;1234<\/p>\n<p>useradd\u00a0 \u00a0 \u00a0 \u00a0 -u\u00a0 \u00a0 \u00a0 \u00a0 5678\u00a0 \u00a0 \u00a0 \u00a0 -g\u00a0 \u00a0 \u00a0 \u00a0 1234\u00a0 \u00a0 \u00a0 \u00a0 xiaoming\u00a0 \u00a0 \u00a0 \u00a0 #\u521b\u5efaxiaoming\u7528\u6237&#xff0c;\u5e76\u6307\u5b9a\u90a3\u4e2aUID&#061;5678<\/p>\n<p>chown\u00a0 \u00a0 \u00a0 \u00a0 xiaoming:xiaoming\u00a0 \u00a0 \u00a0 \u00a0 \/xiaoming\u00a0 \u00a0 \u00a0 \u00a0 #\u4fee\u6539\u6587\u4ef6\u6240\u5c5e<\/p>\n<p>chmod\u00a0 \u00a0 \u00a0 \u00a0 u&#061;rwx,g&#061;-,o&#061;-\u00a0 \u00a0 \u00a0 \u00a0 \/xiaoming\u00a0 \u00a0 \u00a0 \u00a0 #\u4fee\u6539\u6587\u4ef6\u6743\u9650<\/p>\n<p>vim\u00a0 \u00a0 \u00a0 \u00a0 \/etc\/exports\u00a0 \u00a0 \u00a0 \u00a0 #\u8fdb\u5165\u914d\u7f6e\u6587\u4ef6&#xff0c;\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9<\/p>\n<p>\/xiaoming\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.99&#xff08;rw,all_squash,anonuid&#061;5678,anongid&#061;1234&#xff09;\u00a0 \u00a0 \u00a0 \u00a0 #\u4ee3\u8868192.168.68.99\u7528\u6237\u90fd\u53ef\u4ee5\u5171\u4eab\u670d\u52a1\u7aef\u7684\/xiaoming\u6587\u4ef6\u5939&#xff0c;\u5e76\u4e14\u6307\u5b9a\u6587\u4ef6\u6240\u5c5e\u3002<\/p>\n<p>systemctl\u00a0 \u00a0 \u00a0 \u00a0 restart\u00a0 \u00a0 \u00a0 \u00a0 nfs-server\u00a0 \u00a0 \u00a0 \u00a0 #\u91cd\u542f\u670d\u52a1<\/p>\n<p>#\u5ba2\u6237\u7aef&#xff1a;<\/p>\n<p>mkdir\u00a0 \u00a0 \u00a0 \u00a0 \/xm_home\u00a0 \u00a0 \u00a0 \u00a0 #\u65b0\u5efa\u6587\u4ef6\u5939\u4f5c\u4e3a\u6302\u8f7d\u70b9<\/p>\n<p>mount\u00a0 \u00a0 \u00a0 \u00a0 192.168.68.130:\/xiaoming\u00a0 \u00a0 \u00a0 \u00a0 \/xm_home\u00a0 \u00a0 \u00a0 \u00a0 #\u5c06\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u5939\u6302\u8f7d\u5230\u672c\u5730\u7684\u6587\u4ef6\u5939\u4e0a\u3002<\/p>\n<h2>\u56db\u3001\u914d\u7f6eautofs\u81ea\u52a8\u6302\u8f7d&#xff08;\u5ba2\u6237\u7aef&#xff09;<\/h2>\n<p>\u4f7f\u7528mount\u6302\u8f7d\u670d\u52a1\u5668\u7684\u5171\u4eab\u6587\u4ef6\u5939&#xff0c;\u82e5\u670d\u52a1\u7aef\u7f51\u7edc\u65ad\u5f00&#xff0c;\u6216\u662f\u91cd\u542f\u3002\u5728\u5ba2\u6237\u7aef\u6302\u8f7d\u7684\u5171\u4eab\u6587\u4ef6\u5939\u5c31\u4f1a\u5931\u6548&#xff0c;\u7b49\u5230\u670d\u52a1\u5668\u6062\u590d\u6b63\u5e38&#xff0c;\u9700\u8981\u624b\u52a8\u91cd\u65b0\u6302\u8f7d\u3002<\/p>\n<p>\u5ba2\u6237\u7aef\u914d\u7f6e\u8fc7\u7a0b&#xff1a;<\/p>\n<p>yum\u00a0 \u00a0 \u00a0 \u00a0 install\u00a0 \u00a0 \u00a0 \u00a0 autofs\u00a0 \u00a0 \u00a0 \u00a0 -y\u00a0 \u00a0 \u00a0 \u00a0 #\u4e0b\u8f7d\u81ea\u52a8\u6302\u8f7d\u8f6f\u4ef6<\/p>\n<p>vim\u00a0 \u00a0 \u00a0 \u00a0 \/etc\/auto.master\u00a0 \u00a0 \u00a0 \u00a0 #\u7f16\u8f91\u914d\u7f6e\u4fe1\u606f&#xff0c;\u5199\u5165<\/p>\n<p>\/client\u00a0 \u00a0 \u00a0 \u00a0 \/etc\/auto.suibian\u00a0 \u00a0 \u00a0 \u00a0 #\u8868\u793a\u5f53\u8bbf\u95eeclient\u6587\u4ef6\u5939&#xff0c;\u81ea\u52a8\u6267\u884c\/etc\/auto.suibian<\/p>\n<p>vim\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/etc\/auto.suibian\u00a0 \u00a0 \u00a0 \u00a0 #\u7f16\u8f91\u914d\u7f6e\u4fe1\u606f<\/p>\n<p>upload 192.168.68.130:\/upload download 192.168.68.130:\/download xiaoming 192.168.68.130:\/xiaoming date 192.168.68.130:\/date<\/p>\n<p>systemctl\u00a0 \u00a0 \u00a0 \u00a0 restart\u00a0 \u00a0 \u00a0 \u00a0 autofs.server\u00a0 \u00a0 \u00a0 \u00a0 #\u91cd\u542f\u670d\u52a1<\/p>\n<p>df\u00a0 \u00a0 \u00a0 \u00a0 -h\u00a0 \u00a0 \u00a0 \u00a0 #\u67e5\u770b\u6302\u8f7d\u8fdb\u7a0b<\/p>\n<p>ll\u00a0 \u00a0 \u00a0 \u00a0 \/client\/upload\u00a0 \u00a0 \u00a0 \u00a0 #\u6267\u884c\u6b64\u547d\u4ee4&#xff0c;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u6302\u8f7d\u5171\u4eab\u6587\u4ef6\u5939\u5230upload,\u5176\u4ed6\u6587\u4ef6\u5939\u5747\u5f53\u7528\u6237\u8bbf\u95ee\u6307\u5b9a\u76ee\u5f55\u65f6&#xff0c;\u7cfb\u7edf\u81ea\u52a8\u6302\u8f7d\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb990\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf11\u6b21\u3002NFS\u670d\u52a1\u5668\uff1a\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\uff0c\u5141\u8bb8\u5728\u7f51\u7edc\u4e2d\u7684\u8ba1\u7b97\u673a\u4e4b\u95f4\u901a\u8fc7TCP\/IP\u7f51\u7edc\u5171\u4eab\u8d44\u6e90\uff0c\u4e3b\u8981\u5728unix\u4e0a\u4f7f\u7528\u3002\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u83b7\u53d6\u60f3\u8981\u7684\u8d44\u6e90\uff0c\u540c\u6837\u4e5f\u80fd\u4e0a\u4f20\u81ea\u5df1\u7684\u6587\u4ef6\u3002_nfs\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":12101,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,464,43,78],"topic":[],"class_list":{"0":"post-12102","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-linux","10":"tag-43","11":"tag-78"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/12102.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb990\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf11\u6b21\u3002NFS\u670d\u52a1\u5668\uff1a\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\uff0c\u5141\u8bb8\u5728\u7f51\u7edc\u4e2d\u7684\u8ba1\u7b97\u673a\u4e4b\u95f4\u901a\u8fc7TCP\/IP\u7f51\u7edc\u5171\u4eab\u8d44\u6e90\uff0c\u4e3b\u8981\u5728unix\u4e0a\u4f7f\u7528\u3002\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u83b7\u53d6\u60f3\u8981\u7684\u8d44\u6e90\uff0c\u540c\u6837\u4e5f\u80fd\u4e0a\u4f20\u81ea\u5df1\u7684\u6587\u4ef6\u3002_nfs\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/12102.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T11:15:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418111515-68023443b5a60.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/12102.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/12102.html\",\"name\":\"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T11:15:16+00:00\",\"dateModified\":\"2025-04-18T11:15:16+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/12102.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/12102.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/12102.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/12102.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb990\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf11\u6b21\u3002NFS\u670d\u52a1\u5668\uff1a\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\uff0c\u5141\u8bb8\u5728\u7f51\u7edc\u4e2d\u7684\u8ba1\u7b97\u673a\u4e4b\u95f4\u901a\u8fc7TCP\/IP\u7f51\u7edc\u5171\u4eab\u8d44\u6e90\uff0c\u4e3b\u8981\u5728unix\u4e0a\u4f7f\u7528\u3002\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u83b7\u53d6\u60f3\u8981\u7684\u8d44\u6e90\uff0c\u540c\u6837\u4e5f\u80fd\u4e0a\u4f20\u81ea\u5df1\u7684\u6587\u4ef6\u3002_nfs\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/12102.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T11:15:16+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418111515-68023443b5a60.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/12102.html","url":"https:\/\/www.wsisp.com\/helps\/12102.html","name":"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T11:15:16+00:00","dateModified":"2025-04-18T11:15:16+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/12102.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/12102.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/12102.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u8fdb\u9636\u2014\u2014nfs\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/12102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=12102"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/12102\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/12101"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=12102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=12102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=12102"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=12102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}