{"id":15860,"date":"2025-04-18T22:19:23","date_gmt":"2025-04-18T14:19:23","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/15860.html"},"modified":"2025-04-18T22:19:23","modified_gmt":"2025-04-18T14:19:23","slug":"%e8%87%aa%e5%8a%a8%e5%8c%96%e5%a4%87%e4%bb%bd%e5%85%a8%e7%bd%91%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%95%b0%e6%8d%ae%e5%b9%b3%e5%8f%b0-6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/15860.html","title":{"rendered":"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0"},"content":{"rendered":"<h2 style=\"background-color:transparent\">1.\u9879\u76ee\u8bf4\u660e<\/h2>\n<h3>1.1\u6982\u8ff0<\/h3>\n<p>\u8be5\u9879\u76ee\u5171\u5206\u4e3a2\u4e2a\u5b50\u9879\u76ee&#xff0c;\u7531\u73af\u5883\u642d\u5efa\u548c\u5b9e\u65bd\u5907\u4efd\u4e24\u90e8\u5206\u7ec4\u6210<\/p>\n<p>\u8be5\u9879\u76ee\u65e8\u5728\u590d\u4e60\u5de9\u56fa\u7cfb\u7edf\u670d\u52a1\u90e8\u7f72\u4f7f\u7528\u3001shell\u7f16\u7a0b\u7b49\u77e5\u8bc6&#xff0c;\u65e8\u5728\u8ba9\u5b66\u751f\u589e\u52a0\u77e5\u8bc6\u9762&#xff0c;\u63d0\u9ad8\u9879\u76ee\u5b9e\u4e60\u7ecf\u5386&#xff0c;\u5145\u5b9e\u7b80\u5386<\/p>\n<p>\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0\u662f\u4e00\u79cd\u57fa\u4e8e\u9884\u8bbe\u7b56\u7565&#xff0c;\u81ea\u52a8\u5c06\u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u590d\u5236\u5230\u5176\u4ed6\u5b58\u50a8\u8bbe\u5907\u6216\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6280\u672f\u3002\u5b83\u901a\u8fc7\u81ea\u52a8\u6267\u884c\u5907\u4efd\u4efb\u52a1&#xff0c;\u51cf\u5c11\u4eba\u4e3a\u5e72\u9884&#xff0c;\u964d\u4f4e\u56e0\u4eba\u4e3a\u9519\u8bef\u5bfc\u81f4\u7684\u6570\u636e\u4e22\u5931\u98ce\u9669<\/p>\n<p>\u529f\u80fd\u7279\u70b9<\/p>\n<p>\u81ea\u52a8\u5316\u6267\u884c&#xff1a;\u6839\u636e\u9884\u8bbe\u7684\u65f6\u95f4\u3001\u5468\u671f\u81ea\u52a8\u6267\u884c\u5907\u4efd\u4efb\u52a1&#xff0c;\u65e0\u9700\u4eba\u5de5\u5e72\u9884\u3002<\/p>\n<p>\u591a\u79cd\u5907\u4efd\u65b9\u5f0f&#xff1a;\u652f\u6301\u5168\u91cf\u5907\u4efd\u3001\u589e\u91cf\u5907\u4efd\u3001\u5dee\u5f02\u5907\u4efd\u7b49\u591a\u79cd\u5907\u4efd\u65b9\u5f0f&#xff0c;\u6ee1\u8db3\u4e0d\u540c\u573a\u666f\u4e0b\u7684\u5907\u4efd\u9700\u6c42\u3002<\/p>\n<p>\u6570\u636e\u538b\u7f29\u4e0e\u52a0\u5bc6&#xff1a;\u5907\u4efd\u524d\u5bf9\u6570\u636e\u8fdb\u884c\u538b\u7f29&#xff0c;\u8282\u7701\u5b58\u50a8\u7a7a\u95f4&#xff1b;\u540c\u65f6\u8fdb\u884c\u52a0\u5bc6\u5904\u7406&#xff0c;\u9632\u6b62\u672a\u7ecf\u6388\u6743\u7684\u8bbf\u95ee\u3002<\/p>\n<p>\u7075\u6d3b\u7684\u5b58\u50a8\u9009\u9879&#xff1a;\u652f\u6301\u672c\u5730\u786c\u76d8\u3001\u7f51\u7edc\u5b58\u50a8\u8bbe\u5907\u3001\u4e91\u5b58\u50a8\u7b49\u591a\u79cd\u5b58\u50a8\u4f4d\u7f6e\u3002<\/p>\n<p>\u76d1\u63a7\u4e0e\u62a5\u8b66&#xff1a;\u5b9e\u65f6\u76d1\u63a7\u5907\u4efd\u4efb\u52a1\u7684\u6267\u884c\u60c5\u51b5&#xff0c;\u53d1\u73b0\u5f02\u5e38\u53ca\u65f6\u62a5\u8b66\u3002<\/p>\n<p>\u6062\u590d\u529f\u80fd&#xff1a;\u63d0\u4f9b\u4fbf\u6377\u7684\u6570\u636e\u6062\u590d\u529f\u80fd&#xff0c;\u4ee5\u4fbf\u5728\u6570\u636e\u4e22\u5931\u6216\u635f\u574f\u65f6\u5feb\u901f\u6062\u590d\u3002<\/p>\n<p>\u4f18\u52bf<\/p>\n<p>\u63d0\u9ad8\u6570\u636e\u5b89\u5168\u6027&#xff1a;\u901a\u8fc7\u52a0\u5bc6\u548c\u538b\u7f29\u7b49\u6280\u672f&#xff0c;\u786e\u4fdd\u6570\u636e\u5728\u4f20\u8f93\u548c\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u7684\u5b89\u5168\u6027\u3002<\/p>\n<p>\u964d\u4f4e\u8fd0\u8425\u6210\u672c&#xff1a;\u51cf\u5c11\u4eba\u5de5\u5e72\u9884&#xff0c;\u63d0\u9ad8\u5907\u4efd\u6548\u7387&#xff0c;\u964d\u4f4e\u8fd0\u7ef4\u6210\u672c\u3002<\/p>\n<p>\u63d0\u5347\u4e1a\u52a1\u8fde\u7eed\u6027&#xff1a;\u5728\u6570\u636e\u4e22\u5931\u6216\u707e\u96be\u53d1\u751f\u65f6&#xff0c;\u80fd\u591f\u5feb\u901f\u6062\u590d\u6570\u636e&#xff0c;\u51cf\u5c11\u4e1a\u52a1\u4e2d\u65ad\u65f6\u95f4\u3002<\/p>\n<p>\u4f18\u5316\u5b58\u50a8\u8d44\u6e90&#xff1a;\u901a\u8fc7\u589e\u91cf\u5907\u4efd\u7b49\u65b9\u5f0f&#xff0c;\u51cf\u5c11\u5b58\u50a8\u7a7a\u95f4\u7684\u5360\u7528\u3002<\/p>\n<p>\u5e94\u7528\u573a\u666f<\/p>\n<p>\u4f01\u4e1a\u6570\u636e\u4fdd\u62a4&#xff1a;\u9002\u7528\u4e8e\u91d1\u878d\u3001\u533b\u7597\u3001\u6559\u80b2\u7b49\u5bf9\u6570\u636e\u5b89\u5168\u8981\u6c42\u8f83\u9ad8\u7684\u884c\u4e1a\u3002<\/p>\n<p>\u4e91\u73af\u5883\u5907\u4efd&#xff1a;\u652f\u6301\u4e91\u5b58\u50a8\u670d\u52a1\u7684\u5907\u4efd&#xff0c;\u6ee1\u8db3\u4f01\u4e1a\u6570\u5b57\u5316\u8f6c\u578b\u4e2d\u7684\u6570\u636e\u7ba1\u7406\u9700\u6c42\u3002<\/p>\n<p>\u591a\u5e73\u53f0\u652f\u6301&#xff1a;\u80fd\u591f\u517c\u5bb9\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b58\u50a8\u8bbe\u5907\u3002<\/p>\n<h2>2.\u9879\u76ee\u80cc\u666f\u77e5\u8bc6<\/h2>\n<h3>2.1\u603b\u4f53\u9700\u6c42<\/h3>\n<p>\u67d0\u4f01\u4e1a\u91cc\u6709\u4e00\u53f0Web\u670d\u52a1\u5668&#xff0c;\u91cc\u9762\u7684\u6570\u636e\u5f88\u91cd\u8981&#xff0c;\u4f46\u662f\u5982\u679c\u786c\u76d8\u574f\u4e86\u6570\u636e\u5c31\u4f1a\u4e22\u5931&#xff0c;\u73b0\u5728\u9886\u5bfc\u8981\u6c42\u628a\u6570\u636e\u505a\u5907\u4efd&#xff0c;\u8fd9\u6837Web\u670d\u52a1\u5668\u6570\u636e\u4e22\u5931\u5728\u53ef\u4ee5\u8fdb\u884c\u6062\u590d<\/p>\n<p>\u8981\u6c42\u5982\u4e0b&#xff1a;<\/p>\n<p>1.\u6bcf\u592900\u70b9\u6574\u5728Web\u670d\u52a1\u5668\u4e0a\u6309\u65e5\u671f\u6253\u5305\u5907\u4efd\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u3001\u7f51\u7ad9\u7a0b\u5e8f\u76ee\u5f55\u53ca\u8bbf\u95ee\u65e5\u5fd7\u6587\u4ef6<\/p>\n<p>2.\u901a\u8fc7rsync\u547d\u4ee4\u63a8\u9001\u5230\u5907\u4efd\u670d\u52a1\u5668\u4e0a\u4fdd\u5b58<\/p>\n<p>3.\u5907\u4efd\u670d\u52a1\u5668\u5b9a\u65f6\u6e05\u9664\u65e7\u8bb0\u5f55<\/p>\n<p>4.\u642d\u5efa\u90ae\u4ef6\u544a\u8b66\u5e73\u53f0<\/p>\n<h3>2.2\u5907\u4efd\u9700\u6c42<\/h3>\n<h4>\u6240\u6709\u670d\u52a1\u5668\u7684\u5907\u4efd\u76ee\u5f55\u5fc5\u987b\u90fd\u4e3a\/backup\u3002<\/h4>\n<p>\u8981\u5907\u4efd\u7684\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e&#xff1a;<\/p>\n<p>1.\u5b9a\u65f6\u4efb\u52a1\u670d\u52a1\u7684\u914d\u7f6e\u6587\u4ef6&#xff08;\/var\/spool\/cron\/root&#xff09; &#xff08;\u9002\u5408Web\u548cNFS\u670d\u52a1\u5668&#xff09;\u3002<\/p>\n<p>2.\u5f00\u673a\u81ea\u542f\u52a8\u7684\u914d\u7f6e\u6587\u4ef6&#xff08;\/etc\/rc.local&#xff09; &#xff08;\u9002\u5408Web\u548cNFS\u670d\u52a1\u5668&#xff09;\u3002<\/p>\n<p>3.\u65e5\u5e38\u811a\u672c\u7684\u76ee\u5f55 &#xff08;\/server\/scripts&#xff09;\u3002<\/p>\n<h4>Web\u670d\u52a1\u5668\u8981\u6c42:<\/h4>\n<p>1.\u4fdd\u7559\u6700\u8fd17\u5929\u6240\u6709\u5907\u4efd\u6570\u636e&#xff0c;\u4fdd\u75596\u4e2a\u6708\u5185\u6bcf\u5468\u4e00\u7684\u6240\u6709\u6570\u636e\u526f\u672c\u3002<\/p>\n<p>2\u8981\u6309\u7167\u5907\u4efd\u6570\u636e\u670d\u52a1\u5668\u5185\u7f51IP\u4e3a\u76ee\u5f55\u540d\u79f0&#xff0c;\u5907\u4efd\u7684\u6587\u4ef6\u6309\u7167\u65f6\u95f4\u3001\u540d\u79f0\u4e3a\u6587\u4ef6\u540d\u79f0\u3002<\/p>\n<p>3.\u9700\u8981\u786e\u4fdd\u5907\u4efd\u7684\u6570\u636e\u5c3d\u91cf\u5b8c\u6574\u51c6\u786e&#xff0c;\u5728\u5907\u4efd\u670d\u52a1\u5668\u4e0a\u5bf9\u5907\u4efd\u7684\u6570\u636e\u662f\u5426\u5b8c\u6574\u8fdb\u884c\u68c0\u67e5\u3002<\/p>\n<p>4.\u5907\u4efd\u670d\u52a1\u5668\u6bcf\u5929\u65e9\u66688:00\u628a\u5907\u4efd\u6210\u529f\u6216\u5931\u8d25\u7ed3\u679c\u4fe1\u606f\u53d1\u9001\u5230\u7cfb\u7edf\u7ba1\u7406\u5458\u90ae\u7bb1\u91cc\u3002<\/p>\n<table>\n<tr>\u670d\u52a1\u5668\u8bf4\u660e\u5907\u4efd\u76ee\u5f55\u76ee\u5f55\u8bf4\u660e\u5907\u6ce8<\/tr>\n<tbody>\n<tr>\n<td>all server<\/td>\n<td>\/backup<\/td>\n<td>\u5907\u4efd\u76ee\u5f55<\/td>\n<td>\u7edf\u4e00\u670d\u52a1\u5668\u672c\u5730\u5907\u4efd\u76ee\u5f55&#xff0c;\u4fbf\u4e8e\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td>all server<\/td>\n<td>\/var\/spool\/cron\/root<\/td>\n<td>\u5b9a\u65f6\u4efb\u52a1\u670d\u52a1\u914d\u7f6e\u6587\u4ef6<\/td>\n<td>\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>all server<\/td>\n<td>\/etc\/rc.local<\/td>\n<td>\u5f00\u673a\u81ea\u542f\u52a8\u914d\u7f6e\u6587\u4ef6<\/td>\n<td>\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>all server<\/td>\n<td>\/server\/scripts<\/td>\n<td>\u65e5\u5e38\u811a\u672c\u76ee\u5f55<\/td>\n<td>\u7edf\u4e00\u670d\u52a1\u5668\u672c\u5730\u811a\u672c\u76ee\u5f55&#xff0c;\u4fbf\u4e8e\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td>Web server<\/td>\n<td>\/var\/www\/html<\/td>\n<td>web\u670d\u52a1\u5668\u7ad9\u70b9\u76ee\u5f55<\/td>\n<td>mkdir -p \/var\/www\/html<\/td>\n<\/tr>\n<tr>\n<td>Web server<\/td>\n<td>\/app\/logs<\/td>\n<td>web\u670d\u52a1\u5668\u8bbf\u95ee\u65e5\u5fd7\u8def\u5f84<\/td>\n<td>mkdir -p \/app\/logs<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>3.Rsync\u6982\u8ff0<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"668\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141918-68025f66510b7.png\" width=\"927\" \/><\/p>\n<h3>3.1\u4f5c\u7528<\/h3>\n<p>rsync&#xff1a;remote sync(\u8fdc\u7a0b\u540c\u6b65)&#xff0c;\u662f\u4e00\u4e2a\u5728 Linux \u548c\u5176\u4ed6 Unix-like \u7cfb\u7edf\u4e0a\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u547d\u4ee4\u884c\u5de5\u5177&#xff0c;\u7528\u4e8e\u8ba1\u7b97\u673a\u4e4b\u95f4\u8fdb\u884c\u6570\u636e\u540c\u6b65&#xff0c;\u53ef\u4ee5\u5f53\u505a\u6587\u4ef6\u590d\u5236\u5de5\u5177&#xff0c;\u66ff\u4ee3cp\u548cmv\u547d\u4ee4&#xff0c;\u4e3b\u9875&#xff1a;https:\/\/rsync.samba.org\/<\/p>\n<h3>3.2\u7279\u70b9<\/h3>\n<p>\u540c\u6b65\u901f\u5ea6\u5feb&#xff1a;\u7531\u4e8e\u4f7f\u7528sync\u7b97\u6cd5&#xff0c;\u5176\u53ea\u4f20\u9001\u4e24\u4e2a\u6587\u4ef6\u7684\u4e0d\u540c\u90e8\u5206&#xff0c;\u800c\u4e0d\u662f\u6bcf\u6b21\u90fd\u6574\u4efd\u4f20\u9001&#xff0c;\u56e0\u6b64\u901f\u5ea6\u76f8\u5f53\u5feb\u3002<\/p>\n<p>\u53ef\u4ee5\u955c\u50cf\u4fdd\u5b58\u6574\u4e2a\u76ee\u5f55\u6811\u548c\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>\u53ef\u4ee5\u5f88\u5bb9\u6613\u505a\u5230\u4fdd\u6301\u539f\u6765\u6587\u4ef6\u7684\u6743\u9650\u3001\u65f6\u95f4\u3001\u8f6f\u786c\u94fe\u63a5\u7b49<\/p>\n<p>\u65e0\u987b\u7279\u6b8a\u6743\u9650\u5373\u53ef\u5b89\u88c5<\/p>\n<p>\u4f18\u5316\u7684\u6d41\u7a0b&#xff0c;\u6587\u4ef6\u4f20\u8f93\u6548\u7387\u9ad8<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528rsh\u3001ssh\u7b49\u65b9\u5f0f\u6765\u4f20\u8f93\u6587\u4ef6&#xff0c;\u5f53\u7136\u4e5f\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u7684socket\u8fde\u63a5<\/p>\n<p>\u652f\u6301\u533f\u540d\u4f20\u8f93\u3002<\/p>\n<h3>3.3\u8bed\u6cd5<\/h3>\n<p>\u6807\u51c6\u7ed3\u6784&#xff1a;<\/p>\n<p>rsync [\u9009\u9879] \u6e90\u76ee\u5f55\/\u6587\u4ef6 \u76ee\u6807\u76ee\u5f55\/\u6587\u4ef6<\/p>\n<p>-a, &#8211;archive&#xff1a;\u5f52\u6863\u6a21\u5f0f&#xff0c;\u4fdd\u7559\u6240\u6709\u6587\u4ef6\u5c5e\u6027\u3002 -v, &#8211;verbose&#xff1a;\u8be6\u7ec6\u8f93\u51fa\u3002 -r, &#8211;recursive&#xff1a;\u9012\u5f52\u5730\u540c\u6b65\u76ee\u5f55\u3002 -z, &#8211;compress&#xff1a;\u4f7f\u7528\u538b\u7f29\u4f20\u8f93\u6570\u636e&#xff0c;\u53ef\u4ee5\u51cf\u5c11\u7f51\u7edc\u5e26\u5bbd\u3002 -e, &#8211;rsh&#061;COMMAND&#xff1a;\u6307\u5b9a\u8fdc\u7a0b shell \u7a0b\u5e8f&#xff08;\u4f8b\u5982 SSH&#xff09;\u3002 &#8211;delete&#xff1a;\u5220\u9664\u76ee\u6807\u4e2d\u4e0d\u5728\u6e90\u4e2d\u7684\u6587\u4ef6\u3002 &#8211;exclude&#061;PATTERN&#xff1a;\u6392\u9664\u7b26\u5408\u6307\u5b9a\u6a21\u5f0f\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u3002<\/p>\n<p>\u672c\u5730\u540c\u6b65&#xff1a;<\/p>\n<p>rsync -a source destination<\/p>\n<p># -a\u5305\u542b-r\u7684\u9012\u5f52\u529f\u80fd\u540c\u65f6\u53ef\u4ee5\u540c\u6b65\u4fee\u6539\u65f6\u95f4\u3001\u6743\u9650\u7b49\u5143\u4fe1\u606f&#xff0c;\u5e38\u7528<\/p>\n<p>\u8fdc\u7a0b\u540c\u6b65&#xff1a;<\/p>\n<p># \u9ed8\u8ba4\u4f7f\u7528ssh\u534f\u8bae\u4f20\u8f93<\/p>\n<p>rsync \u00a0-av \u00a0source\/ \u00a0username&#064;remote_host:destination # \u672c\u5730\u5185\u5bb9\u540c\u6b65\u5230\u8fdc\u7a0b\u5373\u63a8\u9001<\/p>\n<p>rsync \u00a0-av \u00a0username&#064;remote_host:source\/ \u00a0destination # \u8fdc\u7a0b\u5185\u5bb9\u540c\u6b65\u5230\u672c\u5730\u5373\u62c9\u53d6<\/p>\n<p># \u82e5\u4e24\u7aef\u90fd\u6709rsync\u8fdb\u7a0b&#xff0c;\u53ef\u4ee5\u4f7f\u7528rsync\u534f\u8bae\u4f20\u8f93 rsync \u00a0-av \u00a0source\/ \u00a0192.168.122.32::module\/destination \u00a0 \u00a0 \u00a0# \u67092\u4e2a\u5192\u53f7<\/p>\n<p>\u589e\u91cf\u5907\u4efd&#xff1a;<\/p>\n<p># \u53ea\u590d\u5236\u53d8\u52a8\u7684\u5185\u5bb9<\/p>\n<p>rsync \u00a0-a \u00a0&#8211;delete \u00a0&#8211;link-dest \u00a0\/compare\/path \u00a0\/source\/path \u00a0\/target\/path<\/p>\n<p># \u5206\u6790 \u00a0\u00a0 \u00a0# &#8211;link-dest\u53c2\u6570\u6307\u5b9a\u57fa\u51c6\u76ee\u5f55\/compare\/path \u00a0\u00a0 \u00a0# \u6e90\u76ee\u5f55\/source\/path\u8ddf\u57fa\u51c6\u76ee\u5f55\u8fdb\u884c\u6bd4\u8f83 \u00a0\u00a0 \u00a0# \u4e4b\u540e\u627e\u51fa\u53d8\u52a8\u7684\u6587\u4ef6&#xff0c;\u5c06\u5176\u62f7\u8d1d\u5230\u76ee\u6807\u76ee\u5f55\/target\/path&#xff0c;\u672a\u53d8\u52a8\u7684\u6587\u4ef6\u4f1a\u751f\u6210\u786c\u94fe\u63a5\u3002 \u00a0\u00a0 \u00a0# \u8be5\u547d\u4ee4\u7684\u7b2c\u4e00\u6b21\u5907\u4efd\u65f6\u4e3a\u5168\u91cf\u5907\u4efd&#xff0c;\u4e4b\u540e\u4e3a\u589e\u91cf\u5907\u4efd<\/p>\n<h2>4.\u9879\u76ee\u73af\u5883<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"890\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141918-68025f669777f.png\" width=\"1359\" \/><\/p>\n<\/p>\n<h3>4.1\u8f6f\u786c\u4ef6\u73af\u5883\u6e05\u5355&#xff1a;<\/h3>\n<p>\u5df2\u77e53\u53f0\u670d\u52a1\u5668\u4e3b\u673a\u540d\u5206\u522b\u4e3aweb01\u3001backup\u3001nfs01&#xff0c;\u4e3b\u673a\u4fe1\u606f\u5efa\u4e0b\u8868\u3002<\/p>\n<table>\n<tr>\u4e3b\u673a\u540dIP\u5730\u5740\u786c\u4ef6\u8f6f\u4ef6<\/tr>\n<tbody>\n<tr>\n<td>server<\/td>\n<td>192.168.1.200<\/td>\n<td>cpu:1\u98972\u6838 \u5185 \u5b58&#xff1a;2GB HDD&#xff1a;20GB \u7f51 \u7edc&#xff1a;NAT<\/td>\n<td>VmWare17 Centos7.9 nginx1.20 rsync3.1.2<\/td>\n<\/tr>\n<tr>\n<td>nfs01<\/td>\n<td>192.168.1.201<\/td>\n<td>cpu:1\u98972\u6838 \u5185 \u5b58&#xff1a;2GB HDD&#xff1a;20GB \u7f51 \u7edc&#xff1a;NAT<\/td>\n<td>VmWare17 Centos7.9 nfs rpcbind rsync3.1.2<\/td>\n<\/tr>\n<tr>\n<td>backup<\/td>\n<td>192.168.1.202<\/td>\n<td>cpu:1\u98972\u6838 \u5185 \u5b58&#xff1a;2GB HDD&#xff1a;20GB \u7f51 \u7edc&#xff1a;NAT<\/td>\n<td>VmWare17 Centos7.9 mailx12.5 rsync3.1.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Centos7.9\u7684iso\u4e0b\u8f7d\u94fe\u63a5&#xff1a;https:\/\/mirrors.aliyun.com\/centos\/7.9.2009\/isos\/x86_64\/CentOS-7-x86_64-DVD-2207-02.iso<\/p>\n<h2>5.\u4efb\u52a1\u6e05\u5355<\/h2>\n<h3>5.1\u9879\u76ee\u73af\u5883\u642d\u5efa<\/h3>\n<p>\u53ef\u4ee5\u4f7f\u7528iventoy\u7f51\u542f\u5b89\u88c53\u53f0centos7.9\u670d\u52a1\u5668<\/p>\n<p>\u6309\u7167\u89c4\u5212&#xff0c;\u6700\u5c0f\u5316\u90e8\u7f72\u7cfb\u7edf&#xff0c;\u5173\u95ed\u9632\u706b\u5899&#xff0c;\u7981\u7528SELinux&#xff0c;\u786e\u4fdd\u80fd\u591f\u8054\u7f51\u3002<\/p>\n<h3>5.2\u670d\u52a1\u5668\u90e8\u7f72<\/h3>\n<h4>5.2.1Web\u670d\u52a1\u5668\u642d\u5efa\u90e8\u7f72<\/h4>\n<p>\u9a8c\u8bc1Rsync\u670d\u52a1\u80fd\u5426\u63a8\u9001\u6210\u529f\u3002<\/p>\n<p>\u5f00\u53d1\u811a\u672c\u5b9e\u73b0\u6253\u5305\u5907\u4efd\u3001\u63a8\u9001\u3001\u6821\u9a8c\u3001\u5220\u9664\u3002<\/p>\n<p>\u914d\u7f6e\u5b9a\u65f6\u4efb\u52a1\u6bcf\u59290\u70b9\u5b9a\u65f6\u63a8\u9001&#xff08;0\u65f6\u662f\u65f6\u95f4\u7684\u4e00\u4e2a\u5206\u5272\u70b9&#xff09;\u3002<\/p>\n<h4>5.2.2NFS\u670d\u52a1\u5668\u642d\u5efa\u90e8\u7f72<\/h4>\n<p>\u9a8c\u8bc1Rsync\u670d\u52a1\u80fd\u5426\u63a8\u9001\u6210\u529f\u3002<\/p>\n<p>\u5f00\u53d1\u811a\u672c\u5b9e\u73b0\u6253\u5305\u5907\u4efd\u3001\u63a8\u9001\u3001\u6821\u9a8c\u3001\u5220\u9664\u3002<\/p>\n<p>\u914d\u7f6e\u5b9a\u65f6\u4efb\u52a1\u6bcf\u59290\u70b9\u5b9a\u65f6\u63a8\u9001&#xff08;0\u65f6\u662f\u65f6\u95f4\u7684\u4e00\u4e2a\u5206\u9694\u70b9&#xff09;\u3002<\/p>\n<p>\u914d\u7f6e\u811a\u672c\u548cweb\u670d\u52a1\u5668\u7c7b\u4f3c&#xff0c;\u8fc7\u7a0b\u7565\u3002<\/p>\n<h4>5.2.3\u642d\u5efa\u5907\u4efd\u670d\u52a1\u5668<\/h4>\n<p>rsync\u670d\u52a1\u5668\u642d\u5efa\u90e8\u7f72\u3002<\/p>\n<p>\u5f00\u53d1\u811a\u672c\u5b9e\u73b0\u6821\u9a8c\u3001\u5220\u9664\u3001\u62a5\u8b66\u3002<\/p>\n<p>\u914d\u7f6e\u5b9e\u65f6\u4efb\u52a1\u6bcf\u59296\u70b9\u5b9e\u65f6\u6267\u884c\u3002<\/p>\n<p>\u914d\u7f6e\u544a\u8b66\u90ae\u4ef6\u53d1\u9001\u5e73\u53f0<\/p>\n<h2>6.\u5b9e\u65bd\u6b65\u9aa4<\/h2>\n<h3>6.1\u73af\u5883\u642d\u5efa<\/h3>\n<h4 style=\"background-color:transparent\">6.1.1server\u670d\u52a1\u5668\u73af\u5883\u642d\u5efa<\/h4>\n<p>\u5b89\u88c5Centos7.9\u7cfb\u7edf&#xff0c;\u66ff\u6362yum\u6e90&#xff0c;\u8fde\u63a5xshell&#xff0c;\u8fc7\u7a0b\u7565<\/p>\n<p>\u5173\u95ed\u9632\u706b\u5899\u548cselinux&#xff0c;\u8bbe\u7f6e\u4e3b\u673a\u540d<\/p>\n<p>[root&#064;localhost ~]# systemctl stop firewalld [root&#064;localhost ~]# systemctl disable firewalld [root&#064;localhost ~]# vi \/etc\/selinux\/config SELINUX&#061;disabled [root&#064;localhost ~]# hostnamectl set-hostname web01 [root&#064;localhost ~]# reboot<\/p>\n<\/p>\n<\/p>\n<p>\u8bbe\u7f6e\u9759\u6001ip&#xff1a;<\/p>\n<p>[root&#064;server\u00a0~]#vi \u00a0\/etc\/sysconfig\/network-scripts\/ifcfg-ens32 # Generated by dracut initrd NAME&#061;&#034;ens32&#034; DEVICE&#061;&#034;ens32&#034; ONBOOT&#061;yes \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 # \u542f\u7528 NETBOOT&#061;yes UUID&#061;&#034;7e65296d-c761-4002-80ab-0543cee4f60d&#034; IPV6INIT&#061;yes BOOTPROTO&#061;none IPADDR&#061;&#034;192.168.88.200&#034; \u00a0 \u00a0# ip NETMASK&#061;&#034;255.255.255.0&#034; \u00a0 \u00a0# \u63a9\u7801 GATEWAY&#061;&#034;192.168.88.2&#034; \u00a0 \u00a0 # \u7f51\u5173 DNS1&#061;&#034;114.114.114.114&#034; \u00a0 \u00a0 # dns TYPE&#061;Ethernet<\/p>\n<p>[root&#064;server\u00a0~]# systemctl restart network<\/p>\n<p># \u5b89\u88c5\u6240\u6709\u8f6f\u4ef6 [root&#064;server\u00a0~]# yum install vim \u00a0tree tar net-tools rsync nfs-utils -y<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"280\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141919-68025f67174bf.png\" width=\"514\" \/><\/p>\n<p>\u90e8\u7f72\u7f51\u7ad9\u5b9e\u5217<\/p>\n<p>[root&#064;server\u00a0~]# wget -O \/etc\/yum.repos.d\/epel.repo https:\/\/mirrors.aliyun.com\/repo\/epel-7.repo [root&#064;server\u00a0~]# yum \u00a0ma [root&#064;server\u00a0~]# yum \u00a0install \u00a0nginx \u00a0-y [root&#064;server\u00a0~]# mkdir \u00a0-p \u00a0\/www\/sczl [root&#064;server~]# cd \u00a0\/www\/sczl # \u4f7f\u7528xftp\u5c06web\u6e90\u6587\u4ef6\u4e0a\u4f20\u81f3\/www\/sczl&#xff0c;\u5982\u56fe&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"346\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141919-68025f672d325.png\" width=\"935\" \/><\/p>\n<p># \u4fee\u6539nginx\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>[root&#064;server\u00a0~]# vim \u00a0\/etc\/nginx\/nginx.conf \u00a0 \u00a0 # \u4fee\u6539\u7b2c42\u884c\u4e4b\u540e\u7684\u8def\u5f84 42 \u00a0 \u00a0 \u00a0 \u00a0 root \u00a0 \u00a0 \u00a0 \u00a0 \/www\/sczl; [root&#064;server~]# systemctl start nginx\u00a0 [root&#064;server\u00a0~]# systemctl enable nginx\u00a0<\/p>\n<p># \u6d4b\u8bd5&#xff1a;\u6253\u5f00windows\u7aef\u6d4f\u89c8\u5668\u8f93\u5165\u670d\u52a1\u7aefIP\u5730\u5740<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"229\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141919-68025f674f879.png\" width=\"586\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"692\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141919-68025f67646da.png\" width=\"1120\" \/><\/p>\n<h4>6.1.2nfs\u670d\u52a1\u5668\u73af\u5883\u642d\u5efa<\/h4>\n<p>\u5b89\u88c5Centos7.9\u7cfb\u7edf&#xff0c;\u66ff\u6362yum\u6e90&#xff0c;\u8fde\u63a5xshell&#xff0c;\u8fc7\u7a0b\u7565<\/p>\n<p>\u5173\u95ed\u9632\u706b\u5899\u548cselinux&#xff0c;\u8bbe\u7f6e\u4e3b\u673a\u540d&#xff08;\u540c\u4e0a\u9762\u6b65\u9aa4&#xff09;<\/p>\n<p>[root&#064;localhost ~]# systemctl stop firewalld [root&#064;localhost ~]# systemctl disable firewalld [root&#064;localhost ~]# vi \/etc\/selinux\/config SELINUX&#061;disabled [root&#064;localhost ~]# hostnamectl set-hostname nfs01 [root&#064;localhost ~]# reboot<\/p>\n<p>\u8bbe\u7f6e\u9759\u6001ip<\/p>\n<p>[root&#064;nfs01 ~]# vi \u00a0\/etc\/sysconfig\/network-scripts\/ifcfg-ens32 \u00a0Generated by dracut initrd NAME&#061;&#034;ens33&#034; DEVICE&#061;&#034;ens33&#034; ONBOOT&#061;yes NETBOOT&#061;yes UUID&#061;&#034;d27bba8e-31cf-4e78-a7e6-7ed415b31d61&#034; IPV6INIT&#061;yes BOOTPROTO&#061;none IPADDR&#061;&#034;192.168.1.201&#034; NETMASK&#061;&#034;255.255.255.0&#034; GATEWAY&#061;&#034;192.168.1.2&#034; DNS1&#061;&#034;114.114.114.114&#034; TYPE&#061;Ethernet \u00a0<\/p>\n<p>[root&#064;nfs01 ~]# systemctl restart network<\/p>\n<p>[root&#064;nfs01 ~]# yum install vim \u00a0tree tar net-tools rsync -y<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"356\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141920-68025f683ee1e.png\" width=\"585\" \/><\/p>\n<p>\u90e8\u7f72\u5171\u4eab\u5b58\u50a8&#xff0c;nfs01\u4e3a\u670d\u52a1\u7aef&#xff0c;web01\u4e3a\u5ba2\u6237\u7aef<\/p>\n<p># nfs01\u670d\u52a1\u7aef\u64cd\u4f5c [root&#064;nfs01 ~]# yum \u00a0install \u00a0rpcbind \u00a0-y [root&#064;nfs01 ~]# yum \u00a0install \u00a0nfs-utils \u00a0-y [root&#064;nfs01 ~]# mkdir \u00a0\/nfsfile [root&#064;nfs01 ~]# echo \u00a0&#034;welcome to www.openlab.com&#034; &gt; \/nfsfile\/readme [root&#064;nfs01 ~]# chmod \u00a0-Rf \u00a0777 \u00a0\/nfsfile [root&#064;nfs01 ~]# vim \u00a0\/etc\/exports \u00a0 \u00a0# \u7f16\u8f91nfs\u914d\u7f6e\u6587\u4ef6&#xff0c;\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9 \/nfsfile \u00a0 \u00a0 \u00a0 \u00a0192.168.88.0\/24(rw,sync,all_squash)<\/p>\n<p>[root&#064;nfs01 ~]# systemctl start \u00a0rpcbind [root&#064;nfs01 ~]# systemctl enable \u00a0rpcbind [root&#064;nfs01 ~]# systemctl start \u00a0nfs-server [root&#064;nfs01 ~]# systemctl enable \u00a0nfs-server Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/nfs-server.service to \/usr\/lib\/systemd\/system\/nfs-server.service.<\/p>\n<p># web01\u5ba2\u6237\u7aef\u64cd\u4f5c&#xff1a;<\/p>\n<p>[root&#064;web01 ~]# showmount \u00a0-e \u00a0192.168.1.201 Export list for 192.168.1.201: \/nfsfile 192.168.1.2\/24 [root&#064;server\u00a0~]# mkdir \u00a0\/web_nfs [root&#064;server\u00a0~]# mount -t nfs \u00a0192.168.1.201:\/nfsfile \u00a0\/web_nfs [root&#064;server\u00a0~]# cd \u00a0\/web_nfs [root&#064;server\u00a0web_nfs]# ls readme [root&#064;server web_nfs]# cd \u00a0~ [root&#064;server web_nfs]# vim \u00a0\/etc\/fstab \u00a0 \u00a0 \u00a0 # \u6c38\u4e45\u6302\u8f7d 192.168.1.201:\/nfsfile \u00a0 \/web_nfs \u00a0 nfs \u00a0 \u00a0defaults \u00a0 \u00a00 \u00a0 \u00a00<\/p>\n<p>[root&#064;server web_nfs]# mount \u00a0-a [root&#064;server web_nfs]# df \u00a0-h Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Size \u00a0Used Avail Use% Mounted on devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 900M \u00a0 \u00a0 0 \u00a0900M \u00a0 0% \/dev tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0910M \u00a0 \u00a0 0 \u00a0910M \u00a0 0% \/dev\/shm tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0910M \u00a09.4M \u00a0901M \u00a0 2% \/run tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0910M \u00a0 \u00a0 0 \u00a0910M \u00a0 0% \/sys\/fs\/cgroup \/dev\/sda3 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 17G \u00a01.9G \u00a0 16G \u00a012% \/ \/dev\/sda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1014M \u00a0144M \u00a0871M \u00a015% \/boot tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0182M \u00a0 \u00a0 0 \u00a0182M \u00a0 0% \/run\/user\/0 192.168.1.201:\/nfsfile \u00a0 17G \u00a01.6G \u00a0 16G \u00a0 9% \/web_nfs<\/p>\n<h4 style=\"background-color:transparent\">6.1.3backup\u670d\u52a1\u5668\u73af\u5883\u642d\u5efa<\/h4>\n<p>\u5b89\u88c5Centos7.9\u7cfb\u7edf&#xff0c;\u66ff\u6362yum\u6e90&#xff0c;\u8fde\u63a5xshell&#xff0c;\u8fc7\u7a0b\u7565<\/p>\n<p>\u5173\u95ed\u9632\u706b\u5899\u548cselinux&#xff0c;\u8bbe\u7f6e\u4e3b\u673a\u540d&#xff08;\u540c\u4e0a&#xff09;<\/p>\n<p>[root&#064;localhost ~]# systemctl stop firewalld [root&#064;localhost ~]# systemctl disable firewalld [root&#064;localhost ~]# vi \/etc\/selinux\/config SELINUX&#061;disabled [root&#064;localhost ~]# hostnamectl set-hostname backup [root&#064;localhost ~]# reboot<\/p>\n<p>\u8bbe\u7f6e\u9759\u6001ip<\/p>\n<p>[root&#064;backup ~]# vi \u00a0\/etc\/sysconfig\/network-scripts\/ifcfg-ens32<\/p>\n<p>#\u00a0Generated by dracut initrd NAME&#061;&#034;ens33&#034; DEVICE&#061;&#034;ens33&#034; ONBOOT&#061;yes NETBOOT&#061;yes UUID&#061;&#034;5d7bf117-20c7-4ae1-b898-e942638af7ad&#034; IPV6INIT&#061;yes BOOTPROTO&#061;none IPADDR&#061;&#034;192.168.1.202&#034; \u00a0 \u00a0 \u00a0 NETMASK&#061;&#034;255.255.255.0&#034; GATEWAY&#061;&#034;192.168.1.2&#034; DNS1&#061;&#034;114.114.114.114&#034; TYPE&#061;Ethernet<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"340\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141920-68025f685c4b8.png\" width=\"612\" \/><\/p>\n<\/p>\n<p>\u4fee\u6539rsync\u914d\u7f6e\u6587\u4ef6<\/p>\n<p># \u6ce8\u610f&#xff1a;\u914d\u7f6e\u6587\u4ef6\u4e2d\u4e0b\u5217\u6ce8\u91ca\u8981\u5220\u9664\u00a0 [root&#064;backup ~]# vim \/etc\/rsyncd.conf uid &#061; rsync\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u7528\u6237 gid &#061; rsync\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u7ec4 use chroot &#061; no\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u7a0b\u5e8f\u5b89\u5168\u8bbe\u7f6e max connections &#061; 200\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u5ba2\u6237\u7aef\u8fde\u63a5\u6570 timeout &#061; 300\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u8d85\u65f6\u65f6\u95f4 pid file &#061; \/var\/run\/rsyncd.pid\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u8fdb\u7a0b\u53f7\u6587\u4ef6\u4f4d\u7f6e lock file &#061; \/var\/run\/rsync.lock\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u8fdb\u7a0b\u9501 log file &#061; \/var\/log\/rsyncd.log\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u65e5\u5fd7\u6587\u4ef6 fake super &#061; yes \u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u65e0\u9700rsync\u4ee5root\u8eab\u4efd\u8fd0\u884c&#xff0c;\u5141\u8bb8\u63a5\u53d7\u6570\u636e<\/p>\n<p>[backup] \u00a0 \u00a0 \u00a0 \u00a0 path &#061; \/backup\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u76ee\u5f55 \u00a0 \u00a0 \u00a0 \u00a0 ignore errors\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u6709\u9519\u8bef\u65f6\u5ffd\u7565 \u00a0 \u00a0 \u00a0 \u00a0 read only &#061; false\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u53ef\u8bfb\u53ef\u5199 \u00a0 \u00a0 \u00a0 \u00a0 list &#061; false\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# \u963b\u6b62\u8fdc\u7a0b\u5217\u8868 \u00a0 \u00a0 \u00a0 \u00a0 hosts allow &#061; 192.168.1.0\/24\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u5141\u8bb8IP \u00a0 \u00a0 \u00a0 \u00a0 hosts deny &#061; 0.0.0.0\/32\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u7981\u6b62IP \u00a0 \u00a0 \u00a0 \u00a0 auth users &#061; rsync\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u7528\u4e8e\u8ba4\u8bc1\u7684\u8d26\u6237 \u00a0 \u00a0 \u00a0 \u00a0 secrets file &#061; \/etc\/rsync.password\u00a0\u00a0 \u00a0# \u5b58\u653e\u7528\u6237\u548c\u5bc6\u7801\u7684\u6587\u4ef6<\/p>\n<p>\u6839\u636e\u914d\u7f6e\u6587\u4ef6\u8bbe\u7f6e<\/p>\n<p># \u521b\u5efarsync\u8d26\u6237\u53ca\u5171\u4eab\u76ee\u5f55\u5e76\u4fee\u6539\u76ee\u5f55\u5c5e\u4e3b\u4e3arsync [root&#064;backup ~]# useradd -M -s \/sbin\/nologin rsync [root&#064;backup ~]# mkdir \/backup [root&#064;backup ~]# chown -R rsync \/backup<\/p>\n<p># \u5f00\u673a\u5e76\u542f\u52a8\u670d\u52a1 [root&#064;backup ~]# systemctl enable &#8211;now rsyncd [root&#064;backup ~]# ps -ef | grep rsync root \u00a01333 \u00a0 1 \u00a00 15:09 ? \u00a0 \u00a0 \u00a000:00:00 \/usr\/bin\/rsync &#8211;daemon &#8211;no-detach root \u00a01335 \u00a0 1261 \u00a00 15:09 pts\/0 \u00a000:00:00 grep &#8211;color&#061;auto rsync<\/p>\n<p># \u521b\u5efarsync\u865a\u62df\u8d26\u6237\u540d\u548c\u5bc6\u7801,\u5e76\u8d4b\u4e88\u5bc6\u7801\u6587\u4ef6600\u6743\u9650 [root&#064;backup ~]# echo &#034;rsync:rsync123&#034; &gt; \/etc\/rsync.password [root&#064;backup ~]# chmod 600 \/etc\/rsync.password<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"444\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141920-68025f68752ba.png\" width=\"614\" \/><\/p>\n<h3>6.2\u914d\u7f6e\u5907\u4efd\u811a\u672c<\/h3>\n<\/p>\n<h4>6.2.1\u914d\u7f6eserver\u5ba2\u6237\u7aef\u672c\u5730\u5907\u4efd\u811a\u672c<\/h4>\n<p>server\u5ba2\u6237\u7aef\u4e3b\u673a\u9700\u8981\u6253\u5305\u5907\u4efd\u7684\u5185\u5bb9&#xff1a;<\/p>\n<p>[root&#064;server nginx]# tree \u00a0\/var\/log\/nginx \u00a0 # \u65e5\u5fd7 \/var\/log\/nginx \u251c\u2500\u2500 access.log \u2514\u2500\u2500 error.log 0 directories, 2 files<\/p>\n<p>[root&#064;server nginx]# tree \/www \u00a0 \u00a0 \u00a0# \u7f51\u7ad9\u4e3b\u6570\u636e \/www \u251c\u2500\u2500 sczl \u2502\u00a0\u00a0\u00a0\u251c\u2500\u2500 css \u2502\u00a0\u00a0\u00a0\u2502\u00a0\u00a0\u00a0\u251c\u2500\u2500 animate.min.css \u2502\u00a0\u00a0\u00a0\u2502\u00a0\u00a0\u00a0\u251c\u2500\u2500 common.min.css<\/p>\n<p># \u4ee5\u53ca\u5b9a\u65f6\u4efb\u52a1\u548c\u5907\u4efd\u811a\u672c\u6e90\u6587\u4ef6 &#xff1a;\/var\/spool\/cron\/root\u3001\/etc\/rc.local\u3001\/server\/scripts<\/p>\n<p>[root&#064;server\u00a0~]# mkdir \u00a0\/backup [root&#064;server\u00a0~]# mkdir -p \u00a0\/server\/scripts<\/p>\n<\/p>\n<p>\u811a\u672c&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"725\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141920-68025f688f96a.png\" width=\"940\" \/><\/p>\n<p>\u6d4b\u8bd5&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"134\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141920-68025f68cacc3.png\" width=\"995\" \/><\/p>\n<p>[root&#064;server\u00a0~]# vim \/etc\/rsync.password \u00a0 \u00a0 # \u5ba2\u6237\u7aef\u5efa\u7acb\u8ba4\u8bc1\u7684\u6587\u4ef6\u5bc6\u7801\u5982\u4e0b&#xff1a; rsync123 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# \u6ce8\u610f&#xff1a;\u53ea\u5199\u5bc6\u7801<\/p>\n<p>[root&#064;server\u00a0~]# chmod 600 \/etc\/rsync.password \u00a0 # \u5bc6\u7801\u8ba4\u8bc1\u6587\u4ef6\u5fc5\u987b\u4e3a600<\/p>\n<p>\u6d4b\u8bd5&#xff1a;<\/p>\n<p>[root&#064;server\u00a0~]# bash \u00a0\/server\/scripts\/backup.sh\u00a0 2025-02-19_Week03 192.168.88.200 start backup &#8230;&#8230; Local backup successful, the backup files have been pushed to the backup server<\/p>\n<p># \u5728backup\u670d\u52a1\u5668\u4e2d\u53ef\u4ee5\u770b\u5230\u63a8\u9001\u7684\u6570\u636e [root&#064;backup ~]# ls \u00a0\/backup\/192.168.88.200\/ 2025-02-19_Week03.flag \u00a0nginx_logs_2025-02-19_Week03_tar.gz \u00a0sys_file_bak_2025-02-19_Week03_tar.gz \u00a0www_2025-02-19_Week03_tar.gz<\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8\u610f&#xff1a;\u82e5\u9047\u5230\u4e0b\u5217\u9519\u8bef\u53ef\u4ee5\u53c2\u8003&#xff1a;rsync\u5173\u4e8eauth\u00a0failed\u00a0on\u00a0module\u00a0xxx\u7684\u89e3\u51b3\u65b9\u6cd5__src_\u65b0\u6d6a\u535a\u5ba2<\/span><\/p>\n<p><span style=\"color:#fe2c24\">&#064;ERROR: auth failed on module backup rsync error: error starting client-server protocol (code 5) at main.c(1656) [sender&#061;3.1.2]<\/span><\/p>\n<h4>6.2.2\u914d\u7f6enfs01\u5ba2\u6237\u7aef\u672c\u5730\u5907\u4efd\u811a\u672c<\/h4>\n<p>nfs01\u5ba2\u6237\u7aef\u4e3b\u673a\u9700\u8981\u6253\u5305\u5907\u4efd\u7684\u5185\u5bb9&#xff1a;<\/p>\n<p>[root&#064;nfs01 ~]# tree \u00a0\/nfsfile\/ \u00a0 \u00a0 \u00a0 # \u5171\u4eab\u76ee\u5f55\u6570\u636e \/nfsfile\/ \u2514\u2500\u2500 readme<\/p>\n<p># \u4ee5\u53ca\/var\/log\/message\u6587\u4ef6\u3001mount \u00a0-l \u00a0\u6302\u8f7d\u4fe1\u606f<\/p>\n<p>\u7f16\u5199\u5907\u4efdnfs01\u670d\u52a1\u5668\u7684\u811a\u672c<\/p>\n<p>[root&#064;nfs01 ~]# mkdir \u00a0\/backup [root&#064;nfs01 ~]# mkdir -p \u00a0\/server\/scripts<\/p>\n<p>\u811a\u672c&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"730\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141920-68025f68e3379.png\" width=\"905\" \/><\/p>\n<\/p>\n<p>[root&#064;nfs01 ~]# vim \/etc\/rsync.password \u00a0 \u00a0 # \u5ba2\u6237\u7aef\u5efa\u7acb\u8ba4\u8bc1\u7684\u6587\u4ef6\u5bc6\u7801\u5982\u4e0b&#xff1a; rsync123 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# \u6ce8\u610f&#xff1a;\u53ea\u5199\u5bc6\u7801<\/p>\n<p>[root&#064;nfs01 ~]# chmod 600 \/etc\/rsync.password \u00a0 # \u5bc6\u7801\u8ba4\u8bc1\u6587\u4ef6\u5fc5\u987b\u4e3a600 [root&#064;nfs01 ~]# ls -ld \u00a0\/etc\/rsync.password\u00a0 -rw-r&#8211;r&#8211; 1 root root 9 Feb 19 16:40 \/etc\/rsync.password<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"130\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141921-68025f692b685.png\" width=\"774\" \/><\/p>\n<p>\u811a\u672c\u6d4b\u8bd5&#xff1a;<\/p>\n<p>[root&#064;nfs01 ~]# bash \u00a0\/server\/scripts\/backup.sh\u00a0<\/p>\n<p># \u5728backup\u670d\u52a1\u5668\u4e2d\u53ef\u4ee5\u770b\u5230\u63a8\u9001\u7684\u6570\u636e [root&#064;backup ~]# ls \u00a0\/backup\/ 192.168.1.200 \u00a0192.168.1.201<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"96\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141921-68025f69444bb.png\" width=\"1064\" \/><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"196\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141921-68025f695fc6f.png\" width=\"1000\" \/><\/p>\n<h3>6.3\u914d\u7f6e\u5b9a\u65f6\u4efb\u52a1<\/h3>\n<p>server\u670d\u52a1\u5668\u7f16\u8f91\u5b9a\u65f6\u4efb\u52a1&#xff0c;\u5b9e\u73b0\u6bcf\u592900:00\u5b9a\u65f6\u5907\u4efd\u672c\u5730\u6570\u636e&#xff0c;\u5e76\u63a8\u9001\u5230Rsync\u670d\u52a1\u5668\u4e0a<\/p>\n<p># \u67e5\u770bcrond\u670d\u52a1\u72b6\u6001&#xff0c;<span style=\"color:#fe2c24\">\u9ed8\u8ba4\u5df2\u5b89\u88c5<\/span> [root&#064;server\u00a0~]# systemctl status \u00a0crond \u25cf crond.service &#8211; Command Scheduler \u00a0 \u00a0Loaded: loaded (\/usr\/lib\/systemd\/system\/crond.service; enabled; vendor preset: enabled) \u00a0 \u00a0Active: active (running) since Thu 2025-02-20 09:00:05 CST; 11min ago \u00a0Main PID: 1119 (crond) \u00a0 \u00a0CGroup: \/system.slice\/crond.service \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u2514\u25001119 \/usr\/sbin\/crond -n \u00a0<\/p>\n<p><span style=\"color:#fe2c24\"># \u6ce8\u610f\u82e5\u672a\u5b89\u88c5\u53ef\u6267\u884c&#xff1a; [root&#064;web01 ~]# yum \u00a0install \u00a0crontabs<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"231\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141921-68025f697bb5d.png\" width=\"735\" \/><\/p>\n<p><span style=\"color:null\"># \u7f16\u8f91\u5b9a\u65f6\u4efb\u52a1<\/span><\/p>\n<p><span style=\"color:null\">[root&#064;web01 ~]# crontab \u00a0-e \u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# \u6dfb\u52a0:<\/span><\/p>\n<p><span style=\"color:null\"># crond-id-001:data backup 00 00 * * * \/bin\/sh \/server\/scripts\/backup.sh &gt;\/dev\/null 2&gt;&amp;1<\/span><\/p>\n<p><span style=\"color:null\"># \u82e5\u51fa\u73b0\u5b9a\u65f6\u4efb\u52a1\u5982\u4e0b\u4fe1\u606f\u4e0d\u7528\u5904\u7406&#xff1a; no crontab for root &#8211; using an empty one crontab: installing new crontab<\/span><\/p>\n<p>nfs01\u670d\u52a1\u5668\u8fc7\u7a0b\u540c\u4e0a<\/p>\n<p>backup\u670d\u52a1\u5668\u7f16\u5199\u811a\u672c&#xff0c;\u5b9e\u73b0\u5220\u9664180\u5929\u524d\u7684\u6240\u6709\u5907\u4efd\u6570\u636e&#xff0c;\u4f46\u4fdd\u5b58\u6bcf\u5468\u4e00\u7684<\/p>\n<p>[root&#064;backup ~]# mkdir -p \/server\/scripts [root&#064;backup ~]# cd \/server\/scripts\/ [root&#064;backup scripts]# vim \/server\/scripts\/del_bak_data.sh \u811a\u672c&#xff1a;<\/p>\n<\/p>\n<p>#!\/bin\/bash # Date:2025-4-10 # Author:WangRui # Mail:WangRui&#064;126.com # Function: Delete all backup data from 180 days ago, but save every Monday # Version: V1.0<\/p>\n<p>Backup_Dir&#061;&#034;\/backup\/&#034; <span style=\"color:#fe2c24\"># \u5220\u96647\u5929\u524d\u7684\u538b\u7f29\u5305\u548cflag\u6587\u4ef6&#xff0c;\u4f46\u662f\u6bcf\u5468\u4e00\u7684\u4e0d\u5220 find ${Backup_Dir:-\/tmp} -type f \u00a0-name &#034;*tar.gz*&#034; ! -name &#034;*Week01*&#034; -o -name &#034;*flag*&#034; -mtime &#043;7|xargs rm -f<\/span><\/p>\n<p><span style=\"color:#fe2c24\"># \u5220\u9664180\u5929\u524d\u7684\u6240\u6709\u538b\u7f29\u5305\u548cflag\u6587\u4ef6 find ${Backup_Dir:-\/tmp} -type f -name &#034;*tar.gz*&#034; -name &#034;*flag*&#034; -mtime &#043;180|xargs rm -f<\/span><\/p>\n<p><span style=\"color:#fe2c24\"># \u6ce8\u610f&#xff1a;Backup_Dir:-\/tmp\u8868\u793a\u68c0\u67e5\u73af\u5883\u53d8\u91cf Backup_Dir \u662f\u5426\u5df2\u8bbe\u7f6e\u3002\u5982\u679c\u8bbe\u7f6e\u4e86&#xff0c;\u5c31\u4f7f\u7528\u5176\u503c&#xff1b;\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e&#xff0c;\u5c31\u4f7f\u7528\u9ed8\u8ba4\u503c \/tmp<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"771\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141921-68025f6990c65.png\" width=\"1324\" \/><\/p>\n<p>backup\u670d\u52a1\u5668\u914d\u7f6e\u5b9a\u65f6\u4efb\u52a1&#xff0c;\u5b9e\u73b0\u670d\u52a1\u7aef180\u5929\u524d\u6570\u636e\u81ea\u52a8\u5220\u9664<\/p>\n<p>[root&#064;backup ~]# crontab -e<\/p>\n<p># crond-id-003:data backup 00 00 * * * \/bin\/sh \/server\/scripts\/del_bak_data.sh &gt;\/dev\/null 2&gt;&amp;1<\/p>\n<h3 style=\"background-color:transparent\">6.4\u6570\u636e\u4f20\u8f93\u5b8c\u6574\u6027\u9a8c\u8bc1\u4e0e\u76d1\u63a7\u544a\u8b66<\/h3>\n<h4>6.4.1\u9a8c\u8bc1\u6570\u636e\u5b8c\u6574\u6027<\/h4>\n<\/p>\n<p>backup\u670d\u52a1\u7aef\u9488\u5bf9\u5ba2\u6237\u7aef\u5907\u4efd\u65f6\u7684md5\u6307\u7eb9\u6570\u636e&#xff0c;\u5229\u7528MD5\u547d\u4ee4\u8fdb\u884c\u9a8c\u8bc1&#xff0c;\u5b8c\u6210\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u5b8c\u6574\u6027\u9a8c\u8bc1\u3002<\/p>\n<p>[root&#064;backup scripts]# vim send_mail.sh\u00a0  #!\/bin\/bash # Date:2025-4-10 # Author:WangRui # Mail:WangRui&#064;126.com # Function: Verify the integrity of backup files # Version: V1.0  Date&#061;$(date &#043;%F_Week0%w) Backup_Dir&#061;&#034;\/backup\/&#034; Check_Log&#061;&#034;\/tmp\/bak.log_$(date &#043;%F)&#034; \u00a0 \u00a0# \u5b9a\u65f6\u68c0\u67e5\u5907\u4efd\u7ed3\u679c\u7684\u6587\u4ef6 Admin_Mail&#061;1162293823&#064;qq.com \u00a0 \u00a0# \u7ba1\u7406\u5458\u90ae\u7bb1  find $Backup_Dir -type f -name &#034;${Date}.flag&#034;|xargs md5sum -c &gt;&gt; $Check_Log   if [ -n &#034;cat $Check_Log&#034; ] then \u00a0 \u00a0 mail -s &#034;$Date backup data info&#034; $Admin_Mail &lt; $Check_Log else \u00a0 \u00a0 echo &#034;$Date backup data error,pls check it.&#034; &gt; $Check_Log \u00a0 \u00a0# \u5982\u679c\u7ed3\u679c\u6587\u4ef6\u4e0d\u5b58\u5728&#xff0c;\u65e5\u5fd7\u4fe1\u606f\u53d8\u5316&#xff0c;\u62a5\u9519 \u00a0 \u00a0 mail -s &#034;$Date backup data info&#034; $Admin_Mail &lt; $Check_Log fi cp $Check_Log{,.ori} &amp;&amp; &gt; $Check_Log \u200b<\/p>\n<\/p>\n<h4>6.4.2\u914d\u7f6e\u90ae\u4ef6\u544a\u8b66<\/h4>\n<\/p>\n<p>\u5b89\u88c5\u90ae\u4ef6\u670d\u52a1<\/p>\n<p>[root&#064;backup ~]# yum \u00a0install \u00a0mailx \u00a0-y<\/p>\n<p>\u914d\u7f6eqq\u90ae\u7bb1ssl\u8bc1\u4e66<\/p>\n<p>[root&#064;backup ~]# mkdir -p \/root\/.certs [root&#064;backup ~]# cd \u00a0\/root\/.certs<\/p>\n<p>[root&#064;backup .certs]# echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne &#039;\/-BEGIN CERTIFICATE-\/,\/-END CERTIFICATE-\/p&#039; &gt; ~\/.certs\/qq.crt<\/p>\n<p>[root&#064;backup .certs]# certutil -A -n &#034;GeoTrust SSL CA&#034; -t &#034;C,,&#034; -d ~\/.certs -i ~\/.certs\/qq.crt<\/p>\n<p>[root&#064;backup .certs]# certutil -A -n &#034;GeoTrust Global CA&#034; -t &#034;C,,&#034; -d ~\/.certs -i ~\/.certs\/qq.crt<\/p>\n<p>[root&#064;backup .certs]# certutil -A -n &#034;GeoTrust SSL CA &#8211; G3&#034; -t &#034;Pu,Pu,Pu&#034; -d .\/ -i qq.crt Notice: Trust flag u is set automatically if the private key is present.<\/p>\n<p>\u914d\u7f6e\u90ae\u4ef6\u670d\u52a1<\/p>\n<p>[root&#064;backup .certs]# vim \u00a0\/etc\/mail.rc # \u6700\u540e\u4e00\u884c\u540e\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9&#xff1a;<\/p>\n<p>set from&#061;1162293823&#064;qq.com set smtp&#061;smtps:\/\/smtp.qq.com:465 \u00a0 \u00a0 \u00a0 \u00a0 # ssl\u7aef\u53e3\u9ed8\u8ba4465 set smtp-auth-user&#061;17674044&#064;qq.com set smtp-auth-password&#061;doc****qdubqbibj \u00a0# \u6388\u6743\u7801 set smtp-auth&#061;login set nss-config-dir&#061;\/root\/.certs\/ \u00a0 \u00a0 # \u8bbe\u7f6e\u8bc1\u4e66\u8def\u5f84 set ssl-verify&#061;ignore \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# \u542f\u7528\u52a0\u5bc6ssl\u4f20\u8f93in<\/p>\n<p>\u6d4b\u8bd5\u811a\u672c&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"116\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141921-68025f69e5b48.png\" width=\"842\" \/><\/p>\n<p>\u6d4b\u8bd5\u90ae\u4ef6\u670d\u52a1<\/p>\n<p>[root&#064;backup ~]# echo \u00a0&#034;testmail&#034; \u00a0| \u00a0mail \u00a0-s \u00a0&#034;testmail&#034; \u00a01162293823&#064;qq.com<\/p>\n<p>[root&#064;backup ~]# bash \/server\/scripts\/send_mail.sh<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"552\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141922-68025f6a0a3b2.jpg\" width=\"1230\" \/><\/p>\n<\/p>\n<\/p>\n<h2>7.\u603b\u7ed3\u4ee5\u53ca\u6613\u9519\u70b9&#xff1a;<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5173\u4e8e\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0\u7684\u771f\u673a\u5b9e\u9a8c\u603b\u7ed3\u4ee5\u53ca\u6613\u9519\u70b9\u7684\u5206\u6790&#xff1a;<\/p>\n<p>\u5b9e\u9a8c\u603b\u7ed3 1. \u73af\u5883\u642d\u5efa\u4e0e\u914d\u7f6e \u00a0 \u00a01.\u7cfb\u7edf\u5b89\u88c5\u4e0e\u57fa\u7840\u8bbe\u7f6e&#xff1a;\u5b89\u88c5Centos 7.9\u7cfb\u7edf&#xff0c;\u66ff\u6362yum\u6e90&#xff0c;\u5173\u95ed\u9632\u706b\u5899\u548cselinux&#xff0c;\u8bbe\u7f6e\u4e3b\u673a\u540d\u548c\u9759\u6001IP&#xff0c;\u5e76\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6\u3002 \u00a0 \u00a02.\u5907\u4efd\u670d\u52a1\u5668\u914d\u7f6e&#xff1a;\u914d\u7f6ersync\u670d\u52a1&#xff0c;\u4fee\u6539rsync\u914d\u7f6e\u6587\u4ef6&#xff0c;\u8bbe\u7f6e\u7528\u6237\u8ba4\u8bc1\u3001\u76ee\u5f55\u6743\u9650\u3001\u65e5\u5fd7\u8bb0\u5f55\u7b49\u3002 \u00a0 \u00a03.\u7f51\u7edc\u73af\u5883\u51c6\u5907&#xff1a;\u786e\u4fdd\u7f51\u7edc\u8fde\u901a\u6027&#xff0c;\u914d\u7f6e\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u7b49\u7f51\u7edc\u8bbe\u5907&#xff0c;\u5b9e\u73b0\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u6b63\u5e38\u901a\u4fe1\u3002 2. \u5907\u4efd\u7b56\u7565\u4e0e\u4efb\u52a1\u914d\u7f6e \u00a0 \u00a01.\u5907\u4efd\u8303\u56f4\u4e0e\u9891\u7387&#xff1a;\u6839\u636e\u4e1a\u52a1\u9700\u6c42&#xff0c;\u786e\u5b9a\u9700\u8981\u5907\u4efd\u7684\u6570\u636e\u8303\u56f4&#xff0c;\u5982\u6570\u636e\u5e93\u3001\u6587\u4ef6\u7cfb\u7edf\u7b49&#xff0c;\u5e76\u8bbe\u7f6e\u5408\u7406\u7684\u5907\u4efd\u9891\u7387&#xff0c;\u5982\u6bcf\u65e5\u5168\u5907\u6216\u589e\u91cf\u5907\u4efd\u3002 \u00a0 \u00a02.\u5907\u4efd\u4efb\u52a1\u8c03\u5ea6&#xff1a;\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5de5\u5177&#xff08;\u5982cron&#xff09;\u5b89\u6392\u5907\u4efd\u4efb\u52a1\u7684\u6267\u884c\u65f6\u95f4&#xff0c;\u786e\u4fdd\u5907\u4efd\u4efb\u52a1\u6309\u65f6\u81ea\u52a8\u8fd0\u884c\u3002 3. \u6d4b\u8bd5\u4e0e\u9a8c\u8bc1 \u00a0 \u00a01.\u5907\u4efd\u5b8c\u6574\u6027\u6d4b\u8bd5&#xff1a;\u901a\u8fc7\u6a21\u62df\u6570\u636e\u4e22\u5931\u6216\u635f\u574f&#xff0c;\u9a8c\u8bc1\u5907\u4efd\u6570\u636e\u7684\u5b8c\u6574\u6027\u548c\u53ef\u7528\u6027&#xff0c;\u786e\u4fdd\u5907\u4efd\u6570\u636e\u80fd\u591f\u6210\u529f\u6062\u590d\u3002 \u00a0 \u00a02.\u6027\u80fd\u6d4b\u8bd5&#xff1a;\u76d1\u6d4b\u5907\u4efd\u8fc7\u7a0b\u4e2d\u7684\u7f51\u7edc\u5e26\u5bbd\u3001\u78c1\u76d8I\/O\u7b49\u6027\u80fd\u6307\u6807&#xff0c;\u4f18\u5316\u5907\u4efd\u7b56\u7565\u4ee5\u63d0\u9ad8\u5907\u4efd\u6548\u7387\u3002 4. \u76d1\u63a7\u4e0e\u65e5\u5fd7\u7ba1\u7406 \u00a0 \u00a01.\u76d1\u63a7\u7cfb\u7edf\u914d\u7f6e&#xff1a;\u90e8\u7f72\u76d1\u63a7\u5de5\u5177&#xff08;\u5982Prometheus\u3001Zabbix\u7b49&#xff09;&#xff0c;\u5b9e\u65f6\u76d1\u63a7\u5907\u4efd\u670d\u52a1\u5668\u7684\u8fd0\u884c\u72b6\u6001\u3001\u5907\u4efd\u4efb\u52a1\u7684\u6267\u884c\u60c5\u51b5\u3002 \u00a0 \u00a02.\u65e5\u5fd7\u5206\u6790&#xff1a;\u5b9a\u671f\u68c0\u67e5rsync\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u5206\u6790\u5907\u4efd\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u4fe1\u606f\u548c\u5f02\u5e38\u60c5\u51b5&#xff0c;\u53ca\u65f6\u53d1\u73b0\u5e76\u89e3\u51b3\u95ee\u9898\u3002<\/p>\n<p>\u00a0\u6613\u9519\u70b9\u5206\u6790 1. \u914d\u7f6e\u9519\u8bef \u00a0 \u00a01.rsync\u914d\u7f6e\u6587\u4ef6\u9519\u8bef&#xff1a;\u5728\u4fee\u6539rsync\u914d\u7f6e\u6587\u4ef6\u65f6&#xff0c;\u5bb9\u6613\u9057\u6f0f\u6216\u9519\u8bef\u914d\u7f6e\u53c2\u6570&#xff0c;\u5982hosts allow\u548chosts deny\u7684IP\u8303\u56f4\u8bbe\u7f6e\u9519\u8bef&#xff0c;\u5bfc\u81f4\u5907\u4efd\u670d\u52a1\u5668\u65e0\u6cd5\u6b63\u5e38\u63a5\u6536\u6570\u636e\u3002 \u00a0 \u00a0\u7f51\u7edc\u914d\u7f6e\u9519\u8bef&#xff1a;\u4ea4\u6362\u673a\u6216\u8def\u7531\u5668\u914d\u7f6e\u9519\u8bef&#xff0c;\u5982VLAN\u5212\u5206\u3001\u63a5\u53e3\u6a21\u5f0f\u8bbe\u7f6e\u4e0d\u5f53&#xff0c;\u53ef\u80fd\u5bfc\u81f4\u7f51\u7edc\u4e0d\u901a&#xff0c;\u5f71\u54cd\u5907\u4efd\u6570\u636e\u7684\u4f20\u8f93\u3002 2. \u5907\u4efd\u7b56\u7565\u95ee\u9898 \u00a0 \u00a01.\u5907\u4efd\u8303\u56f4\u4e0d\u51c6\u786e&#xff1a;\u672a\u6b63\u786e\u6307\u5b9a\u5907\u4efd\u76ee\u5f55\u6216\u6587\u4ef6\u7c7b\u578b&#xff0c;\u5bfc\u81f4\u90e8\u5206\u91cd\u8981\u6570\u636e\u672a\u88ab\u5907\u4efd&#xff0c;\u6216\u5907\u4efd\u4e86\u5927\u91cf\u65e0\u5173\u6570\u636e&#xff0c;\u6d6a\u8d39\u5b58\u50a8\u7a7a\u95f4\u3002 \u00a0 2.\u5907\u4efd\u9891\u7387\u4e0d\u5408\u7406&#xff1a;\u5907\u4efd\u9891\u7387\u8bbe\u7f6e\u8fc7\u4f4e&#xff0c;\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u98ce\u9669\u589e\u52a0&#xff1b;\u8bbe\u7f6e\u8fc7\u9ad8&#xff0c;\u5219\u4f1a\u589e\u52a0\u5907\u4efd\u7cfb\u7edf\u7684\u8d1f\u62c5\u3002 3.\u6027\u80fd\u74f6\u9888 \u00a0 \u00a01.\u7f51\u7edc\u5e26\u5bbd\u4e0d\u8db3&#xff1a;\u5728\u591a\u53f0\u670d\u52a1\u5668\u540c\u65f6\u8fdb\u884c\u5907\u4efd\u65f6&#xff0c;\u7f51\u7edc\u5e26\u5bbd\u53ef\u80fd\u6210\u4e3a\u74f6\u9888&#xff0c;\u5bfc\u81f4\u5907\u4efd\u901f\u5ea6\u7f13\u6162&#xff0c;\u751a\u81f3\u5907\u4efd\u4efb\u52a1\u8d85\u65f6\u5931\u8d25\u3002 \u00a0 \u00a02.\u78c1\u76d8I\/O\u74f6\u9888&#xff1a;\u5907\u4efd\u670d\u52a1\u5668\u7684\u78c1\u76d8\u6027\u80fd\u4e0d\u8db3&#xff0c;\u65e0\u6cd5\u6ee1\u8db3\u5927\u91cf\u6570\u636e\u7684\u5199\u5165\u9700\u6c42&#xff0c;\u5f71\u54cd\u5907\u4efd\u6548\u7387\u3002 4. \u76d1\u63a7\u4e0e\u65e5\u5fd7\u7ba1\u7406\u4e0d\u8db3 \u00a0 1.\u76d1\u63a7\u914d\u7f6e\u4e0d\u5b8c\u5584&#xff1a;\u672a\u5bf9\u5907\u4efd\u670d\u52a1\u5668\u7684\u5173\u952e\u6307\u6807\u8fdb\u884c\u5168\u9762\u76d1\u63a7&#xff0c;\u5982CPU\u3001\u5185\u5b58\u3001\u78c1\u76d8\u4f7f\u7528\u7387\u7b49&#xff0c;\u65e0\u6cd5\u53ca\u65f6\u53d1\u73b0\u6f5c\u5728\u95ee\u9898\u3002 \u00a0 2.\u65e5\u5fd7\u5206\u6790\u4e0d\u53ca\u65f6&#xff1a;\u672a\u5b9a\u671f\u68c0\u67e5\u5907\u4efd\u65e5\u5fd7&#xff0c;\u5bfc\u81f4\u5907\u4efd\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u4fe1\u606f\u672a\u88ab\u53ca\u65f6\u53d1\u73b0\u548c\u5904\u7406&#xff0c;\u53ef\u80fd\u5f71\u54cd\u540e\u7eed\u5907\u4efd\u4efb\u52a1\u7684\u6267\u884c\u3002<\/p>\n<p>\u901a\u8fc7\u8fd9\u4e9b\u5206\u6790&#xff0c;\u53ef\u4ee5\u5728\u540e\u7eed\u7684\u81ea\u52a8\u5316\u5907\u4efd\u9879\u76ee\u4e2d\u66f4\u597d\u5730\u89c4\u5212\u548c\u4f18\u5316\u5b9e\u9a8c\u8fc7\u7a0b&#xff0c;\u63d0\u9ad8\u5907\u4efd\u7cfb\u7edf\u7684\u53ef\u9760\u6027\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5bf9\u672c\u6b21\u5b9e\u9a8c\u7684\u7406\u89e3\u4ee5\u53ca\u603b\u7ed3&#xff01;&#xff01;<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb829\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf16\u6b21\u3002\u4ee5\u4e0b\u662f\u5173\u4e8e\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0\u7684\u771f\u673a\u5b9e\u9a8c\u603b\u7ed3\u4ee5\u53ca\u6613\u9519\u70b9\u7684\u5206\u6790\uff1a\u5b9e\u9a8c\u603b\u7ed31. \u73af\u5883\u642d\u5efa\u4e0e\u914d\u7f6e1.\u7cfb\u7edf\u5b89\u88c5\u4e0e\u57fa\u7840\u8bbe\u7f6e\uff1a\u5b89\u88c5Centos 7.9\u7cfb\u7edf\uff0c\u66ff\u6362yum\u6e90\uff0c\u5173\u95ed\u9632\u706b\u5899\u548cselinux\uff0c\u8bbe\u7f6e\u4e3b\u673a\u540d\u548c\u9759\u6001IP\uff0c\u5e76\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6\u30022.\u5907\u4efd\u670d\u52a1\u5668\u914d\u7f6e\uff1a\u914d\u7f6ersync\u670d\u52a1\uff0c\u4fee\u6539rsync\u914d\u7f6e\u6587\u4ef6\uff0c\u8bbe\u7f6e\u7528\u6237\u8ba4\u8bc1\u3001\u76ee\u5f55\u6743\u9650\u3001\u65e5\u5fd7\u8bb0\u5f55\u7b49\u30023.\u7f51\u7edc\u73af\u5883\u51c6\u5907\uff1a\u786e\u4fdd\u7f51\u7edc\u8fde\u901a\u6027\uff0c\u914d\u7f6e\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u7b49\u7f51\u7edc\u8bbe\u5907\uff0c\u5b9e\u73b0\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u6b63\u5e38\u901a\u4fe1\u30022. \u5907\u4efd\u7b56\u7565\u4e0e\u4efb\u52a1\u914d\u7f6e\u3002<\/p>\n","protected":false},"author":2,"featured_media":15841,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[395,44],"topic":[],"class_list":["post-15860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-395","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0 - \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\/15860.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb829\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf16\u6b21\u3002\u4ee5\u4e0b\u662f\u5173\u4e8e\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0\u7684\u771f\u673a\u5b9e\u9a8c\u603b\u7ed3\u4ee5\u53ca\u6613\u9519\u70b9\u7684\u5206\u6790\uff1a\u5b9e\u9a8c\u603b\u7ed31. \u73af\u5883\u642d\u5efa\u4e0e\u914d\u7f6e1.\u7cfb\u7edf\u5b89\u88c5\u4e0e\u57fa\u7840\u8bbe\u7f6e\uff1a\u5b89\u88c5Centos 7.9\u7cfb\u7edf\uff0c\u66ff\u6362yum\u6e90\uff0c\u5173\u95ed\u9632\u706b\u5899\u548cselinux\uff0c\u8bbe\u7f6e\u4e3b\u673a\u540d\u548c\u9759\u6001IP\uff0c\u5e76\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6\u30022.\u5907\u4efd\u670d\u52a1\u5668\u914d\u7f6e\uff1a\u914d\u7f6ersync\u670d\u52a1\uff0c\u4fee\u6539rsync\u914d\u7f6e\u6587\u4ef6\uff0c\u8bbe\u7f6e\u7528\u6237\u8ba4\u8bc1\u3001\u76ee\u5f55\u6743\u9650\u3001\u65e5\u5fd7\u8bb0\u5f55\u7b49\u30023.\u7f51\u7edc\u73af\u5883\u51c6\u5907\uff1a\u786e\u4fdd\u7f51\u7edc\u8fde\u901a\u6027\uff0c\u914d\u7f6e\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u7b49\u7f51\u7edc\u8bbe\u5907\uff0c\u5b9e\u73b0\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u6b63\u5e38\u901a\u4fe1\u30022. \u5907\u4efd\u7b56\u7565\u4e0e\u4efb\u52a1\u914d\u7f6e\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/15860.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:19:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141918-68025f66510b7.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\/15860.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/15860.html\",\"name\":\"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T14:19:23+00:00\",\"dateModified\":\"2025-04-18T14:19:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/15860.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/15860.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15860.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0\"}]},{\"@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":"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0 - \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\/15860.html","og_locale":"zh_CN","og_type":"article","og_title":"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb829\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf16\u6b21\u3002\u4ee5\u4e0b\u662f\u5173\u4e8e\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0\u7684\u771f\u673a\u5b9e\u9a8c\u603b\u7ed3\u4ee5\u53ca\u6613\u9519\u70b9\u7684\u5206\u6790\uff1a\u5b9e\u9a8c\u603b\u7ed31. \u73af\u5883\u642d\u5efa\u4e0e\u914d\u7f6e1.\u7cfb\u7edf\u5b89\u88c5\u4e0e\u57fa\u7840\u8bbe\u7f6e\uff1a\u5b89\u88c5Centos 7.9\u7cfb\u7edf\uff0c\u66ff\u6362yum\u6e90\uff0c\u5173\u95ed\u9632\u706b\u5899\u548cselinux\uff0c\u8bbe\u7f6e\u4e3b\u673a\u540d\u548c\u9759\u6001IP\uff0c\u5e76\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6\u30022.\u5907\u4efd\u670d\u52a1\u5668\u914d\u7f6e\uff1a\u914d\u7f6ersync\u670d\u52a1\uff0c\u4fee\u6539rsync\u914d\u7f6e\u6587\u4ef6\uff0c\u8bbe\u7f6e\u7528\u6237\u8ba4\u8bc1\u3001\u76ee\u5f55\u6743\u9650\u3001\u65e5\u5fd7\u8bb0\u5f55\u7b49\u30023.\u7f51\u7edc\u73af\u5883\u51c6\u5907\uff1a\u786e\u4fdd\u7f51\u7edc\u8fde\u901a\u6027\uff0c\u914d\u7f6e\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u7b49\u7f51\u7edc\u8bbe\u5907\uff0c\u5b9e\u73b0\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u6b63\u5e38\u901a\u4fe1\u30022. \u5907\u4efd\u7b56\u7565\u4e0e\u4efb\u52a1\u914d\u7f6e\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/15860.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T14:19:23+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418141918-68025f66510b7.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\/15860.html","url":"https:\/\/www.wsisp.com\/helps\/15860.html","name":"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T14:19:23+00:00","dateModified":"2025-04-18T14:19:23+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/15860.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/15860.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/15860.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u81ea\u52a8\u5316\u5907\u4efd\u5168\u7f51\u670d\u52a1\u5668\u6570\u636e\u5e73\u53f0"}]},{"@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\/15860","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=15860"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/15860\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/15841"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=15860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=15860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=15860"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=15860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}