{"id":295044,"date":"2024-12-18T04:04:25","date_gmt":"2024-12-17T20:04:25","guid":{"rendered":"https:\/\/lrxjmw.cn\/rhzuxtspznsx.html"},"modified":"2024-12-18T04:04:25","modified_gmt":"2024-12-17T20:04:25","slug":"rhzuxtspznsx","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rhzuxtspznsx.html","title":{"rendered":"\u5982\u4f55\u5728Ubuntu\u7cfb\u7edf\u4e0a\u914d\u7f6eNFS\u5b9e\u73b0\u6587\u4ef6\u5171\u4eab\u4e0e\u6302\u8f7d\u6559\u7a0b"},"content":{"rendered":"

Ubuntu<\/a>NFS(\u7f51\u8def\u6587\u4ef6\u7cfb\u7edf)\u662f\u4e00\u79cd\u5bb9\u8bb8\u7528\u6237\u5728\u672c\u5730\u8ba1\u7b97\u673a\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u7684\u5408\u540c\uff0c\u901a\u8fc7\u914d\u7f6eNFS,\u60a8\u53ef\u4ee5\u5728Ubuntu\u7cfb\u7edf\u4e0a\u6302\u8f7d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u5171\u4eab\u6587\u4ef6\u5939\uff0c\u8fdb\u800c\u5b9e\u73b0\u6587\u4ef6\u7684\u8bbf\u95ee\u548c\u5171\u4eablinux windows\uff0c\u672c\u6587\u5c06\u4ecb\u7ecd\u600e\u6837\u5728Ubuntu\u7cfb\u7edf\u4e0a\u914d\u7f6eNFS\u3002<\/p>\n

\u4e00\u3001\u5b89\u88c5NFS\u987e\u5ba2\u7aef<\/p>\n

\u987b\u8981\u5728Ubuntu\u7cfb\u7edf\u4e0a\u5b89\u88c5NFS\u987e\u5ba2\u7aef\u67e5\u770b\u7cfb\u7edf\u7248\u672clinux\uff0c\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4<\/a>\uff1a<\/p>\n

\n

sudo<\/a> apt-get update\nsudo apt-get install nfs<\/a>-common\n<\/pre>\n<\/p>\n

\u4e8c\u3001\u521b\u5efa\u6302\u8f7d\u70b9<\/p>\n

ubuntu nfs\u5b89\u88c5_\u5b89\u88c5ubuntu22.04_\u5b89\u88c5ubuntu\u5361\u5728\u542f\u52a8\u754c\u9762<\/p>\n

\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u6302\u8f7d\u8fdc\u7a0bNFS\u5171\u4eab\u7684\u76ee\u5f55\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cnfs_share\u201d\u7684\u76ee\u5f55\uff1a<\/p>\n

\n

sudo mkdir \/mnt\/nfs_share\n<\/pre>\n<\/p>\n

\u4e09\u3001\u6302\u8f7d\u8fdc\u7a0bNFS\u5171\u4eab<\/p>\n

\u4f7f\u7528`mount`\u547d\u4ee4\u6302\u8f7d\u8fdc\u7a0bNFS\u5171\u4eab\uff0c\u5047\u5b9a\u8fdc\u7a0bNFS\u670d\u52a1\u5668\u7684IP\u5730\u5740\u4e3a`192.168.1.100`,\u5171\u4eab\u6587\u4ef6\u5939\u4e3a`\/data`,\u5219\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

sudo mount -t nfs 192.168.1.100:\/data \/mnt\/nfs_share\n<\/pre>\n<\/p>\n

\u56db\u3001\u8bbe\u7f6e\u5f00\u673a\u624b\u52a8\u6302\u8f7d<\/p>\n

\u5b89\u88c5ubuntu\u5361\u5728\u542f\u52a8\u754c\u9762_ubuntu nfs\u5b89\u88c5_\u5b89\u88c5ubuntu22.04<\/p>\n

\u4e3a\u4e86\u5728\u5f00\u673a\u65f6\u624b\u52a8\u6302\u8f7d\u8fdc\u7a0bNFS\u5171\u4eab\uff0c\u987b\u8981\u7f16\u8f91`\/etc\/fstab`\u6587\u4ef6\uff0c\u5907\u4efd\u539f\u59cb\u6587\u4ef6\uff1a<\/p>\n

\n

sudo cp \/etc\/fstab \/etc\/fstab.bak\n<\/pre>\n<\/p>\n

\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00`\/etc\/fstab`\u6587\u4ef6\uff0c\u6bd4\u5982\u4f7f\u7528`nano`\u7f16\u8f91\u5668\uff1a<\/p>\n

\n

sudo nano \/etc\/fstab\n<\/pre>\n<\/p>\n

\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9ubuntu nfs\u5b89\u88c5<\/strong>\uff0c\u5c06\u5176\u4e2d\u7684IP\u5730\u5740\u3001\u5171\u4eab\u6587\u4ef6\u5939\u548c\u6302\u8f7d\u70b9\u66ff\u6362\u4e3a\u5b9e\u9645\u503c\uff1a<\/p>\n

\n

192.168.1.100:\/data \/mnt\/nfs_share nfs defaults 0 0\n<\/pre>\n<\/p>\n

\u4fdd\u5b58\u5e76\u5173\u6389\u6587\u4ef6\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u4fee\u6539\u751f\u6548\uff1a<\/p>\n

\n

sudo mount -a\n<\/pre>\n<\/p>\n

\u4e94\u3001\u6d4b\u8bd5\u6302\u8f7d\u662f\u5426\u6210\u529f<\/p>\n

\u8981\u68c0\u6d4bNFS\u6302\u8f7d\u662f\u5426\u6210\u529f\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u8bbf\u95ee\u6302\u8f7d\u7684\u5171\u4eab\u6587\u4ef6\u5939ubuntu nfs\u5b89\u88c5<\/strong>\uff0c\u5047\u5982\u6302\u8f7d\u7684\u662f\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684`\/data`\u6587\u4ef6\u5939\uff0c\u5c1d\u8bd5\u8bbf\u95ee`\/mnt\/nfs_share\/data`,\u770b\u662f\u5426\u80fd\u6b63\u5e38\u8bbf\u95ee\u3002<\/p>\n

\u516d\u3001\u76f8\u5173\u95ee\u9898\u4e0e\u89e3\u7b54<\/p>\n

\u5b89\u88c5ubuntu22.04_ubuntu nfs\u5b89\u88c5_\u5b89\u88c5ubuntu\u5361\u5728\u542f\u52a8\u754c\u9762<\/p>\n

1.\u600e\u4e48\u5378\u8f7d\u5df2\u6302\u8f7d\u7684NFS\u5171\u4eab\uff1f<\/p>\n

\u7b54\uff1a\u53ef\u4ee5\u4f7f\u7528`umount`\u547d\u4ee4\u5378\u8f7d\u5df2\u6302\u8f7d\u7684NFS\u5171\u4eab\uff0c\u5378\u8f7d\u4e4b\u524d\u6302\u8f7d\u7684\u8fdc\u7a0bNFS\u5171\u4eab\uff1a<\/p>\n

\n

sudo umount \/mnt\/nfs_share\n<\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00`\/etc\/fstab`\u6587\u4ef6\uff0c\u4f8b\u5982\u4f7f\u7528`nano`\u7f16\u8f91\u5668\uff1a<\/p>\n","protected":false},"author":1,"featured_media":295045,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[2003,2182,81,1947,4999],"class_list":["post-295044","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-mml","tag-n-7","tag-ubuntu","tag-wjgx","tag-ycfwq"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=295044"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295044\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/295045"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=295044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=295044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=295044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}