{"id":40064,"date":"2025-05-27T09:26:22","date_gmt":"2025-05-27T01:26:22","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/40064.html"},"modified":"2025-05-27T09:26:22","modified_gmt":"2025-05-27T01:26:22","slug":"web-%e6%9c%8d%e5%8a%a1%e3%80%81-nfs-%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%bb%a5%e5%8f%8a-dns-%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%bb%bc%e5%90%88%e5%ae%9e%e9%aa%8c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/40064.html","title":{"rendered":"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c"},"content":{"rendered":"<h3 style=\"background-color:transparent\">\u8981\u6c42&#xff1a;<\/h3>\n<p>1.web \u670d\u52a1\u7684\u8d44\u6e90\u6587\u4ef6\u901a\u8fc7 nfs \u670d\u52a1\u5668\u5171\u4eab\u00a0 www.luntan.com<\/p>\n<p>2.\u786e\u4fdd\u6240\u6709\u4e3b\u673a\u65f6\u95f4\u540c\u6b65<\/p>\n<p>3.\u5b9a\u4e49\u672c\u5730 dns \u670d\u52a1\u5668\u89e3\u6790 web \u4e3b\u673a\u57df\u540d<\/p>\n<h3>\u5b9e\u9a8c&#xff1a;<\/h3>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td style=\"text-align:center;width:245px\">\u4e3b\u673a<\/td>\n<td style=\"text-align:center;width:254px\">\u670d\u52a1\u7a0b\u5e8f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;width:245px\">192.168.96.142<\/td>\n<td style=\"text-align:center;width:254px\">dns\u3001nfs<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;width:245px\">192.168.96.132<\/td>\n<td style=\"text-align:center;width:254px\">web<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u670d\u52a1\u5668\u8bf4\u660e&#xff1a;<\/h4>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td style=\"text-align:center;width:244px\">\u8bbe\u5907\u00a0 \u00a0 \u00a0\u00a0<\/td>\n<td style=\"text-align:center;width:254px\">IP<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;width:244px\">\u670d\u52a1\u7aef<\/td>\n<td style=\"text-align:center;width:254px\">\n<p style=\"text-align:center\">192.168.96.142<\/p>\n<p style=\"text-align:center\">[root&#064;localhost ~]<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;width:244px\">\u5ba2\u6237\u7aef<\/td>\n<td style=\"text-align:center;width:254px\">\n<p style=\"text-align:center\">192.168.96.132<\/p>\n<p style=\"text-align:center\">[root&#064;www ~]<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.\u786e\u4fdd\u6240\u6709\u4e3b\u673a\u65f6\u95f4\u540c\u6b65<\/h4>\n<h5>\u2460 \u9996\u5148\u68c0\u67e5 chrony \u670d\u52a1\u662f\u5426\u5df2\u7ecf\u5b89\u88c5&#xff08;chrony \u662f\u5728 linux \u7cfb\u7edf\u4e2d\u7528\u4e8e\u65f6\u95f4\u540c\u6b65\u7684\u5b88\u62a4\u8fdb\u7a0b&#xff0c;\u53ef\u4ee5\u8ba9\u7cfb\u7edf\u65f6\u949f\u4e0e\u7f51\u7edc\u65f6\u95f4\u534f\u8bae&#xff08;NTP&#xff09;\u670d\u52a1\u5668\u4fdd\u6301\u540c\u6b65&#xff09;&#xff1b;\u5728\u770b\u5230\u5df2\u5b89\u88c5\u540e\u542f\u52a8\u8be5\u7a0b\u5e8f<\/h5>\n<p>[root&#064;142 ~]# rpm -qa | grep chrony<br \/>\nchrony-4.5-3.el9.x86_64<\/p>\n<p>[root&#064;142 ~]# systemctl start chronyd  <\/p>\n<h5>\u2461 \u8fdb\u5165\u5230 chrony \u670d\u52a1\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\u6307\u5b9a\u7684 NTP \u670d\u52a1\u5668\u6c60<\/h5>\n<p>[root&#064;142 ~]# vim \/etc\/chrony.conf <\/p>\n<p>pool 2.rhel.pool.ntp.org iburst <\/p>\n<h5>\u2462\u00a0\u67e5\u770b\u00a0chrony\u00a0\u5f53\u524d\u65f6\u95f4\u6e90\u72b6\u6001&#xff0c;\u5e26 * \u7b26\u53f7\u7684\u6e90\u8868\u793a\u5f53\u524d\u6b63\u5728\u4f7f\u7528\u8be5\u670d\u52a1\u5668\u8fdb\u884c\u540c\u6b65&#xff1b;\u4e24\u4e2a\u4e3b\u673a\u7684\u540c\u6b65\u7684 IP \u5730\u5740\u4e00\u6837\u8bf4\u660e\u5728\u00a0\/etc\/chrony.conf \u4e2d\u91cd\u590d\u914d\u7f6e\u4e86\u00a0\u540c\u4e00\u4e2a NTP \u670d\u52a1\u5668<\/h5>\n<p>[root&#064;142 ~]# chronyc sources<\/p>\n<p>MS Name\/IP address         Stratum Poll Reach LastRx Last sample<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n^- time.cloudflare.com           3   9   377    56    &#043;23ms[  &#043;22ms] &#043;\/-  242ms<br \/>\n^&#043; ntp5.flashdance.cx            2   8   377   370  -2762us[-4281us] &#043;\/-  108ms<br \/>\n^&#043; time.cloudflare.com           3   9   377    56  &#043;3249us[&#043;1772us] &#043;\/-  106ms<br \/>\n^* 211.68.71.26                  3   8   373    25    -12ms[  -13ms] &#043;\/-   88ms<\/p>\n<p># MS Name\/IP address&#xff1a;<br \/>\n                    \u2460 ^&#xff1a;\u8868\u793a\u8be5\u6e90\u662f NTP \u670d\u52a1\u5668&#xff08;server&#xff09;<br \/>\n                    \u2461 -&#xff1a;\u8868\u793a\u672a\u88ab\u5408\u5e76\u7684\u6e90<br \/>\n                    \u2462 &#043;&#xff1a;\u8868\u793a\u88ab\u5408\u5e76\u5230\u65f6\u95f4\u8ba1\u7b97\u4e2d\u7684\u8f85\u52a9\u6e90<br \/>\n                    \u2463 *&#xff1a;\u8868\u793a\u5f53\u524d\u6b63\u5728\u540c\u6b65\u7684\u4e3b\u65f6\u95f4\u6e90<\/p>\n<p># Stratum&#xff1a;<br \/>\n         NTP \u670d\u52a1\u5668\u7684\u5c42\u7ea7&#xff0c;\u6570\u503c\u8d8a\u5c0f\u8d8a\u63a5\u8fd1\u539f\u5b50\u949f&#xff08;2 \u6bd4 3\u66f4\u7cbe\u786e&#xff09;<\/p>\n<p># Poll&#xff1a;<br \/>\n      \u8f6e\u8be2\u95f4\u9694\u7684\u5bf9\u6570&#xff08;6\u8868\u793a 2^6 &#061; 64 \u79d2&#xff09;<\/p>\n<p># Reach&#xff1a;<br \/>\n       \u53ef\u8fbe\u6027\u5bc4\u5b58\u5668&#xff08;\u516b\u8fdb\u5236&#xff09;&#xff0c;\u8bb0\u5f55\u6700\u8fd1 8 \u6b21\u5c1d\u8bd5\u8fde\u63a5\u7684\u7ed3\u679c&#xff08;377 \u8868\u793a\u8fde\u7eed 8 \u6b21\u6210\u529f&#xff09;<\/p>\n<p># LastRx&#xff1a;<br \/>\n        \u4e0a\u6b21\u6210\u529f\u63a5\u6536\u6570\u636e\u5305\u7684\u65f6\u95f4&#xff08;\u79d2&#xff09;<\/p>\n<p># Last sample&#xff1a;<br \/>\n             \u6700\u540e\u4e00\u6b21\u6d4b\u91cf\u7684\u65f6\u95f4\u504f\u79fb\u91cf&#xff0c;\u683c\u5f0f\u4e3a \u8c03\u6574\u540e\u504f\u79fb [\u539f\u59cb\u6d4b\u91cf\u503c] &#043;\/- \u8bef\u5dee\u4f30\u8ba1<br \/>\n[root&#064;132 ~]# chronyc sources<br \/>\nMS Name\/IP address         Stratum Poll Reach LastRx Last sample<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n^- time.cloudflare.com           3   8   377    18   -398us[ -398us] &#043;\/-  133ms<br \/>\n^* 211.68.71.26                  2   7   377   122  &#043;1913us[&#043;1105us] &#043;\/-  104ms<br \/>\n^- time.cloudflare.com           3   8   377    82    &#043;91ms[  &#043;91ms] &#043;\/-  198ms<br \/>\n^&#043; ntp5.flashdance.cx            2   7   377    85  -5186us[-5186us] &#043;\/-  119ms<\/p>\n<h5>\u2463 \u9664\u5374\u00a0chronyc sources\u00a0\u67e5\u770b\u00a0chrony\u00a0\u5f53\u524d\u65f6\u95f4\u6e90\u72b6\u6001&#xff0c;timedatectl \u540c\u6837\u53ef\u4ee5\u7ba1\u7406\u7cfb\u7edf\u65f6\u95f4\u548c\u65e5\u671f&#xff0c;\u67e5\u770b\u548c\u914d\u7f6e\u7cfb\u7edf\u65f6\u949f\u3001\u65f6\u533a\u4ee5\u53ca NTP \u540c\u6b65\u72b6\u6001<\/h5>\n<p>[root&#064;142 ~]# timedatectl<\/p>\n<p>               Local time: \u4e94 2025-05-23 14:28:07 CST<br \/>\n           Universal time: \u4e94 2025-05-23 06:28:07 UTC<br \/>\n                 RTC time: \u4e94 2025-05-23 06:28:08<br \/>\n                Time zone: Asia\/Shanghai (CST, &#043;0800)<br \/>\nSystem clock synchronized: yes     # NTP \u540c\u6b65\u72b6\u6001<br \/>\n              NTP service: active  # chrony \u6216 ntpd \u662f\u5426\u8fd0\u884c<br \/>\n          RTC in local TZ: no      # RTC \u662f\u5426\u4f7f\u7528\u672c\u5730\u65f6\u533a <\/p>\n<h4 style=\"background-color:transparent\">2.\u5728142\u4e3b\u673a\u4e0a\u5b9e\u73b0 dns \u4ee5\u53ca nfs \u670d\u52a1\u7a0b\u5e8f<\/h4>\n<h5 style=\"background-color:transparent\">DNS<\/h5>\n<h6>\u2460 rpm \u67e5\u770b dns \u670d\u52a1\u7a0b\u5e8f bind<\/h6>\n<p>[root&#064;142 ~]# rpm -qa | grep bind<\/p>\n<h6>\u2461 \u67e5\u770b\u540e\u6ca1\u6709 bind \u7a0b\u5e8f\u5305\u5219\u8fdb\u884c\u4e0b\u8f7d<\/h6>\n<p>[root&#064;142 ~]# mount \/dev\/sr0 \/mnt    # \u78c1\u76d8\u6302\u8f7d<\/p>\n<p>[root&#064;142 ~]# vim \/etc\/yum.repos.d\/base.repo     # \u67e5\u770byum\u6e90\u914d\u7f6e\u662f\u5426\u5b8c\u6574<\/p>\n<p>[root&#064;142 ~]# dnf install bind -y     # \u4e0b\u8f7dbind\u7a0b\u5e8f\u5305<\/p>\n<h6>\u2462 \u8fdb\u5165\u5230 bind \u914d\u7f6e\u6587\u4ef6\u5e76\u7f16\u8f91&#xff0c;\u5176\u6b21\u8fdb\u5165\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u8d44\u6e90\u6587\u4ef6 named.openlab \u4e2d\u8bbe\u7f6e 132 \u4e3b\u673a\u7684 luntan.com<\/h6>\n<p>[root&#064;142 ~]# vim \/etc\/named.conf <\/p>\n<p>zone &#034;luntan.com&#034; IN {<br \/>\n        type master;<br \/>\n        file &#034;named.openlab&#034;;<br \/>\n}; <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"307\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bb71172.png\" width=\"955\" \/><\/p>\n<p>[root&#064;142 ~]# vim \/var\/named\/named.openlab<\/p>\n<p>$TTL 1D<br \/>\n&#064;       IN SOA &#064; rname.invalid. (<br \/>\n                                        1       ; serial<br \/>\n                                        1M      ; refresh<br \/>\n                                        1M      ; retry<br \/>\n                                        1M      ; expire<br \/>\n                                        3M )    ; minimum<br \/>\n        NS      ns.openlab.com.<\/p>\n<p>ns      A       192.168.96.142<\/p>\n<p>www     A       192.168.96.132    ; www.luntan.com   192.168.96.132   web\u670d\u52a1\u5668\u4e3b\u673a<\/p>\n<p>wwww    CNAME   www<\/p>\n<p>ftp     A       192.168.96.222<\/p>\n<p>mail    A       192.168.96.100<\/p>\n<h6>\u2463 \u4fee\u6539\u5b8c\u914d\u7f6e\u6587\u4ef6\u540e\u91cd\u542f\u670d\u52a1\u7a0b\u5e8f<\/h6>\n<p>[root&#064;142 ~]# systemctl restart named<\/p>\n<h6>\u2464 \u5728 132 \u4e3b\u673a\u8fdb\u884c\u6d4b\u8bd5<\/h6>\n<p>[root&#064;132 ~]# dig -t A www.luntan.com &#064;192.168.96.142<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"502\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bb8f63f.png\" width=\"956\" \/><\/p>\n<h5 style=\"background-color:transparent\">NFS<\/h5>\n<h6>\u2460 \u4e0b\u8f7d nfs-utils \u7a0b\u5e8f\u5305<\/h6>\n<p>[root&#064;142 ~]# dnf install nfs-utils -y<\/p>\n<h6>\u2461\u00a0\u8fdb\u5165\u5230 \/etc\/exports \u914d\u7f6e\u6587\u4ef6\u5e76\u7f16\u8f91&#xff0c;\u5176\u6b21\u6839\u636e\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7684\u521b\u5efa\u5bf9\u5e94\u7684\u8d44\u6e90\u6587\u4ef6<\/h6>\n<p>[root&#064;142 ~]# vim \/etc\/exports<br \/>\n\/pub  *(rw,sync)<\/p>\n<p># sync&#xff1a;\u542f\u7528\u540c\u6b65\u5199\u5165\u6a21\u5f0f&#xff1b;NFS \u670d\u52a1\u5728\u5904\u7406\u5ba2\u6237\u7aef\u5199\u5165\u8bf7\u6c42\u65f6&#xff0c;\u4f1a\u5c06\u6570\u636e\u5148\u5199\u5165\u672c\u5730\u78c1\u76d8&#xff0c;\u518d\u8fd4\u56de\u786e\u8ba4\u4fe1\u606f\u7ed9\u5ba2\u6237\u7aef<\/p>\n<p>[root&#064;142 ~]# mkdir \/pub<\/p>\n<h6>\u2462 \u5c06\u00a0Discuz_X3.5_SC_UTF8_20230520 \u6587\u4ef6&#xff08;\u8bba\u575b\u7f51\u7ad9\u5f00\u6e90\u5305\u6587\u4ef6&#xff09;\u4f20\u8f93\u81f3 \/pub \u76ee\u5f55\u4e0b\u5e76\u8fdb\u884c\u89e3\u538b\u64cd\u4f5c<\/h6>\n<p>[root&#064;142 ~]# cd \/pub<\/p>\n<p>[root&#064;142 pub]# <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"181\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bbb6e54.png\" width=\"956\" \/><\/p>\n<p>[root&#064;142 pub]# unzip Discuz_X3.5_SC_UTF8_20230520.zip <\/p>\n<p>[root&#064;142 pub]# ll <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"321\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bbcd48d.png\" width=\"958\" \/><\/p>\n<h6>\u2463 \u91cd\u542f nfs \u670d\u52a1&#xff0c;\u7531\u4e8e nfs \u670d\u52a1\u542f\u52a8\u65f6\u6bcf\u6b21\u90fd\u4f1a\u901a\u8fc7 rpc \u8fdb\u884c\u7aef\u53e3\u6ce8\u518c&#xff0c;\u6240\u4ee5\u4e0d\u5efa\u8bae\u9891\u7e41\u8fdb\u884c\u91cd\u542f\u64cd\u4f5c&#xff0c;\u53ea\u9700\u8981\u8fdb\u884c\u5bfc\u51fa\u64cd\u4f5c\u5373\u53ef<\/h6>\n<p>[root&#064;142 pub]# exportfs -ra<\/p>\n<h6>\u2464 \u5c06\u5f53\u524d\u4e3b\u673a\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u8fdb\u884c\u67e5\u770b&#xff0c;\u4f46\u662f\u6211\u4eec\u524d\u9762\u4e0b\u8f7d\u5b8c\u00a0nfs-utils \u540e\u6ca1\u6709\u542f\u52a8\u670d\u52a1\u7a0b\u5e8f&#xff0c;\u6240\u4ee5\u5148\u542f\u52a8\u00a0nfs-utils &#xff0c;\u5728\u8fdb\u884c\u6302\u8f7d\u7cfb\u7edf\u67e5\u770b<\/h6>\n<p>[root&#064;142 ~]# systemctl restart nfs-server.service<\/p>\n<p>[root&#064;142 ~]# showmount -e 192.168.96.142<br \/>\nExport list for 192.168.96.142:<br \/>\n\/pub *<\/p>\n<h6>\u2465 \u5ba2\u6237\u7aef\u8bbf\u95ee\u670d\u52a1\u7aef\u5171\u4eab\u7cfb\u7edf&#xff0c;\u9700\u8981\u5728\u5ba2\u6237\u7aef\u5efa\u7acb\u4e00\u4e2a\u6302\u8f7d\u70b9\u76ee\u5f55&#xff0c;\u6211\u4eec\u521b\u5efa\u4e3a \/www\u2018\u63a5\u7740\u5c06\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u6302\u8f7d\u5230\u5ba2\u6237\u7aef\u7684 \/www \u4e0b&#xff0c;\u6302\u5728\u540e\u53ef\u67e5\u770b\u670d\u52a1\u7aef\u7684\u5171\u4eab\u6587\u4ef6\u5185\u5bb9<\/h6>\n<p>[root&#064;132 ~]# dnf install nfs-utils -y<\/p>\n<p>[root&#064;132 ~]# mkdir \/www<\/p>\n<p>[root&#064;132 ~]# mount 192.168.96.142:\/pub \/www<\/p>\n<p>[root&#064;132 ~]# ll \/www<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"304\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bbebec2.png\" width=\"991\" \/><\/p>\n<h4 style=\"background-color:transparent\">3.\u5728132\u4e3b\u673a\u4e0a\u5b9e\u73b0 web \u670d\u52a1\u5668<\/h4>\n<h6 style=\"background-color:transparent\">\u2460 \u4e0b\u8f7d nginx \u7a0b\u5e8f\u5305<\/h6>\n<p>[root&#064;132 ~]# dnf install nginx -y<\/p>\n<h6>\u2461 \u901a\u8fc7 nfs \u89e3\u6790\u7f51\u7ad9\u8d44\u6e90\u8def\u5f84\u4e0b\u7684\u754c\u9762\u4fe1\u606f&#xff0c;\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6<\/h6>\n<p>[root&#064;132 ~]# vim \/etc\/nginx\/conf.d\/luntan.conf<\/p>\n<p>server {<br \/>\n        listen 80;<br \/>\n        server_name www.luntan.com;<br \/>\n        root \/www\/upload\/;<\/p>\n<p>        location ~* \\\\.(jpg|jpeg|png|gif|css|js)$ {<br \/>\n                #~* \u5339\u914d\u4e0d\u533a\u5206\u5927\u5c0f\u5199<br \/>\n                expires 30d;  # \u8bbe\u7f6e\u7f13\u5b58\u65f6\u95f4<br \/>\n                access_log off;<br \/>\n        }<\/p>\n<p># php-fpm  \u8fdb\u7a0b\u8c03\u5ea6\u5668<br \/>\n        location  \/ {<\/p>\n<p>        fastcgi_pass   unix:\/run\/php-fpm\/www.sock;<br \/>\n        fastcgi_index  index.php;<br \/>\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br \/>\n        include        fastcgi_params;<\/p>\n<p>        }<br \/>\n} <\/p>\n<h6>\u2462 \u89e3\u6790 php \u6587\u4ef6\u8fd8\u9700\u8981\u4e0b\u8f7d php \u89e3\u6790\u7a0b\u5e8f<\/h6>\n<p>[root&#064;132 ~]# dnf install php* -y<\/p>\n<h6 style=\"background-color:transparent\">\u2463 \u6700\u540e\u5b89\u88c5\u6570\u636e\u5e93\u7a0b\u5e8f\u00a0mariadb-server \u5e76\u542f\u52a8<\/h6>\n<p>[root&#064;132 ~]# dnf install mariadb-server -y<\/p>\n<p>[root&#064;132 ~]# systemctl restart mariadb <\/p>\n<h6>\u2464\u00a0MySQL\/MariaDB \u63d0\u4f9b\u4e00\u4e2a\u5b89\u5168\u914d\u7f6e\u811a\u672c&#xff0c;\u7528\u4e8e\u521d\u59cb\u5316\u6570\u636e\u5e93\u5b89\u5168\u8bbe\u7f6e&#xff1b;\u9664\u4e86\u8981\u8bbe\u7f6e\u5bc6\u7801\u4ee5\u5916&#xff0c;\u5176\u4f59\u7686\u53ef\u56de\u8f66<\/h6>\n<p>[root&#064;132 ~]# mysql_secure_installation <\/p>\n<h6>\u2465 \u5b8c\u6210\u4e4b\u540e\u767b\u5f55\u6570\u636e\u5e93\u5e76\u521b\u5efa luntan \u7684\u6570\u636e\u5e93&#xff0c;\u521b\u5efa\u5b8c\u6210\u540e exit \u9000\u51fa\u6570\u636e\u5e93\u5373\u53ef<\/h6>\n<p>[root&#064;132 ~]# mysql -uroot -p<\/p>\n<p>Enter password:<br \/>\nWelcome to the MariaDB monitor.  Commands end with ; or \\\\g.<br \/>\nYour MariaDB connection id is 13<br \/>\nServer version: 10.5.22-MariaDB MariaDB Server<\/p>\n<p>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<\/p>\n<p>Type &#039;help;&#039; or &#039;\\\\h&#039; for help. Type &#039;\\\\c&#039; to clear the current input statement.<\/p>\n<p>MariaDB [(none)]&gt; create database luntan;<br \/>\nQuery OK, 1 row affected (0.000 sec)<\/p>\n<p>MariaDB [(none)]&gt; exit;<br \/>\nBye<\/p>\n<h6 style=\"background-color:transparent\">\u2466\u00a0\u540c\u65f6\u542f\u7528\u5e76\u7acb\u5373\u542f\u52a8\u4e09\u4e2a\u670d\u52a1&#xff1a;Nginx&#xff08;Web \u670d\u52a1\u5668&#xff09;\u3001MariaDB&#xff08;\u6570\u636e\u5e93&#xff09;\u548c PHP-FPM&#xff08;PHP \u5904\u7406\u5f15\u64ce&#xff09;<\/h6>\n<p>[root&#064;132 ~]# systemctl enable nginx mariadb php-fpm &#8211;now<\/p>\n<h5 style=\"background-color:transparent\">\u2160.\u5728 Windows \u4e0b\u6d4b\u8bd5 luntan<\/h5>\n<h6 style=\"background-color:transparent\">\u2460 \u5728 Windows \u7cfb\u7edf\u4e0b\u767b\u5f55\u6d4f\u89c8\u5668&#xff0c;\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165 linux \u7cfb\u7edf\u4e2d\u7684132\u4e3b\u673a IP \u5730\u5740\u8fdb\u5165\u5230\u00a0 Discuz! \u5b89\u88c5\u5411\u5bfc&#xff08;\u7531\u4e8e\u5728\u52a8\u6001\u7f51\u7ad9 LNMP \u6587\u7ae0\u4e2d\u6709\u5b8c\u6574\u7684\u5b89\u88c5\u8fc7\u7a0b&#xff0c;\u8fd9\u91cc\u7701\u7565\u5b89\u88c5\u8fc7\u7a0b&#xff09;<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"431\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012620-683514bc14f15.png\" width=\"885\" \/><\/p>\n<p>\u8fdb\u5165\u5230\u5b89\u88c5\u5411\u5bfc\u540e\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u6587\u4ef6\u7f3a\u5931\u4ee5\u53ca\u6743\u9650\u4e0d\u591f\u7684\u95ee\u9898&#xff0c;\u6211\u4eec\u8fd4\u56de\u5230 linux \u4e2d\u89e3\u51b3\u8fd9\u4e24\u4e2a\u95ee\u9898\u3002\u6ce8\u610f\u8fd9\u91cc\u7684\u6587\u4ef6\u662f\u5728\u670d\u52a1\u7aef&#xff08;142\u4e3b\u673a&#xff09;\u7684\u5171\u4eab\u6587\u4ef6\u4e2d&#xff0c;\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5728\u670d\u52a1\u7aef&#xff08;142\u4e3b\u673a&#xff09;\u4fee\u6539\u6743\u9650\u7b49\u95ee\u9898&#xff01;<\/p>\n<p>[root&#064;142 ~]# cd \/pub\/upload\/   # \u5c06\u8def\u5f84\u5207\u6362\u5230upload\u4e0b<\/p>\n<p>[root&#064;142 upload]# ll    # \u67e5\u770bupload\u4e0b\u6587\u4ef6\u540d<\/p>\n<p>[root&#064;142 upload]# chmod 777 config data uc_* -R    # \u4fee\u6539\u76ee\u5f55\u4ee5\u53ca\u8be5\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u7684\u6743\u9650&#xff0c;\u4ee5\u9012\u5f52\u7684\u65b9\u5f0f<\/p>\n<p>\u4fee\u6539\u5b8c\u6210\u540e\u8fd4\u56de\u5230 Windows \u4e0b\u5237\u65b0\u9875\u9762\u5373\u53ef\u5b8c\u6210\u68c0\u67e5\u5b89\u88c5\u73af\u5883<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"755\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012620-683514bc38a2e.png\" width=\"899\" \/><\/p>\n<h6>\u2461 \u5b89\u88c5\u5b8c\u6210\u540e\u70b9\u51fb\u76f4\u63a5\u8bbf\u95ee\u7ad9\u70b9\u5373\u53ef\u8fdb\u5165\u8bba\u575b<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"635\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012620-683514bc742ef.png\" width=\"1919\" \/><\/p>\n<h5>\u2161.\u5728 Linux \u4e0b\u6d4b\u8bd5 luntan<\/h5>\n<h6>\u2460 \u5728132\u4e3b\u673a\u5ba2\u6237\u7aef\u4fee\u6539 dns IP \u5730\u5740\u4e3a142\u4e3b\u673a<\/h6>\n<p>[root&#064;132 ~]# vim \/etc\/resolv.conf <\/p>\n<p># Generated by NetworkManager<br \/>\nsearch localdomain<br \/>\nnameserver 192.168.96.142<\/p>\n<h6>\u2461 \u8fdb\u5165\u5230\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165 www.luntan.com \u57df\u540d\u5373\u53ef\u6210\u529f\u8fdb\u5165\u5230\u6211\u4eec\u7684\u8bba\u575b\u754c\u9762&#xff0c;\u8fd9\u4e00\u6b65\u8bc1\u660e\u6211\u4eec\u5728142\u4e3b\u673a\u914d\u7f6e\u7684 dns \u89e3\u6790\u6ca1\u6709\u95ee\u9898&#xff01;<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"871\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012620-683514bce0c86.png\" width=\"1593\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb900\u6b21\uff0c\u70b9\u8d5e13\u6b21\uff0c\u6536\u85cf17\u6b21\u3002~* \u5339\u914d\u4e0d\u533a\u5206\u5927\u5c0f\u5199# \u8bbe\u7f6e\u7f13\u5b58\u65f6\u95f4# php-fpm \u8fdb\u7a0b\u8c03\u5ea6\u5668\u3002<\/p>\n","protected":false},"author":2,"featured_media":40055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[705,43,44],"topic":[],"class_list":["post-40064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-rhce","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c - \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\/40064.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb900\u6b21\uff0c\u70b9\u8d5e13\u6b21\uff0c\u6536\u85cf17\u6b21\u3002~* \u5339\u914d\u4e0d\u533a\u5206\u5927\u5c0f\u5199# \u8bbe\u7f6e\u7f13\u5b58\u65f6\u95f4# php-fpm \u8fdb\u7a0b\u8c03\u5ea6\u5668\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/40064.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-27T01:26:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bb71172.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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/40064.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/40064.html\",\"name\":\"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-27T01:26:22+00:00\",\"dateModified\":\"2025-05-27T01:26:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/40064.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/40064.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/40064.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c\"}]},{\"@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":"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c - \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\/40064.html","og_locale":"zh_CN","og_type":"article","og_title":"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb900\u6b21\uff0c\u70b9\u8d5e13\u6b21\uff0c\u6536\u85cf17\u6b21\u3002~* \u5339\u914d\u4e0d\u533a\u5206\u5927\u5c0f\u5199# \u8bbe\u7f6e\u7f13\u5b58\u65f6\u95f4# php-fpm \u8fdb\u7a0b\u8c03\u5ea6\u5668\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/40064.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-27T01:26:22+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250527012619-683514bb71172.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/40064.html","url":"https:\/\/www.wsisp.com\/helps\/40064.html","name":"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-27T01:26:22+00:00","dateModified":"2025-05-27T01:26:22+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/40064.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/40064.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/40064.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Web \u670d\u52a1\u3001 Nfs \u670d\u52a1\u5668\u4ee5\u53ca Dns \u670d\u52a1\u5668\u7efc\u5408\u5b9e\u9a8c"}]},{"@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\/40064","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=40064"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/40064\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/40055"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=40064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=40064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=40064"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=40064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}