{"id":739,"date":"2025-01-03T16:45:25","date_gmt":"2025-01-03T08:45:25","guid":{"rendered":"http:\/\/192.168.5.24\/?p=739"},"modified":"2025-01-03T16:45:26","modified_gmt":"2025-01-03T08:45:26","slug":"nfs%e6%9c%8d%e5%8a%a1%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2","status":"publish","type":"post","link":"https:\/\/bigvip.dpdns.org\/?p=739","title":{"rendered":"NFS\u670d\u52a1\u5b89\u88c5\u90e8\u7f72"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u4ecb\u7ecd<\/h2>\n\n\n\n<p>NFS\uff08Network File System\uff09\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf \u4e3b\u8981\u7528\u4e8elinux\u7cfb\u7edf\u4e4b\u95f4\u5b9e\u73b0\u6587\u4ef6\u5171\u4eab\u7684\u4e00\u79cd\u534f\u8bae \u6ca1\u6709\u7528\u6237\u8ba4\u8bc1\u673a\u5236\uff0c\u4e14\u6570\u636e\u5728\u7f51\u7edc\u4e0a\u4f20\u9001\u7684\u65f6\u5019\u662f\u660e\u6587\u4f20\u9001\uff0c\u4e00\u822c\u53ea\u5728\u5c40\u57df\u7f51\u5185\u4f7f\u7528 \u652f\u6301\u591a\u8282\u70b9\u540c\u65f6\u6302\u8f7d\u53ca\u5e76\u53d1\u5199\u5165<\/p>\n\n\n\n<p>NFS\u670d\u52a1\u7ec4\u4ef6 RPC\uff08Remote Procedure Call Protocol\uff09\uff1a\u8fdc\u7a0b\u8fc7\u7a0b\u8c03\u7528\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u901a\u8fc7\u7f51\u7edc\u4ece\u8fdc\u7a0b\u8ba1\u7b97\u673a \u7a0b\u5e8f\u4e0a\u8bf7\u6c42\u670d\u52a1\uff0c\u4e0d\u9700\u8981\u4e86\u89e3\u5e95\u5c42\u7f51\u7edc\u6280\u672f\u7684\u534f\u8bae\u3002 rpcbind \/\/\u8d1f\u8d23NFS\u7684\u6570\u636e\u4f20\u8f93\uff0c\u8fdc\u7a0b\u8fc7\u7a0b\u8c03\u7528 tcp\/udp\u534f\u8bae \u7aef\u53e3111 nfs-utils \/\/\u63a7\u5236\u5171\u4eab\u54ea\u4e9b\u6587\u4ef6,\u6743\u9650\u7ba1\u7406<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u5b89\u88c5<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u670d\u52a1\u7aef\u3001\u5ba2\u6237\u7aef\u90fd\u9700\u8981\u5b89\u88c5\uff1a\nyum -y install nfs-utils<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u914d\u7f6e<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u670d\u52a1\u7aef\uff1a\u2014\u2014\u8bbe\u7f6e\u5171\u4eab\u6587\u4ef6\u5939\u53ca\u6743\u9650\uff1a\n&#91;root@localhost ~]# cat \/etc\/exports\n\/var\/www\/html *(rw)\n\n\u5f00\u542f\u5171\u4eab\u670d\u52a1\uff1a\nsystemctl start rpcbind\nsystemctl start nfs-server\n\n\u9a8c\u8bc1\u5171\u4eab\u670d\u52a1\uff1a\n&#91;root@localhost ~]# showmount -e\nExport list for localhost.localdomain:\n\/var\/www\/html *\n\n\u5ba2\u6237\u7aef\uff1a\n\u5f00\u542fRPC\u670d\u52a1\uff1a\nsystemctl start rpcbind<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u6302\u8f7d<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5ba2\u6237\u7aef\uff1a\nmount -t nfs 172.16.16.174:\/var\/www\/html \/var\/www\/html\n\u628a\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u5939\/var\/www\/html\u6302\u8f7d\u5230\u672c\u673a\u7684\/var\/www\/html\u4e0b\n\n&#91;root@localhost ~]# df -h\nFilesystem                   Size  Used Avail Use% Mounted on\ndevtmpfs                     223M     0  223M   0% \/dev\ntmpfs                        235M     0  235M   0% \/dev\/shm\ntmpfs                        235M  5.6M  229M   3% \/run\ntmpfs                        235M     0  235M   0% \/sys\/fs\/cgroup\n\/dev\/mapper\/centos-root       18G  2.0G   16G  12% \/\n\/dev\/sda1                   1014M  138M  877M  14% \/boot\ntmpfs                         47M     0   47M   0% \/run\/user\/0\n<strong>172.16.16.174:\/var\/www\/html   17G  1.8G   16G  11% \/tmp<\/strong>\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4ecb\u7ecd NFS\uff08Network File System\uff09\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf \u4e3b\u8981\u7528\u4e8elinux\u7cfb\u7edf\u4e4b\u95f4\u5b9e\u73b0\u6587\u4ef6\u5171\u4eab [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[20],"tags":[100],"class_list":["post-739","post","type-post","status-publish","format-aside","hentry","category-linux","tag-nfs","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=739"}],"version-history":[{"count":11,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions"}],"predecessor-version":[{"id":750,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions\/750"}],"wp:attachment":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}