{"id":16122,"date":"2025-04-18T22:37:23","date_gmt":"2025-04-18T14:37:23","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/16122.html"},"modified":"2025-04-18T22:37:23","modified_gmt":"2025-04-18T14:37:23","slug":"%e9%85%8d%e7%bd%aenfs%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%bd%9c%e4%b8%ba-ngxin-%e6%9c%8d%e5%8a%a1%e7%9a%84%e5%ad%98%e5%82%a8%e7%9b%ae%e5%bd%95%ef%bc%8c%e5%b9%b6%e5%9c%a8%e7%9b%ae%e5%bd%95%e4%b8%ad%e5%88%9b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/16122.html","title":{"rendered":"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002"},"content":{"rendered":"<h2>\u8981\u6c42<\/h2>\n<p>\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55&#xff0c;\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6&#xff0c;\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6&#xff0c;\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143721-680263a1bbd4e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1\u3001\u521b\u5efa\u4e24\u53f0\u865a\u62df\u673a<\/h3>\n<p>\u4e00\u53f0\u7cfb\u7edf\u4e3aRHEL\u7684\u865a\u62df\u673a\u4f5c\u4e3aNFS\u670d\u52a1\u5668&#xff0c;\u53e6\u4e00\u53f0\u4e3aopenEuler\u7cfb\u7edf\u7684\u4f5c\u4e3aWEB\u670d\u52a1\u5668<\/p>\n<ul>\n<li>\u5728\u7ea2\u8272\u65b9\u6846\u5185\u5355\u51fb\u53f3\u952e \u2192 \u9009\u62e9\u7ba1\u7406 \u2192 \u514b\u9686 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143721-680263a1d4c75.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u9009\u62e9\u4e0b\u4e00\u9875 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143721-680263a1e54e9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u9009\u62e9\u865a\u62df\u673a\u4e2d\u7684\u5f53\u524d\u72b6\u6001&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u9875 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a20b3af.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u9009\u62e9\u521b\u5efa\u5b8c\u6574\u514b\u9686&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u9875 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a225cc9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u4fee\u6539\u540d\u79f0\u548c\u4f4d\u7f6e&#xff0c;\u70b9\u51fb\u5b8c\u6210\u5373\u53ef <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a240d68.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7ea2\u5e3d\u7cfb\u7edf\u865a\u62df\u673a\u514b\u9686\u6b65\u9aa4\u540c\u4e0a<\/li>\n<\/ul>\n<h3>2\u3001\u73af\u5883\u521d\u59cb\u5316<\/h3>\n<ul>\n<li>\u5355\u51fb\u53f3\u952e\u7ea2\u8272\u6846&#xff0c;\u9009\u62e9\u91cd\u547d\u540d <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a25b6be.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u91cd\u547d\u540d\u4e3aweb&#xff08;\u7ea2\u5e3d\u7cfb\u7edf\u4e3aserver&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a26bf4d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<\/ul>\n<h4>2.1 RHEL\u7cfb\u7edf\u7684\u865a\u62df\u673a\u914d\u7f6e\u4ed3\u5e93\u5e76\u6302\u8f7d<\/h4>\n<p>RHEL\u7cfb\u7edf\u7684\u865a\u62df\u673a\u914d\u7f6e\u4ed3\u5e93\u5e76\u6302\u8f7d&#xff0c;\u4e3a\u4e0b\u8f7d\u8f6f\u4ef6\u505a\u51c6\u5907 openEuler\u7cfb\u7edf\u7684\u865a\u62df\u673a\u4e0d\u7528\u914d\u7f6e<\/p>\n<h4>2.2 RHEl\u914d\u7f6e\u4ed3\u5e93<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/etc\/yum.repos.d\/dnf.repo<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>BaseOS<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">name<\/span><span class=\"token operator\">&#061;<\/span>BaseOS<br \/>\n<span class=\"token assign-left variable\">baseurl<\/span><span class=\"token operator\">&#061;<\/span>\/mnt\/BaseOS<br \/>\n<span class=\"token assign-left variable\">gpgcheck<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>AppStream<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">name<\/span><span class=\"token operator\">&#061;<\/span>AppStream<br \/>\n<span class=\"token assign-left variable\">baseurl<\/span><span class=\"token operator\">&#061;<\/span>\/mnt\/AppStream<br \/>\n<span class=\"token assign-left variable\">gpgcheck<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum repolist<\/span><br \/>\n<span class=\"token comment\">#yum repolist \u547d\u4ee4\u7528\u4e8e\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u4e0a\u542f\u7528\u7684 YUM&#xff08;Yellowdog Updater Modified&#xff09;\u8f6f\u4ef6\u4ed3\u5e93\u5217\u8868<\/span><br \/>\nUpdating Subscription Management repositories.<br \/>\nUnable to <span class=\"token builtin class-name\">read<\/span> consumer identity<\/p>\n<p>This system is not registered with an entitlement server. You can use <span class=\"token string\">&#034;rhc&#034;<\/span> or <span class=\"token string\">&#034;subscription-manager&#034;<\/span> to register.<\/p>\n<p>repo <span class=\"token function\">id<\/span>                                       repo name<br \/>\nAppStream                                     AppStream<br \/>\nBaseOS                                        BaseOS<\/p>\n<h4>2.3 \u6302\u8f7d<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/dev\/sr0 \/mnt<\/span><br \/>\nmount: \/mnt: WARNING: <span class=\"token builtin class-name\">source<\/span> write-protected, mounted read-only.<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># ls \/mnt      #\u5217\u51fa\u4f4d\u4e8e \/mnt \u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u548c\u5b50\u76ee\u5f55<\/span><br \/>\nAppStream  EULA              images      RPM-GPG-KEY-redhat-beta<br \/>\nBaseOS     extra_files.json  isolinux    RPM-GPG-KEY-redhat-release<br \/>\nEFI        GPL               media.repo<\/p>\n<h4>2.4 \u5b89\u88c5\u57fa\u672c\u8f6f\u4ef6<\/h4>\n<p>\u4e24\u53f0\u865a\u62df\u673a\u90fd\u8981\u5b89\u88c5\u3002OE\u7cfb\u7edf\u5b89\u88c5\u57fa\u672c\u8f6f\u4ef6\u4f1a\u6709\u70b9\u6162<\/p>\n<p>dnf <span class=\"token function\">install<\/span> net-tools <span class=\"token function\">wget<\/span> <span class=\"token function\">curl<\/span> bash-completion <span class=\"token function\">vim<\/span> <span class=\"token parameter variable\">-y<\/span><\/p>\n<h4>2.5 \u4fee\u6539\u4e3b\u673a\u540d<\/h4>\n<p>\u4e00\u53f0\u4e3aserver&#xff0c;\u53e6\u4e00\u53f0\u4e3aweb\u3002 \u4fee\u6539\u540e\u8981\u65ad\u5f00\u91cd\u65b0\u767b\u9646\u540d\u5b57\u624d\u4f1a\u4f7f\u7528<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># hostnamectl hostname server<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># hostnamectl hostname<\/span><br \/>\nserver<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># hostnamectl hostname web<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;localhost ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># hostnamectl hostname<\/span><br \/>\nweb<\/p>\n<h3>3\u3001\u914d\u7f6e\u56fa\u5b9aip<\/h3>\n<p>\u5bf9ip\u5730\u5740\u8fdb\u884c\u67e5\u770b&#xff0c;\u8981\u6ce8\u610f\u662fens160\u8fd8\u662fens33 \u4e24\u4e2a\u865a\u62df\u673a\u90fd\u8981\u914d\u7f6e&#xff0c;\u6ce8\u610f\u7f51\u6bb5\u5e94\u8be5\u662f\u81ea\u5df1\u7684\u4e0d\u9700\u8981\u53d8&#xff08;\u6211\u7684\u7f51\u6bb5\u662f88&#xff09;<\/p>\n<ul>\n<li>RHEL\u7f51\u7edc<\/li>\n<\/ul>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># nmcli c modify ens160 ipv4.method manual ipv4.addresses 192.168.88.7\/24 ipv4.dns 223.5.5.5 ipv4.gateway 192.168.88.2 connection.autoconnect yes<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># nmcli c up ens160 #\u6fc0\u6d3b\u540d\u4e3a ens160 \u7684\u7f51\u7edc\u8fde\u63a5\u3002\u4f7f\u7528\u8be5\u547d\u4ee4\u540exshell\u4f1a\u65ad\u5f00&#xff0c;\u9700\u8981\u91cd\u65b0\u8fde\u63a5\u3002<\/span><\/p>\n<p><span class=\"token comment\">#nmcli c modify ens160&#xff1a;\u8fd9\u90e8\u5206\u547d\u4ee4\u8868\u793a\u8981\u4fee\u6539\u540d\u4e3a ens160 \u7684\u7f51\u7edc\u8fde\u63a5\u914d\u7f6e\u3002nmcli \u662f NetworkManager \u7684\u547d\u4ee4\u884c\u5de5\u5177&#xff0c;\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u547d\u4ee4\u884c\u6dfb\u52a0\u3001\u4fee\u6539\u548c\u7ba1\u7406\u7f51\u7edc\u8fde\u63a5\u3002c \u662f connection \u7684\u7f29\u5199\u3002<\/span><br \/>\n<span class=\"token comment\">#ipv4.method manual&#xff1a;\u8bbe\u7f6e IPv4 \u914d\u7f6e\u7684\u65b9\u6cd5\u4e3a\u624b\u52a8&#xff08;manual&#xff09;\u3002\u8fd9\u610f\u5473\u7740\u5c06\u4f7f\u7528\u9759\u6001IP\u5730\u5740\u914d\u7f6e&#xff0c;\u800c\u4e0d\u662f\u901a\u8fc7DHCP\u81ea\u52a8\u83b7\u53d6\u5730\u5740\u3002<\/span><br \/>\n<span class=\"token comment\">#ipv4.addresses 192.168.88.7\/24&#xff1a;\u6307\u5b9a\u9759\u6001IPv4\u5730\u5740\u4e3a 192.168.88.7&#xff0c;\u5b50\u7f51\u63a9\u7801\u4e3a \/24&#xff08;\u5373255.255.255.0&#xff09;&#xff0c;\u8fd9\u8868\u660e\u5b83\u4f4d\u4e8e\u4e00\u4e2a\u5178\u578b\u7684C\u7c7b\u79c1\u6709\u7f51\u7edc\u4e2d\u3002<\/span><br \/>\n<span class=\"token comment\">#ipv4.dns 223.5.5.5&#xff1a;\u8bbe\u7f6e\u9996\u9009\u7684 DNS \u670d\u52a1\u5668\u4e3a 223.5.5.5\u3002\u8fd9\u662f\u963f\u91cc\u4e91\u63d0\u4f9b\u7684\u516c\u5171DNS\u670d\u52a1\u4e4b\u4e00\u3002<\/span><br \/>\n<span class=\"token comment\">#ipv4.gateway 192.168.88.2&#xff1a;\u6307\u5b9a\u9ed8\u8ba4\u7f51\u5173\u4e3a 192.168.88.2\u3002<\/span><br \/>\n<span class=\"token comment\">#connection.autoconnect yes&#xff1a;\u8bbe\u7f6e\u6b64\u8fde\u63a5\u4e3a\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u8fde\u63a5\u3002<\/span><\/p>\n<ul>\n<li>OE\u7f51\u7edc \u6ce8\u610f&#xff1a;\u5bf9ip\u5730\u5740\u8fdb\u884c\u67e5\u770b&#xff0c;\u53d1\u73b0\u662fens33&#xff0c;\u4e0d\u662fens160<\/li>\n<\/ul>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># ip a<\/span><br \/>\n<span class=\"token number\">1<\/span>: lo: <span class=\"token operator\">&lt;<\/span>LOOPBACK,UP,LOWER_UP<span class=\"token operator\">&gt;<\/span> mtu <span class=\"token number\">65536<\/span> qdisc noqueue state UNKNOWN group default qlen <span class=\"token number\">1000<\/span><br \/>\n    link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br \/>\n    inet <span class=\"token number\">127.0<\/span>.0.1\/8 scope <span class=\"token function\">host<\/span> lo<br \/>\n       valid_lft forever preferred_lft forever<br \/>\n    inet6 ::1\/128 scope <span class=\"token function\">host<\/span> noprefixroute<br \/>\n       valid_lft forever preferred_lft forever<br \/>\n<span class=\"token number\">2<\/span>: ens33: <span class=\"token operator\">&lt;<\/span>BROADCAST,MULTICAST,UP,LOWER_UP<span class=\"token operator\">&gt;<\/span> mtu <span class=\"token number\">1500<\/span> qdisc fq_codel state UP group default qlen <span class=\"token number\">1000<\/span><br \/>\n    link\/ether 00:0c:29:e8:2e:01 brd ff:ff:ff:ff:ff:ff<br \/>\n    inet <span class=\"token number\">192.168<\/span>.88.129\/24 brd <span class=\"token number\">192.168<\/span>.88.255 scope global dynamic noprefixroute ens33<br \/>\n       valid_lft 1297sec preferred_lft 1297sec<br \/>\n    inet6 fe80::20c:29ff:fee8:2e01\/64 scope <span class=\"token function\">link<\/span> noprefixroute<br \/>\n       valid_lft forever preferred_lft forever<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># nmcli connection modify ens33 ipv4.method manual ipv4.addresses 192.168.88.8\/24 ipv4.dns 223.5.5.5 ipv4.gateway 192.168.88.2 connection.autoconnect yes<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># nmcli connection up ens33<\/span><\/p>\n<h3>4\u3001\u5b89\u88c5\u670d\u52a1&#xff08;server\u8981\u6302\u8f7d&#xff09;<\/h3>\n<p>\u5b89\u88c5 nfs \u670d\u52a1&#xff0c;\u4e24\u53f0\u865a\u62df\u673a\u4e0a\u90fd\u8981\u8fdb\u884c\u3002\u7531\u4e8e\u4e0a\u9762\u6b65\u9aa43\u65ad\u5f00\u4e86\u8fde\u63a5&#xff0c;\u6240\u4ee5server\u670d\u52a1\u5668\u8981\u518d\u6b21\u6302\u8f7d&#xff0c;\u4e0d\u6302\u8f7d\u76f4\u63a5\u5b89\u88c5\u4f1a\u5bfc\u81f4\u5b89\u88c5\u5931\u8d25&#xff0c;\u6ce8\u610f\u8981\u6302\u8f7d<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/dev\/sr0 \/mnt<\/span><br \/>\nmount: \/mnt: WARNING: <span class=\"token builtin class-name\">source<\/span> write-protected, mounted read-only.<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dnf install nfs-utils -y<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dnf install nfs-utils -y<\/span><br \/>\n<span class=\"token comment\">#dnf \u662f\u8c03\u7528\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u3002<\/span><br \/>\n<span class=\"token comment\">#install \u662f\u544a\u8bc9 DNF \u6267\u884c\u5b89\u88c5\u64cd\u4f5c\u3002<\/span><br \/>\n<span class=\"token comment\">#nfs-utils \u662f\u8981\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u540d\u79f0&#xff0c;NFS \u5de5\u5177\u7528\u4e8e\u914d\u7f6e\u548c\u7ba1\u7406 NFS&#xff08;Network File System&#xff09;\u5171\u4eab\u3002<\/span><br \/>\n<span class=\"token comment\">#-y \u53c2\u6570\u8868\u793a\u5bf9\u6240\u6709\u63d0\u793a\u81ea\u52a8\u56de\u7b54\u201c\u662f\u201d&#xff0c;\u8fd9\u6837\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4e0d\u9700\u8981\u7528\u6237\u624b\u52a8\u786e\u8ba4\u5373\u53ef\u81ea\u52a8\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b<\/span><\/p>\n<h3>5\u3001\u542f\u52a8NFS\u670d\u52a1<\/h3>\n<p>\u4e24\u53f0\u865a\u62df\u673a\u90fd\u8981\u6267\u884c<\/p>\n<ul>\n<li>start \u547d\u4ee4\u7528\u4e8e\u7acb\u5373\u542f\u52a8\u6307\u5b9a\u7684\u670d\u52a1<\/li>\n<li>status \u547d\u4ee4\u7528\u4e8e\u68c0\u67e5\u6307\u5b9a\u670d\u52a1\u7684\u72b6\u6001\u3002<\/li>\n<li>enable \u547d\u4ee4\u7684\u4f5c\u7528\u662f\u8bbe\u7f6e\u670d\u52a1\u5f00\u673a\u81ea\u542f\u3002<\/li>\n<\/ul>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl start nfs-server<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl status nfs-server<\/span><br \/>\n\u25cf nfs-server.service &#8211; NFS server and services<br \/>\n     Loaded: loaded <span class=\"token punctuation\">(<\/span>\/usr\/lib\/systemd\/system\/nfs-server.service<span class=\"token punctuation\">;<\/span> disabled<span class=\"token punctuation\">;<\/span> preset: disabled<span class=\"token punctuation\">)<\/span><br \/>\n     Active: active <span class=\"token punctuation\">(<\/span>exited<span class=\"token punctuation\">)<\/span> since Sun <span class=\"token number\">2025<\/span>-03-16 <span class=\"token number\">10<\/span>:36:20 CST<span class=\"token punctuation\">;<\/span> 25s ago<br \/>\n       Docs: man:rpc.nfsd<span class=\"token punctuation\">(<\/span><span class=\"token number\">8<\/span><span class=\"token punctuation\">)<\/span><br \/>\n             man:exportfs<span class=\"token punctuation\">(<\/span><span class=\"token number\">8<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    Process: <span class=\"token number\">2217<\/span> <span class=\"token assign-left variable\">ExecStartPre<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/exportfs <span class=\"token parameter variable\">-r<\/span> <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n    Process: <span class=\"token number\">2218<\/span> <span class=\"token assign-left variable\">ExecStart<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/rpc.nfsd <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n    Process: <span class=\"token number\">2238<\/span> <span class=\"token assign-left variable\">ExecStart<\/span><span class=\"token operator\">&#061;<\/span>\/bin\/sh <span class=\"token parameter variable\">-c<\/span> <span class=\"token keyword\">if<\/span> systemctl <span class=\"token parameter variable\">-q<\/span> is-active gssproxy<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span> systemctl r<span class=\"token operator\">&gt;<\/span><br \/>\n   Main PID: <span class=\"token number\">2238<\/span> <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n        CPU: 88ms<\/p>\n<p>Mar <span class=\"token number\">16<\/span> <span class=\"token number\">10<\/span>:36:19 server systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Starting NFS server and services<span class=\"token punctuation\">..<\/span>.<br \/>\nMar <span class=\"token number\">16<\/span> <span class=\"token number\">10<\/span>:36:20 server systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Finished NFS server and services.<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl enable nfs-server<\/span><br \/>\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/nfs-server.service \u2192 \/usr\/lib\/systemd\/system\/nfs-server.service.<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl start nfs-server<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl status nfs-server<\/span><br \/>\n\u25cf nfs-server.service &#8211; NFS server and services<br \/>\n     Loaded: loaded <span class=\"token punctuation\">(<\/span>\/usr\/lib\/systemd\/system\/nfs-server.service<span class=\"token punctuation\">;<\/span> disabled<span class=\"token punctuation\">;<\/span> preset: disabled<span class=\"token punctuation\">)<\/span><br \/>\n     Active: active <span class=\"token punctuation\">(<\/span>exited<span class=\"token punctuation\">)<\/span> since Sun <span class=\"token number\">2025<\/span>-03-16 <span class=\"token number\">18<\/span>:36:19 CST<span class=\"token punctuation\">;<\/span> 25s ago<br \/>\n    Process: <span class=\"token number\">1970<\/span> <span class=\"token assign-left variable\">ExecStartPre<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/exportfs <span class=\"token parameter variable\">-r<\/span> <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n    Process: <span class=\"token number\">1973<\/span> <span class=\"token assign-left variable\">ExecStart<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/rpc.nfsd <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n   Main PID: <span class=\"token number\">1973<\/span> <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><\/p>\n<p>Mar <span class=\"token number\">16<\/span> <span class=\"token number\">18<\/span>:36:19 web systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Starting NFS server and services<span class=\"token punctuation\">..<\/span>.<br \/>\nMar <span class=\"token number\">16<\/span> <span class=\"token number\">18<\/span>:36:19 web systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Finished NFS server and services.<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl enable nfs-server<\/span><br \/>\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/nfs-server.service \u2192 \/usr\/lib\/systemd\/system\/nfs-server.service.<\/p>\n<h3>6.\u5728\u9632\u706b\u5899\u4e2d\u653e\u884c\u670d\u52a1<\/h3>\n<p>\u4e24\u53f0\u865a\u62df\u673a\u90fd\u8981\u6267\u884c<\/p>\n<ul>\n<li>firewall-cmd \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177&#xff0c;\u7528\u4e8e\u914d\u7f6e\u548c\u7ba1\u7406\u9632\u706b\u5899\u670d\u52a1\u5728\u57fa\u4e8e firewalld \u7684\u7cfb\u7edf\u4e0a\u3002\u4f7f\u7528 firewall-cmd&#xff0c;\u4f60\u53ef\u4ee5\u6267\u884c\u8bf8\u5982\u5f00\u653e\u6216\u5173\u95ed\u7aef\u53e3\u3001\u6dfb\u52a0\u6216\u79fb\u9664\u670d\u52a1\u3001\u67e5\u770b\u5f53\u524d\u6fc0\u6d3b\u7684\u89c4\u5219\u7b49\u64cd\u4f5c\u3002<\/li>\n<li>firewall-cmd &#8211;permanent &#8211;add-service&#061;nfs \u547d\u4ee4\u7528\u4e8e\u5c06 NFS \u670d\u52a1\u6c38\u4e45\u6dfb\u52a0\u5230\u9632\u706b\u5899\u89c4\u5219\u4e2d\u3002<\/li>\n<li>firewall-cmd &#8211;reload \u547d\u4ee4\u91cd\u65b0\u52a0\u8f7d\u9632\u706b\u5899\u914d\u7f6e&#xff0c;\u4f7f\u5f97\u4e4b\u524d\u4f7f\u7528 &#8211;permanent \u8bbe\u7f6e\u7684\u65b0\u89c4\u5219\u7acb\u5373\u751f\u6548\u3002<\/li>\n<li>firewall-cmd &#8211;list-all \u5219\u7528\u4e8e\u5217\u51fa\u5f53\u524d\u9632\u706b\u5899\u7684\u6240\u6709\u914d\u7f6e\u4fe1\u606f&#xff0c;\u5305\u62ec\u9ed8\u8ba4\u7684\u533a\u57df\u3001\u516c\u5f00\u7684\u7aef\u53e3\u3001\u4fe1\u4efb\u7684\u670d\u52a1\u7b49\u3002<\/li>\n<\/ul>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;permanent &#8211;add-service&#061;nfs<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;reload<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;list-all<\/span><br \/>\npublic <span class=\"token punctuation\">(<\/span>active<span class=\"token punctuation\">)<\/span><br \/>\n  target: default<br \/>\n  icmp-block-inversion: no<br \/>\n  interfaces: ens160<br \/>\n  sources:<br \/>\n  services: cockpit dhcpv6-client nfs <span class=\"token function\">ssh<\/span><br \/>\n  ports:<br \/>\n  protocols:<br \/>\n  forward: <span class=\"token function\">yes<\/span><br \/>\n  masquerade: no<br \/>\n  forward-ports:<br \/>\n  source-ports:<br \/>\n  icmp-blocks:<br \/>\n  rich rules: <\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;permanent &#8211;add-service&#061;nfs<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;reload<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;list-all<\/span><br \/>\npublic <span class=\"token punctuation\">(<\/span>active<span class=\"token punctuation\">)<\/span><br \/>\n  target: default<br \/>\n  icmp-block-inversion: no<br \/>\n  interfaces: ens33<br \/>\n  sources:<br \/>\n  services: dhcpv6-client mdns nfs <span class=\"token function\">ssh<\/span><br \/>\n  ports:<br \/>\n  protocols:<br \/>\n  forward: <span class=\"token function\">yes<\/span><br \/>\n  masquerade: no<br \/>\n  forward-ports:<br \/>\n  source-ports:<br \/>\n  icmp-blocks: <\/p>\n<p>\u53ef\u4ee5\u770b\u51faservices\u4e2d\u5df2\u7ecf\u6709\u4e86nfs\u670d\u52a1 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a281a4e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>7\u3001\u5173\u95edSelinux<\/h3>\n<p>\u4e24\u53f0\u865a\u62df\u673a\u4e2d\u90fd\u8981\u6267\u884c<\/p>\n<li>sed&#xff1a;\u8c03\u7528\u6d41\u7f16\u8f91\u5668\u3002<\/li>\n<li>-i&#xff1a;\u8fd9\u4e2a\u9009\u9879\u544a\u8bc9 sed \u76f4\u63a5\u5728\u6587\u4ef6\u5185\u8fdb\u884c\u7f16\u8f91&#xff08;\u5373\u5c31\u5730\u7f16\u8f91&#xff09;&#xff0c;\u800c\u4e0d\u662f\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa&#xff08;\u5c4f\u5e55&#xff09;\u3002\u8fd9\u610f\u5473\u7740\u6307\u5b9a\u7684\u6587\u4ef6\u5c06\u4f1a\u88ab\u76f4\u63a5\u4fee\u6539\u3002<\/li>\n<li>\u201cs\/^SELINUX&#061;enforcing$\/SELINUX&#061;permissive\/g\u201d&#xff1a;\u8fd9\u662f\u5b9e\u9645\u6267\u884c\u66ff\u6362\u64cd\u4f5c\u7684\u811a\u672c\u90e8\u5206<\/li>\n<p>3.1 s\/ \u8868\u793a\u8fd9\u662f\u4e00\u4e2a\u66ff\u6362\u547d\u4ee4&#xff1b; 3.2 ^SELINUX&#061;enforcing$ \u662f\u6b63\u5219\u8868\u8fbe\u5f0f&#xff0c;\u7528\u6765\u5339\u914d\u6574\u884c\u5185\u5bb9\u4ec5\u4e3a SELINUX&#061;enforcing \u7684\u884c\u3002\u8fd9\u91cc&#xff0c; ^ \u8868\u793a\u4e00\u884c\u7684\u5f00\u59cb&#xff0c;$ \u8868\u793a\u4e00\u884c\u7684\u7ed3\u675f&#xff0c;\u786e\u4fdd\u53ea\u5339\u914d\u5b8c\u5168\u7b49\u4e8e SELINUX&#061;enforcing \u7684\u884c\u3002 3.3 SELINUX&#061;permissive \u662f\u66ff\u6362\u540e\u7684\u5185\u5bb9\u3002 3.4 \/g \u6807\u5fd7\u8868\u793a\u5168\u5c40\u66ff\u6362\u3002\u7531\u4e8e\u6211\u4eec\u4f7f\u7528\u4e86\u8d77\u59cb(^)\u548c\u7ed3\u675f($)\u6807\u8bb0\u6765\u9650\u5b9a\u6574\u4e2a\u884c\u5fc5\u987b\u5b8c\u5168\u5339\u914d&#xff0c;\u56e0\u6b64\u6bcf\u884c\u6700\u591a\u53ea\u4f1a\u53d1\u751f\u4e00\u6b21\u66ff\u6362\u3002\u6240\u4ee5\u8fd9\u91cc\u7684 \/g \u5b9e\u9645\u4e0a\u4e0d\u4f1a\u8d77\u5230\u591a\u6b21\u66ff\u6362\u7684\u6548\u679c&#xff0c;\u4f46\u901a\u5e38\u5305\u542b\u5b83\u662f\u4e00\u4e2a\u597d\u7684\u5b9e\u8df5&#xff0c;\u7279\u522b\u662f\u5f53\u4f60\u7684\u6a21\u5f0f\u4e0d\u4e25\u683c\u5339\u914d\u6574\u884c\u65f6\u3002<\/p>\n<li>\/etc\/selinux\/config&#xff1a;\u8fd9\u662f\u8981\u4fee\u6539\u7684\u76ee\u6807\u6587\u4ef6\u8def\u5f84\u3002<\/li>\n<p><span class=\"token comment\"># \u4e34\u65f6\u5173\u95ed<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># setenforce 0<\/span><br \/>\n<span class=\"token comment\"># \u6c38\u4e45\u5173\u95ed<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># sed -i &#034;s\/^SELINUX&#061;enforcing$\/SELINUX&#061;permissive\/g&#034; \/etc\/selinux\/config<\/span><\/p>\n<p><span class=\"token comment\"># \u4e34\u65f6\u5173\u95ed<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># setenforce 0<\/span><br \/>\n<span class=\"token comment\"># \u6c38\u4e45\u5173\u95ed<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># sed -i &#034;s\/^SELINUX&#061;enforcing$\/SELINUX&#061;permissive\/g&#034; \/etc\/selinux\/config<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># getenforce<\/span><br \/>\nPermissive<\/p>\n<h3>8\u3001\u914d\u7f6eNFS\u670d\u52a1<\/h3>\n<p>\u5728 server \u4e3b\u673a\u4e0a\u521b\u5efa\u5171\u4eab\u76ee\u5f55&#xff0c;\u5e76\u66b4\u9732\u7ed9\u5ba2\u6237\u7aef\u3002 \u5373\u5728 NFS \u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\u4e00\u4e2a\u5171\u4eab\u76ee\u5f55&#xff0c;\u5e76\u786e\u4fdd\u8be5\u76ee\u5f55\u53ef\u4ee5\u88ab 192.168.88.0\/24 \u7f51\u7edc\u6bb5\u5185\u7684\u5ba2\u6237\u7aef\u8bbf\u95ee<\/p>\n<h4>8.1\u521b\u5efa\u5171\u4eab\u76ee\u5f55<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir \/nfs\/data -p<\/span><\/p>\n<h4>8.2 \u914d\u7f6e\u5171\u4eab\u5b58\u50a8<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat &gt; \/etc\/exports &lt;&lt;EOF<\/span><br \/>\n<span class=\"token operator\">&gt;<\/span> \/nfs\/data <span class=\"token number\">192.168<\/span>.88.0\/24<span class=\"token punctuation\">(<\/span>rw,sync<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token operator\">&gt;<\/span> EOF<\/p>\n<ul>\n<li>\u8fd9\u90e8\u5206\u547d\u4ee4\u4f7f\u7528\u4e86\u8f93\u5165\u91cd\u5b9a\u5411\u548c here-document \u6280\u672f\u6765\u7f16\u8f91 \/etc\/exports \u6587\u4ef6\u3002<\/li>\n<li>\/etc\/exports \u6587\u4ef6\u5b9a\u4e49\u4e86\u54ea\u4e9b\u6587\u4ef6\u7cfb\u7edf\u53ef\u4ee5\u901a\u8fc7 NFS \u5bfc\u51fa\u7ed9\u5176\u4ed6\u673a\u5668\u4ee5\u53ca\u76f8\u5e94\u7684\u9009\u9879\u3002<\/li>\n<li>\/nfs\/data 192.168.88.0\/24(rw,sync)&#xff1a;<\/li>\n<li>\n<ul>\n<li>\/nfs\/data \u662f\u8981\u5171\u4eab\u7684\u76ee\u5f55&#xff1b;<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>192.168.88.0\/24 \u6307\u5b9a\u4e86\u5141\u8bb8\u8bbf\u95ee\u8fd9\u4e2a\u5171\u4eab\u76ee\u5f55\u7684\u7f51\u7edc\u6216\u4e3b\u673a\u3002\u5728\u8fd9\u91cc&#xff0c;\u8868\u793a\u6574\u4e2a 192.168.88.0\/24 \u5b50\u7f51\u7684\u673a\u5668\u90fd\u53ef\u4ee5\u8bbf\u95ee\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>(rw,sync) \u5b9a\u4e49\u4e86\u8bbf\u95ee\u6743\u9650\u548c\u5176\u4ed6\u9009\u9879&#xff1a;rw \u8868\u793a\u8bfb\u5199\u6743\u9650&#xff1b;sync \u5f3a\u5236\u8981\u6c42\u5bf9\u6587\u4ef6\u7684\u64cd\u4f5c\u5fc5\u987b\u540c\u6b65\u5230\u78c1\u76d8\u540e\u518d\u8fd4\u56de\u6210\u529f&#xff0c;\u63d0\u9ad8\u4e86\u6570\u636e\u5b8c\u6574\u6027\u4f46\u53ef\u80fd\u4f1a\u7a0d\u5fae\u964d\u4f4e\u6027\u80fd\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>8.3 \u91cd\u542f\u670d\u52a1<\/h4>\n<p>\u91cd\u542f\u4e86 NFS \u670d\u52a1&#xff0c;\u4ee5\u4fbf\u4f7f\u65b0\u7684 \/etc\/exports \u914d\u7f6e\u751f\u6548\u3002\u91cd\u542f NFS \u670d\u52a1\u4f1a\u91cd\u65b0\u8bfb\u53d6 \/etc\/exports \u6587\u4ef6&#xff0c;\u5e76\u6839\u636e\u5176\u4e2d\u7684\u8bbe\u5b9a\u66f4\u65b0\u5bfc\u51fa\u7684\u6587\u4ef6\u7cfb\u7edf\u5217\u8868\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl restart nfs-server.service <\/span><\/p>\n<h4>8.4 \u67e5\u770b\u5171\u4eab\u5217\u8868<\/h4>\n<p><span class=\"token comment\">#showmount \u662f\u4e00\u4e2a\u7528\u4e8e\u67e5\u8be2 NFS \u670d\u52a1\u5668\u4fe1\u606f\u7684\u5de5\u5177\u3002<\/span><br \/>\n<span class=\"token comment\">#\u53c2\u6570 -e \u540e\u9762\u8ddf\u7684\u662f NFS \u670d\u52a1\u5668\u7684 IP \u5730\u5740&#xff08;\u5728\u8fd9\u662f 192.168.88.7&#xff09;&#xff0c;\u8fd9\u6761\u547d\u4ee4\u5c06\u663e\u793a\u6307\u5b9a NFS \u670d\u52a1\u5668\u4e0a\u6240\u6709\u53ef\u7528\u7684\u5171\u4eab\u3002<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># showmount -e 192.168.88.7<\/span><br \/>\nExport list <span class=\"token keyword\">for<\/span> <span class=\"token number\">192.168<\/span>.88.7:<br \/>\n\/nfs\/data <span class=\"token number\">192.168<\/span>.88.0\/24<\/p>\n<p>\u8f93\u51fa\u7ed3\u679c\u8868\u660e NFS \u670d\u52a1\u5668\u5df2\u6b63\u786e\u914d\u7f6e\u5e76\u6b63\u5728\u5171\u4eab \/nfs\/data \u76ee\u5f55\u7ed9 192.168.88.0\/24 \u7f51\u7edc\u6bb5\u5185\u7684\u5ba2\u6237\u7aef\u3002<\/p>\n<h3>9\u3001\u914d\u7f6eNFS\u5ba2\u6237\u7aef<\/h3>\n<p>\u5728web\u670d\u52a1\u5668\u4e0a\u64cd\u4f5c<\/p>\n<h4>9.1 \u5728\u5ba2\u6237\u7aef\u4e0a\u521b\u5efa\u6302\u8f7d\u76ee\u5f55<\/h4>\n<p>\u8fd9\u6761\u547d\u4ee4\u7528\u4e8e\u5728\u5ba2\u6237\u7aef\u673a\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a \/var\/nginx \u7684\u76ee\u5f55\u3002 \u6302\u8f7d NFS \u5171\u4eab\u4e4b\u524d\u5fc5\u987b\u505a\u7684\u51c6\u5907\u5de5\u4f5c&#xff0c;\u786e\u4fdd\u6709\u4e00\u4e2a\u5730\u65b9\u53ef\u4ee5\u6302\u8f7d\u8fdc\u7a0b\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\">#  mkdir \/var\/nginx -p<\/span><\/p>\n<h4>9.2 \u6267\u884c\u6302\u8f7d<\/h4>\n<p>\u4f7f\u7528 mount \u547d\u4ee4\u6302\u8f7d NFS \u5171\u4eab&#xff1a;<\/p>\n<li>-t nfs \u6307\u5b9a\u4e86\u6587\u4ef6\u7cfb\u7edf\u7684\u7c7b\u578b\u4e3a NFS&#xff1b;<\/li>\n<li>192.168.88.7:\/nfs\/data \u662f NFS \u670d\u52a1\u5668\u7684 IP \u5730\u5740\u548c\u8981\u6302\u8f7d\u7684\u5171\u4eab\u76ee\u5f55\u8def\u5f84\u3002NFS \u670d\u52a1\u5668\u7684 IP \u5730\u5740\u662f 192.168.88.7&#xff0c;\u800c\u5171\u4eab\u76ee\u5f55\u662f \/nfs\/data&#xff1b;<\/li>\n<li>\/var\/nginx \u662f\u672c\u5730\u6302\u8f7d\u70b9&#xff0c;\u5373\u8fdc\u7a0b NFS \u5171\u4eab\u76ee\u5f55\u5c06\u5728\u672c\u5730\u7cfb\u7edf\u4e2d\u88ab\u8bbf\u95ee\u7684\u8def\u5f84\u3002<\/li>\n<p>\u8fd0\u884c df -h \u547d\u4ee4\u6765\u663e\u793a\u78c1\u76d8\u7a7a\u95f4\u4f7f\u7528\u60c5\u51b5&#xff0c;\u201c-h\u201d\u9009\u9879\u4ee5\u4eba\u7c7b\u53ef\u8bfb\u7684\u683c\u5f0f&#xff08;\u5982 KB, MB, GB&#xff09;\u663e\u793a\u4fe1\u606f\u3002 \u8f93\u51fa\u7ed3\u679c\u663e\u793a\u4e86\u6240\u6709\u5df2\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u7684\u6982\u89c8&#xff0c;\u5305\u62ec\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u548c\u521a\u521a\u6302\u8f7d\u7684 NFS \u5171\u4eab\u3002<\/p>\n<li>Filesystem&#xff1a;\u5217\u51fa\u6bcf\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u8bbe\u5907\u540d\u79f0\u3002<\/li>\n<li>Size\u3001Used\u3001Avail\u3001Use%&#xff1a;\u5206\u522b\u8868\u793a\u6587\u4ef6\u7cfb\u7edf\u7684\u603b\u5927\u5c0f\u3001\u5df2\u7528\u7a7a\u95f4\u3001\u53ef\u7528\u7a7a\u95f4\u4ee5\u53ca\u4f7f\u7528\u767e\u5206\u6bd4\u3002<\/li>\n<li>Mounted on&#xff1a;\u6307\u51fa\u6bcf\u4e2a\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d\u5230\u672c\u5730\u6587\u4ef6\u6811\u7684\u4f4d\u7f6e<\/li>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount -t nfs 192.168.88.7:\/nfs\/data \/var\/nginx<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># df -h<\/span><br \/>\nFilesystem                  Size  Used Avail Use% Mounted on<br \/>\n\/dev\/mapper\/openeuler-root   45G  <span class=\"token number\">1<\/span>.8G   41G   <span class=\"token number\">5<\/span>% \/<br \/>\ndevtmpfs                    <span class=\"token number\">4<\/span>.0M     <span class=\"token number\">0<\/span>  <span class=\"token number\">4<\/span>.0M   <span class=\"token number\">0<\/span>% \/dev<br \/>\ntmpfs                       <span class=\"token number\">1<\/span>.7G     <span class=\"token number\">0<\/span>  <span class=\"token number\">1<\/span>.7G   <span class=\"token number\">0<\/span>% \/dev\/shm<br \/>\ntmpfs                       <span class=\"token number\">4<\/span>.0M     <span class=\"token number\">0<\/span>  <span class=\"token number\">4<\/span>.0M   <span class=\"token number\">0<\/span>% \/sys\/fs\/cgroup<br \/>\ntmpfs                       675M  <span class=\"token number\">9<\/span>.1M  666M   <span class=\"token number\">2<\/span>% \/run<br \/>\ntmpfs                       <span class=\"token number\">1<\/span>.7G     <span class=\"token number\">0<\/span>  <span class=\"token number\">1<\/span>.7G   <span class=\"token number\">0<\/span>% \/tmp<br \/>\n\/dev\/nvme0n1p2              974M  175M  732M  <span class=\"token number\">20<\/span>% \/boot<br \/>\n<span class=\"token number\">192.168<\/span>.88.7:\/nfs\/data       45G  <span class=\"token number\">1<\/span>.7G   43G   <span class=\"token number\">4<\/span>% \/var\/nginx<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># <\/span><\/p>\n<p>\u4e3a\u4e86\u80fd\u591f\u5199\u6587\u4ef6&#xff0c;\u6211\u4eec\u8fd8\u9700\u8981\u5c06 NFS \u670d\u52a1\u7aef\u7684\u5171\u4eab\u76ee\u5f55\u7684\u5199\u6743\u9650\u52a0\u4e0a\u3002 \u524d\u9762\u5df2\u7ecf\u4e3a NFS \u5171\u4eab\u76ee\u5f55 \/nfs\/data \u8bbe\u7f6e\u4e86\u8bfb\u5199\u6743\u9650&#xff08;\u901a\u8fc7 \/etc\/exports \u6587\u4ef6\u4e2d\u7684 rw \u53c2\u6570&#xff09;&#xff0c;\u4f46\u662f\u8fd8\u9700\u8981\u786e\u4fdd\u8be5\u76ee\u5f55\u7684\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u6743\u9650\u5141\u8bb8\u5176\u4ed6\u7528\u6237&#xff08;\u5373 NFS \u5ba2\u6237\u7aef&#xff09;\u8fdb\u884c\u5199\u64cd\u4f5c\u3002\u8fd9\u662f\u56e0\u4e3a\u5728 Linux \u7cfb\u7edf\u4e2d&#xff0c;NFS \u5171\u4eab\u7684\u8bbf\u95ee\u6743\u9650\u7531\u4e24\u90e8\u5206\u63a7\u5236&#xff1a;\u4e00\u90e8\u5206\u662f NFS \u5bfc\u51fa\u914d\u7f6e&#xff08;\u5982 \/etc\/exports \u6587\u4ef6\u4e2d\u7684\u8bbe\u7f6e&#xff09;&#xff0c;\u53e6\u4e00\u90e8\u5206\u662f\u5171\u4eab\u76ee\u5f55\u81ea\u8eab\u7684\u6587\u4ef6\u7cfb\u7edf\u6743\u9650\u3002<\/p>\n<p>NFS \u914d\u7f6e (\/etc\/exports) \u4e2d\u7684\u6743\u9650&#xff1a; \u524d\u9762\u5728 \/etc\/exports \u4e2d\u6dfb\u52a0\u4e86 \/nfs\/data 192.168.72.0\/24(rw,sync)&#xff0c;\u8fd9\u544a\u8bc9 NFS \u670d\u52a1\u5668\u5141\u8bb8\u6765\u81ea 192.168.72.0\/24 \u7f51\u7edc\u6bb5\u5185\u7684\u5ba2\u6237\u7aef\u5bf9 \/nfs\/data \u76ee\u5f55\u6709\u8bfb\u5199&#xff08;rw&#xff09;\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n<p>\u6587\u4ef6\u7cfb\u7edf\u7ea7\u522b\u7684\u6743\u9650&#xff1a; \u5728\u4f60\u6700\u521d\u5217\u51fa\u7684 \/nfs\/data \u76ee\u5f55\u6743\u9650\u4e3a drwxr-xr-x.&#xff0c;\u8fd9\u610f\u5473\u7740&#xff1a; \u6240\u6709\u8005&#xff08;root&#xff09;\u6709\u8bfb\u3001\u5199\u548c\u6267\u884c\u6743\u9650\u3002 \u7ec4\u7528\u6237\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650\u3002 \u5176\u4ed6\u7528\u6237\u53ea\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650&#xff0c;\u6ca1\u6709\u5199\u6743\u9650\u3002 \u8fd9\u610f\u5473\u7740&#xff0c;\u5373\u4f7f NFS \u914d\u7f6e\u5141\u8bb8\u5199\u5165&#xff0c;\u5982\u679c\u6587\u4ef6\u7cfb\u7edf\u672c\u8eab\u4e0d\u8d4b\u4e88\u5176\u4ed6\u7528\u6237\u5199\u6743\u9650&#xff0c;\u5219 NFS \u5ba2\u6237\u7aef\u4ecd\u7136\u65e0\u6cd5\u5199\u5165\u8fd9\u4e2a\u76ee\u5f55\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48\u9700\u8981\u518d\u6b21\u6dfb\u52a0\u5199\u6743\u9650 (chmod o&#043;w \/nfs\/data)&#xff1a; \u6dfb\u52a0 o&#043;w \u6743\u9650\u7ed9 \/nfs\/data \u76ee\u5f55\u662f\u4e3a\u4e86\u786e\u4fdd\u5176\u4ed6\u7528\u6237&#xff08;\u5305\u62ec\u4ece NFS \u5ba2\u6237\u7aef\u8bbf\u95ee\u6b64\u76ee\u5f55\u7684\u7528\u6237&#xff09;\u80fd\u591f\u5728\u6b64\u76ee\u5f55\u4e0b\u521b\u5efa\u65b0\u6587\u4ef6\u6216\u4fee\u6539\u73b0\u6709\u6587\u4ef6\u3002 \u4fee\u6539\u540e\u7684\u6743\u9650\u53d8\u4e3a drwxr-xrwx.&#xff0c;\u8868\u793a\u6240\u6709\u7528\u6237&#xff08;\u5305\u62ec\u5176\u4ed6\u7528\u6237&#xff09;\u73b0\u5728\u90fd\u6709\u5bf9\u8be5\u76ee\u5f55\u7684\u5199\u6743\u9650&#xff0c;\u8fd9\u6837\u5c31\u4fdd\u8bc1\u4e86 NFS \u5ba2\u6237\u7aef\u53ef\u4ee5\u6309\u7167 NFS \u5bfc\u51fa\u914d\u7f6e\u4e2d\u7684\u8bbe\u5b9a\u6765\u8bbf\u95ee&#xff08;\u8bfb\u5199&#xff09;\u8be5\u76ee\u5f55\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># ll -d \/nfs\/data<\/span><br \/>\ndrwxr-xr-x. <span class=\"token number\">2<\/span> root root <span class=\"token number\">6<\/span> Mar <span class=\"token number\">16<\/span> <span class=\"token number\">11<\/span>:25 \/nfs\/data<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># chmod o&#043;w \/nfs\/data<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># ll -d \/nfs\/data<\/span><br \/>\ndrwxr-xrwx. <span class=\"token number\">2<\/span> root root <span class=\"token number\">6<\/span> Mar <span class=\"token number\">16<\/span> <span class=\"token number\">11<\/span>:25 \/nfs\/data<\/p>\n<ul>\n<li>\u8fd9\u91cc\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26 d \u8868\u793a\u8be5\u9879\u662f\u4e00\u4e2a\u76ee\u5f55&#xff08;directory&#xff09;\u3002<\/li>\n<li>\n<ul>\n<li>\u5982\u679c\u8be5\u9879\u662f\u4e00\u4e2a\u666e\u901a\u6587\u4ef6&#xff0c;\u5219\u6b64\u5904\u4f1a\u662f\u4e00\u4e2a -&#xff1b;<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>\u5982\u679c\u662f\u94fe\u63a5&#xff0c;\u5219\u662f l&#xff08;link&#xff09;&#xff1b;<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>\u5982\u679c\u662f\u5757\u8bbe\u5907\u6587\u4ef6&#xff0c;\u5219\u662f b&#xff1b;<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>\u5982\u679c\u662f\u5b57\u7b26\u8bbe\u5907\u6587\u4ef6&#xff0c;\u5219\u662f c&#xff1b;<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>\u5176\u4ed6\u7c7b\u578b\u8fd8\u6709\u7ba1\u9053&#xff08;p&#xff09;\u548c\u5957\u63a5\u5b57&#xff08;s&#xff09;\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>10\u3001\u9a8c\u8bc1\u662f\u5426\u53ef\u8bfb\u53ef\u5199<\/h3>\n<p>1&#xff09;\u5728 NFS \u670d\u52a1\u7aef\u5199\u4e00\u4e2a\u6587\u4ef6\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># echo hello nfs &gt; \/nfs\/data\/index.html<\/span><\/p>\n<p>\u5728 NFS \u5ba2\u6237\u7aef\u67e5\u770b&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/var\/nginx\/index.html<\/span><br \/>\nhello nfs<\/p>\n<p>\u4ece\u800c\u53ef\u4ee5\u53d1\u73b0\u8bfb\u6ca1\u6709\u95ee\u9898\u3002<\/p>\n<p>2&#xff09;\u5728 NFS \u5ba2\u6237\u7aef\u5199\u4e00\u4e2a\u6587\u4ef6<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># echo write nfs &gt; \/var\/nginx\/test<\/span><\/p>\n<p>\u7136\u540e\u5728 NFS \u670d\u52a1\u7aef\u67e5\u770b<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/nfs\/data\/test<\/span><br \/>\n<span class=\"token function\">write<\/span> nfs<\/p>\n<p>\u5199\u64cd\u4f5c\u4e5f\u662fOK\u7684<\/p>\n<h3>11\u3001\u642d\u5efanginx\u670d\u52a1<\/h3>\n<p>web\u670d\u52a1\u5668\u4e0a\u64cd\u4f5c<\/p>\n<h4>11.1\u5b89\u88c5nginx<\/h4>\n<p>\u6709\u4e24\u79cd\u5b89\u88c5\u65b9\u6cd5&#xff1a;\u672c\u5730\u5b89\u88c5\u548c\u5b98\u65b9\u5b89\u88c5<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u672c\u5730\u4ed3\u5e93\u5b89\u88c5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dnf install nginx -y<\/span><br \/>\n<span class=\"token comment\"># \u5378\u8f7d\u672c\u5730\u4ed3\u5e93\u5b89\u88c5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dnf remove nginx -y<\/span><\/p>\n<p><span class=\"token comment\"># ngin\u5b98\u65b9\u4ed3\u5e93\u5b89\u88c5<\/span><br \/>\n<span class=\"token comment\"># 1. \u914d\u7f6enginx\u5b98\u65b9\u4ed3\u5e93<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/yum.repos.d\/nginx.repo<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/etc\/yum.repos.d\/nginx.repo<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>nginx-stable<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">name<\/span><span class=\"token operator\">&#061;<\/span>nginx stable repo<br \/>\n<span class=\"token assign-left variable\">baseurl<\/span><span class=\"token operator\">&#061;<\/span>http:\/\/nginx.org\/packages\/centos\/<span class=\"token variable\">$releasever<\/span>\/<span class=\"token variable\">$basearch<\/span>\/<br \/>\n<span class=\"token assign-left variable\">gpgcheck<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><br \/>\n<span class=\"token assign-left variable\">enabled<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><br \/>\n<span class=\"token assign-left variable\">gpgkey<\/span><span class=\"token operator\">&#061;<\/span>https:\/\/nginx.org\/keys\/nginx_signing.key<br \/>\n<span class=\"token assign-left variable\">module_hotfixes<\/span><span class=\"token operator\">&#061;<\/span>true<\/p>\n<p><span class=\"token punctuation\">[<\/span>nginx-mainline<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">name<\/span><span class=\"token operator\">&#061;<\/span>nginx mainline repo<br \/>\n<span class=\"token assign-left variable\">baseurl<\/span><span class=\"token operator\">&#061;<\/span>http:\/\/nginx.org\/packages\/mainline\/centos\/<span class=\"token variable\">$releasever<\/span>\/<span class=\"token variable\">$basearch<\/span>\/<br \/>\n<span class=\"token assign-left variable\">gpgcheck<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><br \/>\n<span class=\"token assign-left variable\">enabled<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span><br \/>\n<span class=\"token assign-left variable\">gpgkey<\/span><span class=\"token operator\">&#061;<\/span>https:\/\/nginx.org\/keys\/nginx_signing.key<br \/>\n<span class=\"token assign-left variable\">module_hotfixes<\/span><span class=\"token operator\">&#061;<\/span>true<br \/>\n<span class=\"token comment\"># 2. \u5b89\u88c5nginx<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dnf install nginx -y<\/span><\/p>\n<h4>11.2 \u67e5\u770b\u670d\u52a1<\/h4>\n<p>\u6211\u4eec\u67e5\u627e nginx \u7684\u542f\u52a8\u670d\u52a1\u6587\u4ef6&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># find \/ -name nginx.service<\/span><br \/>\n\/usr\/lib\/systemd\/system\/nginx.service<\/p>\n<p>\u67e5\u770b\u8fd9\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/usr\/lib\/systemd\/system\/nginx.service<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>Unit<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">Description<\/span><span class=\"token operator\">&#061;<\/span>The nginx HTTP and reverse proxy server<br \/>\n<span class=\"token assign-left variable\">After<\/span><span class=\"token operator\">&#061;<\/span>network.target remote-fs.target nss-lookup.target<\/p>\n<p><span class=\"token punctuation\">[<\/span>Service<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">Type<\/span><span class=\"token operator\">&#061;<\/span>forking<br \/>\n<span class=\"token assign-left variable\">PIDFile<\/span><span class=\"token operator\">&#061;<\/span>\/run\/nginx.pid<br \/>\n<span class=\"token comment\"># Nginx will fail to start if \/run\/nginx.pid already exists but has the wrong<\/span><br \/>\n<span class=\"token comment\"># SELinux context. This might happen when running &#096;nginx -t&#096; from the cmdline.<\/span><br \/>\n<span class=\"token assign-left variable\">ExecStartPre<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/bin\/rm <span class=\"token parameter variable\">-f<\/span> \/run\/nginx.pid<br \/>\n<span class=\"token assign-left variable\">ExecStartPre<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/nginx <span class=\"token parameter variable\">-t<\/span><br \/>\n<span class=\"token assign-left variable\">ExecStart<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/nginx<br \/>\n<span class=\"token comment\">#ExecStop&#061;\/usr\/sbin\/nginx -s stop | quit<\/span><br \/>\n<span class=\"token assign-left variable\">ExecReload<\/span><span class=\"token operator\">&#061;<\/span>\/bin\/kill <span class=\"token parameter variable\">-s<\/span> HUP <span class=\"token variable\">$MAINPID<\/span><br \/>\n<span class=\"token assign-left variable\">KillSignal<\/span><span class=\"token operator\">&#061;<\/span>SIGQUIT<br \/>\n<span class=\"token assign-left variable\">TimeoutStopSec<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span><br \/>\n<span class=\"token assign-left variable\">KillMode<\/span><span class=\"token operator\">&#061;<\/span>mixed<br \/>\n<span class=\"token assign-left variable\">PrivateTmp<\/span><span class=\"token operator\">&#061;<\/span>true<\/p>\n<p><span class=\"token punctuation\">[<\/span>Install<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">WantedBy<\/span><span class=\"token operator\">&#061;<\/span>multi-user.target<\/p>\n<h4>11.3 \u542f\u52a8nginx<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl start nginx<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl status nginx<\/span><br \/>\n\u25cf nginx.service &#8211; The nginx HTTP and reverse proxy server<br \/>\n     Loaded: loaded <span class=\"token punctuation\">(<\/span>\/usr\/lib\/systemd\/system\/nginx.service<span class=\"token punctuation\">;<\/span> disabled<span class=\"token punctuation\">;<\/span> preset: disabled<span class=\"token punctuation\">)<\/span><br \/>\n     Active: active <span class=\"token punctuation\">(<\/span>running<span class=\"token punctuation\">)<\/span> since Sun <span class=\"token number\">2025<\/span>-03-16 <span class=\"token number\">20<\/span>:43:28 CST<span class=\"token punctuation\">;<\/span> 8s ago<br \/>\n    Process: <span class=\"token number\">2352<\/span> <span class=\"token assign-left variable\">ExecStartPre<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/bin\/rm <span class=\"token parameter variable\">-f<\/span> \/run\/nginx.pid <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n    Process: <span class=\"token number\">2356<\/span> <span class=\"token assign-left variable\">ExecStartPre<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/nginx <span class=\"token parameter variable\">-t<\/span> <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n    Process: <span class=\"token number\">2360<\/span> <span class=\"token assign-left variable\">ExecStart<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/sbin\/nginx <span class=\"token punctuation\">(<\/span>code<span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span>\/SUCCESS<span class=\"token punctuation\">)<\/span><br \/>\n   Main PID: <span class=\"token number\">2361<\/span> <span class=\"token punctuation\">(<\/span>nginx<span class=\"token punctuation\">)<\/span><br \/>\n      Tasks: <span class=\"token number\">5<\/span> <span class=\"token punctuation\">(<\/span>limit: <span class=\"token number\">21357<\/span><span class=\"token punctuation\">)<\/span><br \/>\n     Memory: <span class=\"token number\">11<\/span>.0M <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n     CGroup: \/system.slice\/nginx.service<br \/>\n             \u251c\u25002361 <span class=\"token string\">&#034;nginx: master process \/usr\/sbin\/nginx&#034;<\/span><br \/>\n             \u251c\u25002362 <span class=\"token string\">&#034;nginx: worker process&#034;<\/span><br \/>\n             \u251c\u25002363 <span class=\"token string\">&#034;nginx: worker process&#034;<\/span><br \/>\n             \u251c\u25002364 <span class=\"token string\">&#034;nginx: worker process&#034;<\/span><br \/>\n             \u2514\u25002365 <span class=\"token string\">&#034;nginx: worker process&#034;<\/span><\/p>\n<p>Mar <span class=\"token number\">16<\/span> <span class=\"token number\">20<\/span>:43:28 web systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Starting The nginx HTTP and reverse proxy server<span class=\"token punctuation\">..<\/span>.<br \/>\nMar <span class=\"token number\">16<\/span> <span class=\"token number\">20<\/span>:43:28 web nginx<span class=\"token punctuation\">[<\/span><span class=\"token number\">2356<\/span><span class=\"token punctuation\">]<\/span>: nginx: the configuration <span class=\"token function\">file<\/span> \/etc\/nginx\/nginx.conf syntax<span class=\"token operator\">&gt;<\/span><br \/>\nMar <span class=\"token number\">16<\/span> <span class=\"token number\">20<\/span>:43:28 web nginx<span class=\"token punctuation\">[<\/span><span class=\"token number\">2356<\/span><span class=\"token punctuation\">]<\/span>: nginx: configuration <span class=\"token function\">file<\/span> \/etc\/nginx\/nginx.conf <span class=\"token builtin class-name\">test<\/span> is su<span class=\"token operator\">&gt;<\/span><br \/>\nMar <span class=\"token number\">16<\/span> <span class=\"token number\">20<\/span>:43:28 web systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Started The nginx HTTP and reverse proxy server.<\/p>\n<h4>11.4 \u67e5\u770bnginx.conf\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/nginx.conf<\/span><\/p>\n<h4>11.5 \u914d\u7f6eweb\u670d\u52a1<\/h4>\n<ul>\n<li>[root&#064;web ~]# vim \/etc\/nginx\/conf.d\/nfs.conf<\/li>\n<li>\n<ul>\n<li>\u4f7f\u7528 vim \u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u6216\u521b\u5efa \/etc\/nginx\/conf.d\/nfs.conf \u6587\u4ef6\u3002Nginx \u5e38\u5e38\u4f1a\u5728\/etc\/nginx\/conf.d\/ \u76ee\u5f55\u4e0b\u67e5\u627e\u989d\u5916\u7684\u914d\u7f6e\u6587\u4ef6&#xff0c;\u8fd9\u4e9b\u6587\u4ef6\u901a\u5e38\u4ee5 .conf \u7ed3\u5c3e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>[root&#064;web ~]# cat \/etc\/nginx\/conf.d\/nfs.conf \u8fd9\u6761\u547d\u4ee4\u663e\u793a\u4e86\u4f60\u5728 nfs.conf \u6587\u4ef6\u4e2d\u6dfb\u52a0\u7684\u914d\u7f6e\u5185\u5bb9<\/li>\n<li>\n<ul>\n<li>server \u5757\u5b9a\u4e49\u4e86\u4e00\u4e2a\u865a\u62df\u4e3b\u673a\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>access_log \u548c error_log \u5206\u522b\u6307\u5b9a\u4e86\u8bbf\u95ee\u65e5\u5fd7\u548c\u9519\u8bef\u65e5\u5fd7\u7684\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>server_name \u5b9a\u4e49\u4e86\u8be5\u865a\u62df\u4e3b\u673a\u54cd\u5e94\u7684\u57df\u540d\u6216 IP \u5730\u5740&#xff0c;\u5728\u8fd9\u91cc\u8bbe\u7f6e\u4e3a 192.168.88.8&#xff0c;\u5373\u4f60\u7684web\u670d\u52a1\u5668IP\u5730\u5740\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>root \/var\/nginx\/; \u8bbe\u7f6e\u4e86\u7f51\u7ad9\u6839\u76ee\u5f55&#xff0c;\u6307\u5411\u4e86\u4f60\u4e4b\u524d\u901a\u8fc7 NFS \u6302\u8f7d\u7684 \/var\/nginx\/ \u76ee\u5f55\u3002\u8fd9\u610f\u5473\u7740\u5f53\u4f60\u8bbf\u95ee\u8fd9\u4e2a\u670d\u52a1\u5668\u65f6&#xff0c;Nginx \u5c06\u4f1a\u4ece \/var\/nginx\/ \u76ee\u5f55\u63d0\u4f9b\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span class=\"token comment\"># \u914d\u7f6e\u4e00\u4e2aweb\u670d\u52a1<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/conf.d\/nfs.conf<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/etc\/nginx\/conf.d\/nfs.conf<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\n        access_log \/var\/log\/nginx\/access.log<span class=\"token punctuation\">;<\/span><br \/>\n        error_log \/var\/log\/nginx\/error.log<span class=\"token punctuation\">;<\/span><\/p>\n<p>        server_name <span class=\"token number\">192.168<\/span>.88.8<span class=\"token punctuation\">;<\/span><br \/>\n        root \/var\/nginx\/<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6709\u6548<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># \/usr\/sbin\/nginx -t<\/span><br \/>\nnginx: the configuration <span class=\"token function\">file<\/span> \/etc\/nginx\/nginx.conf syntax is ok<br \/>\nnginx: configuration <span class=\"token function\">file<\/span> \/etc\/nginx\/nginx.conf <span class=\"token builtin class-name\">test<\/span> is successful<\/p>\n<p><span class=\"token comment\"># \u91cd\u542f nginx \u670d\u52a1<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl restart nginx  #\u4f7f\u914d\u7f6e\u751f\u6548<\/span><\/p>\n<h4>11.6 \u653e\u884c80\u7aef\u53e3<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;permanent &#8211;add-port&#061;80\/tcp<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;reload<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;list-all<\/span><br \/>\npublic <span class=\"token punctuation\">(<\/span>active<span class=\"token punctuation\">)<\/span><br \/>\n  target: default<br \/>\n  icmp-block-inversion: no<br \/>\n  interfaces: ens33<br \/>\n  sources:<br \/>\n  services: dhcpv6-client mdns nfs <span class=\"token function\">ssh<\/span><br \/>\n  ports: <span class=\"token number\">80<\/span>\/tcp<br \/>\n  protocols:<br \/>\n  forward: <span class=\"token function\">yes<\/span><br \/>\n  masquerade: no<br \/>\n  forward-ports:<br \/>\n  source-ports:<br \/>\n  icmp-blocks:<br \/>\n  rich rules: <\/p>\n<h3>12\u3001\u6d4f\u89c8<\/h3>\n<p>\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8f93\u5165 http:\/\/192.168.88.8 \u6765\u8bbf\u95ee&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143722-680263a298060.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6216\u8005\u4f7f\u7528 curl \u6765\u6d4b\u8bd5<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/192.168.88.8   #\u8fd9\u6761\u547d\u4ee4\u4f7f\u7528 curl \u53d1\u9001\u4e00\u4e2a HTTP \u8bf7\u6c42\u5230 IP \u5730\u5740\u4e3a 192.168.88.8 \u7684 Web \u670d\u52a1\u5668&#xff0c;\u5e76\u6253\u5370\u51fa\u8fd4\u56de\u7684\u5185\u5bb9\u3002<\/span><br \/>\nhello nfs<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;web ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/192.168.88.8 -I   #-I \u53c2\u6570\u544a\u8bc9 curl \u53ea\u8bf7\u6c42 HTTP \u54cd\u5e94\u7684\u5934\u90e8\u4fe1\u606f&#xff0c;\u800c\u4e0d\u4e0b\u8f7d\u5b9e\u9645\u7684\u5185\u5bb9\u3002<\/span><br \/>\nHTTP\/1.1 <span class=\"token number\">200<\/span> OK<br \/>\nServer: nginx\/1.24.0<br \/>\nDate: Sun, <span class=\"token number\">16<\/span> Mar <span class=\"token number\">2025<\/span> <span class=\"token number\">13<\/span>:04:35 GMT<br \/>\nContent-Type: text\/html<br \/>\nContent-Length: <span class=\"token number\">10<\/span><br \/>\nLast-Modified: Sun, <span class=\"token number\">16<\/span> Mar <span class=\"token number\">2025<\/span> 04:35:01 GMT<br \/>\nConnection: keep-alive<br \/>\nETag: <span class=\"token string\">&#034;67d654f5-a&#034;<\/span><br \/>\nAccept-Ranges: bytes<\/p>\n<p><span class=\"token comment\">#HTTP\/1.1 20\/XMLSchema 200 OK&#xff1a;\u8868\u793a\u8bf7\u6c42\u6210\u529f&#xff0c;\u72b6\u6001\u7801 200 \u8868\u793a\u670d\u52a1\u5668\u6210\u529f\u5904\u7406\u4e86\u8bf7\u6c42\u3002<\/span><br \/>\n<span class=\"token comment\">#Server: nginx\/1.24.0&#xff1a;\u6807\u8bc6\u4e86\u63d0\u4f9b\u670d\u52a1\u7684\u670d\u52a1\u5668\u8f6f\u4ef6\u53ca\u5176\u7248\u672c\u53f7\u3002<\/span><br \/>\n<span class=\"token comment\">#Date&#xff1a;\u670d\u52a1\u5668\u54cd\u5e94\u7684\u65f6\u95f4\u3002<\/span><br \/>\n<span class=\"token comment\">#Content-Type: text\/html&#xff1a;\u6307\u793a\u8fd4\u56de\u7684\u5185\u5bb9\u7c7b\u578b\u4e3a HTML \u6587\u672c\u3002<\/span><br \/>\n<span class=\"token comment\">#Content-Length: 10&#xff1a;\u54cd\u5e94\u4f53\u7684\u957f\u5ea6\u4e3a 10 \u5b57\u8282&#xff0c;\u5bf9\u5e94\u4e8e\u4e4b\u524d curl \u8bf7\u6c42\u76f4\u63a5\u83b7\u53d6\u7684\u5185\u5bb9\u201chello nfs\u201d&#xff08;\u4e0d\u5305\u62ec\u6362\u884c\u7b26&#xff09;\u3002<\/span><br \/>\n<span class=\"token comment\">#Last-Modified&#xff1a;\u8be5\u8d44\u6e90\u6700\u540e\u4e00\u6b21\u88ab\u4fee\u6539\u7684\u65f6\u95f4\u3002<\/span><br \/>\n<span class=\"token comment\">#Connection: keep-alive&#xff1a;\u8868\u793a\u4f7f\u7528\u6301\u4e45\u8fde\u63a5&#xff0c;\u5141\u8bb8\u5728\u540c\u4e00\u8fde\u63a5\u4e0a\u53d1\u9001\u591a\u4e2a\u8bf7\u6c42\u3002<\/span><br \/>\n<span class=\"token comment\">#ETag&#xff1a;\u7528\u4e8e\u7f13\u5b58\u9a8c\u8bc1\u7684\u5b9e\u4f53\u6807\u7b7e\u3002<\/span><br \/>\n<span class=\"token comment\">#Accept-Ranges: bytes&#xff1a;\u8868\u793a\u670d\u52a1\u5668\u652f\u6301\u5b57\u8282\u8303\u56f4\u8bf7\u6c42&#xff0c;\u5141\u8bb8\u5ba2\u6237\u7aef\u8bf7\u6c42\u90e8\u5206\u6587\u4ef6\u5185\u5bb9\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002_ngxin \u914d\u7f6e \u4efb\u610f\u5176\u4ed6\u9879\u6620\u5c04\u5230index.html<\/p>\n","protected":false},"author":2,"featured_media":16112,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,763,43,44,1088],"topic":[],"class_list":["post-16122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-763","tag-43","tag-44","tag-1088"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 - \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\/16122.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002_ngxin \u914d\u7f6e \u4efb\u610f\u5176\u4ed6\u9879\u6620\u5c04\u5230index.html\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/16122.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-18T14:37:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143721-680263a1bbd4e.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=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/16122.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/16122.html\",\"name\":\"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T14:37:23+00:00\",\"dateModified\":\"2025-04-18T14:37:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/16122.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/16122.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/16122.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002\"}]},{\"@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":"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 - \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\/16122.html","og_locale":"zh_CN","og_type":"article","og_title":"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002_ngxin \u914d\u7f6e \u4efb\u610f\u5176\u4ed6\u9879\u6620\u5c04\u5230index.html","og_url":"https:\/\/www.wsisp.com\/helps\/16122.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T14:37:23+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418143721-680263a1bbd4e.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/16122.html","url":"https:\/\/www.wsisp.com\/helps\/16122.html","name":"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T14:37:23+00:00","dateModified":"2025-04-18T14:37:23+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/16122.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/16122.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/16122.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u914d\u7f6eNFS\u670d\u52a1\u5668\u4f5c\u4e3a ngxin \u670d\u52a1\u7684\u5b58\u50a8\u76ee\u5f55\uff0c\u5e76\u5728\u76ee\u5f55\u4e2d\u521b\u5efa index.html \u6587\u4ef6\uff0c\u5f53\u8bbf\u95ee http:\/\/\u4f60\u7684IP \u5730\u5740\u65f6\uff0c\u53ef\u4ee5\u6210\u529f\u663e\u793a index.html \u6587\u4ef6\u7684\u5185\u5bb9\u3002"}]},{"@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\/16122","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=16122"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/16122\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/16112"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=16122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=16122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=16122"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=16122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}