{"id":78762,"date":"2026-02-28T07:51:19","date_gmt":"2026-02-27T23:51:19","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/78762.html"},"modified":"2026-02-28T07:51:19","modified_gmt":"2026-02-27T23:51:19","slug":"%e6%89%b9%e9%87%8f%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%93%8d%e4%bd%9c%e5%ae%9e%e6%88%98%ef%bc%9a100%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%80%e9%94%ae%e7%ae%a1%e6%8e%a7%ef%bc%88%e5%90%ab%e8%84%9a","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/78762.html","title":{"rendered":"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09"},"content":{"rendered":"<h2>\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218&#xff1a;100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7&#xff08;\u542b\u811a\u672c&#043;\u907f\u5751\u6307\u5357&#xff09;<\/h2>\n<p>\u5728\u5927\u89c4\u6a21\u670d\u52a1\u5668\u8fd0\u7ef4\u573a\u666f\u4e2d&#xff0c;\u624b\u52a8\u9010\u53f0\u64cd\u4f5c100\u53f0\u670d\u52a1\u5668\u4e0d\u4ec5\u6548\u7387\u4f4e\u4e0b&#xff0c;\u8fd8\u6781\u6613\u51fa\u73b0\u4eba\u4e3a\u5931\u8bef\u3002\u672c\u6587\u5c06\u57fa\u4e8eSSH\u534f\u8bae\u5b9e\u73b0100\u53f0\u670d\u52a1\u5668\u7684\u4e00\u952e\u7ba1\u63a7&#xff0c;\u6db5\u76d6\u6279\u91cf\u6267\u884c\u547d\u4ee4\u3001\u6587\u4ef6\u5206\u53d1\u3001\u72b6\u6001\u76d1\u63a7\u7b49\u6838\u5fc3\u529f\u80fd&#xff0c;\u5e76\u7ed3\u5408\u5b9e\u6218\u7ecf\u9a8c\u68b3\u7406\u907f\u5751\u6307\u5357&#xff0c;\u5e2e\u52a9\u4f60\u9ad8\u6548\u3001\u5b89\u5168\u5730\u7ba1\u7406\u670d\u52a1\u5668\u96c6\u7fa4\u3002<\/p>\n<h3>\u4e00\u3001\u524d\u7f6e\u51c6\u5907<\/h3>\n<h4>1. \u6838\u5fc3\u4f9d\u8d56<\/h4>\n<ul>\n<li>\u73af\u5883\u8981\u6c42&#xff1a;\u63a7\u5236\u7aef\u4e3aLinux\u7cfb\u7edf&#xff08;\u63a8\u8350CentOS7&#043;\/Ubuntu18.04&#043;&#xff09;&#xff0c;\u88ab\u63a7\u7aef\u4e3aLinux\u7cfb\u7edf&#xff08;\u4e3b\u6d41\u53d1\u884c\u7248\u5747\u53ef&#xff09;\u3002<\/li>\n<li>\u6838\u5fc3\u5de5\u5177&#xff1a;\n<ul>\n<li>sshpass&#xff1a;\u514d\u4ea4\u4e92\u8f93\u5165SSH\u5bc6\u7801&#xff08;\u6d4b\u8bd5\u73af\u5883\u53ef\u7528&#xff0c;\u751f\u4ea7\u73af\u5883\u4f18\u5148\u5bc6\u94a5\u8ba4\u8bc1&#xff09;&#xff1b;<\/li>\n<li>ansible&#xff08;\u53ef\u9009&#xff09;&#xff1a;\u8fdb\u9636\u6279\u91cf\u8fd0\u7ef4\u5de5\u5177&#xff0c;\u672c\u6587\u5148\u57fa\u4e8e\u539f\u751fShell&#043;SSH\u5b9e\u73b0\u57fa\u7840\u7248&#xff0c;\u518d\u8865\u5145Ansible\u8fdb\u9636\u65b9\u6848&#xff1b;<\/li>\n<li>parallel-ssh&#xff1a;\u9ad8\u6027\u80fd\u5e76\u884cSSH\u5de5\u5177&#xff0c;\u9002\u5408\u5927\u89c4\u6a21\u670d\u52a1\u5668\u6279\u91cf\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>2. \u73af\u5883\u521d\u59cb\u5316&#xff08;\u63a7\u5236\u7aef&#xff09;<\/h4>\n<p><span class=\"token comment\"># CentOS\/RHEL<\/span><br \/>\nyum <span class=\"token function\">install<\/span> -y sshpass openssh-clients parallel-ssh<br \/>\n<span class=\"token comment\"># Ubuntu\/Debian<\/span><br \/>\n<span class=\"token function\">apt<\/span> update <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> -y sshpass openssh-clients pssh<\/p>\n<h4>3. \u670d\u52a1\u5668\u4fe1\u606f\u6574\u7406<\/h4>\n<p>\u65b0\u5efa\u670d\u52a1\u5668\u6e05\u5355\u6587\u4ef6 server_list.txt&#xff0c;\u683c\u5f0f\u4e3a IP:\u7aef\u53e3:\u7528\u6237\u540d:\u5bc6\u7801&#xff08;\u751f\u4ea7\u73af\u5883\u5efa\u8bae\u4ec5\u4fdd\u7559IP&#xff0c;\u7528\u5bc6\u94a5\u8ba4\u8bc1&#xff09;&#xff1a;<\/p>\n<p>192.168.1.10:22:root:Passwd&#064;123<br \/>\n192.168.1.11:22:root:Passwd&#064;123<br \/>\n192.168.1.12:22:root:Passwd&#064;123<br \/>\n# &#8230; \u5171100\u53f0\u670d\u52a1\u5668&#xff0c;\u6309\u6b64\u683c\u5f0f\u8865\u5145<\/p>\n<h3>\u4e8c\u3001\u6838\u5fc3\u811a\u672c\u5b9e\u73b0&#xff08;\u57fa\u7840\u7248&#xff1a;Shell&#043;SSH&#xff09;<\/h3>\n<h4>1. \u6279\u91cf\u6267\u884c\u547d\u4ee4\u811a\u672c&#xff08;run_cmd.sh&#xff09;<\/h4>\n<p>\u8be5\u811a\u672c\u53ef\u4e00\u952e\u5728100\u53f0\u670d\u52a1\u5668\u4e0a\u6267\u884c\u6307\u5b9a\u547d\u4ee4&#xff08;\u5982\u67e5\u770b\u5185\u5b58\u3001\u91cd\u542f\u670d\u52a1\u3001\u5b89\u88c5\u8f6f\u4ef6\u7b49&#xff09;\u3002<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token comment\"># \u6279\u91cf\u6267\u884c\u547d\u4ee4\u811a\u672c<\/span><br \/>\n<span class=\"token comment\"># \u4f7f\u7528\u65b9\u5f0f&#xff1a;.\/run_cmd.sh &#034;\u8981\u6267\u884c\u7684\u547d\u4ee4&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u53c2\u6570<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token variable\">$#<\/span> -ne <span class=\"token number\">1<\/span> <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u7528\u6cd5\u9519\u8bef&#xff01;\u793a\u4f8b&#xff1a;.\/run_cmd.sh &#039;free -m&#039;&#034;<\/span><br \/>\n    <span class=\"token builtin class-name\">exit<\/span> <span class=\"token number\">1<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token assign-left variable\">CMD<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\">$1<\/span><br \/>\n<span class=\"token assign-left variable\">SERVER_LIST<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;.\/server_list.txt&#034;<\/span><br \/>\n<span class=\"token assign-left variable\">LOG_DIR<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;.\/batch_log&#034;<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> -p <span class=\"token variable\">$LOG_DIR<\/span>  <span class=\"token comment\"># \u521b\u5efa\u65e5\u5fd7\u76ee\u5f55&#xff0c;\u8bb0\u5f55\u6bcf\u53f0\u670d\u52a1\u5668\u6267\u884c\u7ed3\u679c<\/span><\/p>\n<p><span class=\"token comment\"># \u904d\u5386\u670d\u52a1\u5668\u6e05\u5355\u6267\u884c\u547d\u4ee4<\/span><br \/>\n<span class=\"token keyword\">while<\/span> <span class=\"token assign-left variable\"><span class=\"token environment constant\">IFS<\/span><\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;:&#034;<\/span> <span class=\"token builtin class-name\">read<\/span> -r IP PORT <span class=\"token environment constant\">USER<\/span> <span class=\"token environment constant\">PWD<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">do<\/span><br \/>\n    <span class=\"token comment\"># \u8df3\u8fc7\u7a7a\u884c\u548c\u6ce8\u91ca\u884c<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">[<\/span> -z <span class=\"token variable\">$IP<\/span> <span class=\"token operator\">||<\/span> <span class=\"token variable\">$IP<\/span> <span class=\"token operator\">&#061;~<\/span> ^<span class=\"token comment\"># ]]; then<\/span><br \/>\n        <span class=\"token builtin class-name\">continue<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061; \u5f00\u59cb\u6267\u884c <span class=\"token variable\">$IP<\/span> &#061;&#061;&#061;&#061;&#061;&#034;<\/span><br \/>\n    <span class=\"token comment\"># \u6838\u5fc3\u547d\u4ee4&#xff1a;SSH\u514d\u4ea4\u4e92\u6267\u884c&#xff0c;\u8f93\u51fa\u65e5\u5fd7\u5230\u6307\u5b9a\u6587\u4ef6<\/span><br \/>\n    sshpass -p <span class=\"token string\">&#034;<span class=\"token environment constant\">$PWD<\/span>&#034;<\/span> <span class=\"token function\">ssh<\/span> -o <span class=\"token assign-left variable\">StrictHostKeyChecking<\/span><span class=\"token operator\">&#061;<\/span>no -p <span class=\"token string\">&#034;<span class=\"token variable\">$PORT<\/span>&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token environment constant\">$USER<\/span>&#034;<\/span>&#064;<span class=\"token string\">&#034;<span class=\"token variable\">$IP<\/span>&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$CMD<\/span>&#034;<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$LOG_DIR<\/span>\/<span class=\"token variable\">$IP<\/span>.log&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span><br \/>\n    <span class=\"token comment\"># \u68c0\u67e5\u6267\u884c\u7ed3\u679c<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token variable\">$?<\/span> -eq <span class=\"token number\">0<\/span> <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$IP<\/span> \u6267\u884c\u6210\u529f&#xff0c;\u65e5\u5fd7&#xff1a;<span class=\"token variable\">$LOG_DIR<\/span>\/<span class=\"token variable\">$IP<\/span>.log&#034;<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$IP<\/span> \u6267\u884c\u5931\u8d25&#xff0c;\u65e5\u5fd7&#xff1a;<span class=\"token variable\">$LOG_DIR<\/span>\/<span class=\"token variable\">$IP<\/span>.log&#034;<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n<span class=\"token keyword\">done<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$SERVER_LIST<\/span>&#034;<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061; \u6240\u6709\u670d\u52a1\u5668\u6267\u884c\u5b8c\u6210 &#061;&#061;&#061;&#061;&#061;&#034;<\/span><\/p>\n<h4>2. \u6279\u91cf\u5206\u53d1\u6587\u4ef6\u811a\u672c&#xff08;send_file.sh&#xff09;<\/h4>\n<p>\u7528\u4e8e\u5c06\u63a7\u5236\u7aef\u6587\u4ef6\u4e00\u952e\u5206\u53d1\u5230100\u53f0\u670d\u52a1\u5668\u6307\u5b9a\u76ee\u5f55&#xff08;\u5982\u914d\u7f6e\u6587\u4ef6\u3001\u5b89\u88c5\u5305&#xff09;\u3002<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token comment\"># \u6279\u91cf\u5206\u53d1\u6587\u4ef6\u811a\u672c<\/span><br \/>\n<span class=\"token comment\"># \u4f7f\u7528\u65b9\u5f0f&#xff1a;.\/send_file.sh \u672c\u5730\u6587\u4ef6\u8def\u5f84 \u76ee\u6807\u670d\u52a1\u5668\u8def\u5f84<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u53c2\u6570<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token variable\">$#<\/span> -ne <span class=\"token number\">2<\/span> <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u7528\u6cd5\u9519\u8bef&#xff01;\u793a\u4f8b&#xff1a;.\/send_file.sh \/local\/test.txt \/remote\/test.txt&#034;<\/span><br \/>\n    <span class=\"token builtin class-name\">exit<\/span> <span class=\"token number\">1<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token assign-left variable\">LOCAL_FILE<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\">$1<\/span><br \/>\n<span class=\"token assign-left variable\">REMOTE_PATH<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\">$2<\/span><br \/>\n<span class=\"token assign-left variable\">SERVER_LIST<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;.\/server_list.txt&#034;<\/span><br \/>\n<span class=\"token assign-left variable\">LOG_DIR<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;.\/batch_log&#034;<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> -p <span class=\"token variable\">$LOG_DIR<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u672c\u5730\u6587\u4ef6\u662f\u5426\u5b58\u5728<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token operator\">!<\/span> -f <span class=\"token string\">&#034;<span class=\"token variable\">$LOCAL_FILE<\/span>&#034;<\/span> <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u9519\u8bef&#xff1a;\u672c\u5730\u6587\u4ef6 <span class=\"token variable\">$LOCAL_FILE<\/span> \u4e0d\u5b58\u5728&#xff01;&#034;<\/span><br \/>\n    <span class=\"token builtin class-name\">exit<\/span> <span class=\"token number\">1<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token comment\"># \u904d\u5386\u670d\u52a1\u5668\u5206\u53d1\u6587\u4ef6<\/span><br \/>\n<span class=\"token keyword\">while<\/span> <span class=\"token assign-left variable\"><span class=\"token environment constant\">IFS<\/span><\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;:&#034;<\/span> <span class=\"token builtin class-name\">read<\/span> -r IP PORT <span class=\"token environment constant\">USER<\/span> <span class=\"token environment constant\">PWD<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">do<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">[<\/span> -z <span class=\"token variable\">$IP<\/span> <span class=\"token operator\">||<\/span> <span class=\"token variable\">$IP<\/span> <span class=\"token operator\">&#061;~<\/span> ^<span class=\"token comment\"># ]]; then<\/span><br \/>\n        <span class=\"token builtin class-name\">continue<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061; \u5f00\u59cb\u5206\u53d1\u5230 <span class=\"token variable\">$IP<\/span> &#061;&#061;&#061;&#061;&#061;&#034;<\/span><br \/>\n    <span class=\"token comment\"># \u6838\u5fc3\u547d\u4ee4&#xff1a;scp\u514d\u4ea4\u4e92\u5206\u53d1\u6587\u4ef6<\/span><br \/>\n    sshpass -p <span class=\"token string\">&#034;<span class=\"token environment constant\">$PWD<\/span>&#034;<\/span> <span class=\"token function\">scp<\/span> -o <span class=\"token assign-left variable\">StrictHostKeyChecking<\/span><span class=\"token operator\">&#061;<\/span>no -P <span class=\"token string\">&#034;<span class=\"token variable\">$PORT<\/span>&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$LOCAL_FILE<\/span>&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token environment constant\">$USER<\/span>&#034;<\/span>&#064;<span class=\"token string\">&#034;<span class=\"token variable\">$IP<\/span>&#034;<\/span><span class=\"token builtin class-name\">:<\/span><span class=\"token string\">&#034;<span class=\"token variable\">$REMOTE_PATH<\/span>&#034;<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$LOG_DIR<\/span>\/<span class=\"token variable\">$IP<\/span>.send.log&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token variable\">$?<\/span> -eq <span class=\"token number\">0<\/span> <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$IP<\/span> \u5206\u53d1\u6210\u529f&#xff0c;\u65e5\u5fd7&#xff1a;<span class=\"token variable\">$LOG_DIR<\/span>\/<span class=\"token variable\">$IP<\/span>.send.log&#034;<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$IP<\/span> \u5206\u53d1\u5931\u8d25&#xff0c;\u65e5\u5fd7&#xff1a;<span class=\"token variable\">$LOG_DIR<\/span>\/<span class=\"token variable\">$IP<\/span>.send.log&#034;<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n<span class=\"token keyword\">done<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$SERVER_LIST<\/span>&#034;<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061; \u6240\u6709\u670d\u52a1\u5668\u5206\u53d1\u5b8c\u6210 &#061;&#061;&#061;&#061;&#061;&#034;<\/span><\/p>\n<h4>3. \u811a\u672c\u4f7f\u7528\u793a\u4f8b<\/h4>\n<p><span class=\"token comment\"># 1. \u6279\u91cf\u67e5\u770b\u6240\u6709\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/span><br \/>\n<span class=\"token function\">chmod<\/span> &#043;x run_cmd.sh<br \/>\n.\/run_cmd.sh <span class=\"token string\">&#034;free -m&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u6279\u91cf\u5206\u53d1nginx\u914d\u7f6e\u6587\u4ef6\u5230\u6240\u6709\u670d\u52a1\u5668<\/span><br \/>\n<span class=\"token function\">chmod<\/span> &#043;x send_file.sh<br \/>\n.\/send_file.sh \/etc\/nginx\/nginx.conf \/etc\/nginx\/nginx.conf<\/p>\n<p><span class=\"token comment\"># 3. \u6279\u91cf\u91cd\u542fnginx\u670d\u52a1<\/span><br \/>\n.\/run_cmd.sh <span class=\"token string\">&#034;systemctl restart nginx &amp;&amp; systemctl status nginx&#034;<\/span><\/p>\n<h3>\u4e09\u3001\u8fdb\u9636\u65b9\u6848&#xff1a;Ansible\u6279\u91cf\u7ba1\u63a7&#xff08;\u63a8\u8350\u751f\u4ea7\u73af\u5883&#xff09;<\/h3>\n<p>Shell\u811a\u672c\u9002\u5408\u7b80\u5355\u573a\u666f&#xff0c;100\u53f0\u670d\u52a1\u5668\u89c4\u6a21\u63a8\u8350\u4f7f\u7528Ansible&#xff0c;\u6548\u7387\u66f4\u9ad8\u3001\u5b89\u5168\u6027\u66f4\u5f3a&#xff0c;\u4e14\u65e0\u9700\u7f16\u5199\u590d\u6742\u5faa\u73af\u3002<\/p>\n<h4>1. Ansible\u914d\u7f6e<\/h4>\n<h5>&#xff08;1&#xff09;\u5b89\u88c5Ansible<\/h5>\n<p><span class=\"token comment\"># CentOS\/RHEL<\/span><br \/>\nyum <span class=\"token function\">install<\/span> -y ansible<br \/>\n<span class=\"token comment\"># Ubuntu\/Debian<\/span><br \/>\n<span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> -y ansible<\/p>\n<h5>&#xff08;2&#xff09;\u914d\u7f6e\u4e3b\u673a\u6e05\u5355&#xff08;\/etc\/ansible\/hosts&#xff09;<\/h5>\n<p>[servers]<br \/>\n192.168.1.10 ansible_ssh_port&#061;22 ansible_ssh_user&#061;root ansible_ssh_pass&#061;Passwd&#064;123<br \/>\n192.168.1.11 ansible_ssh_port&#061;22 ansible_ssh_user&#061;root ansible_ssh_pass&#061;Passwd&#064;123<br \/>\n# &#8230; \u8865\u5145\u5269\u4f5998\u53f0\u670d\u52a1\u5668<\/p>\n<h4>2. Ansible\u4e00\u952e\u7ba1\u63a7\u793a\u4f8b<\/h4>\n<p><span class=\"token comment\"># 1. \u6279\u91cf\u6267\u884c\u547d\u4ee4&#xff08;\u67e5\u770b\u5185\u5b58&#xff09;<\/span><br \/>\nansible servers -m <span class=\"token builtin class-name\">command<\/span> -a <span class=\"token string\">&#034;free -m&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u6279\u91cf\u5206\u53d1\u6587\u4ef6<\/span><br \/>\nansible servers -m copy -a <span class=\"token string\">&#034;src&#061;\/etc\/nginx\/nginx.conf dest&#061;\/etc\/nginx\/nginx.conf&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u6279\u91cf\u5b89\u88c5\u8f6f\u4ef6&#xff08;\u5982nginx&#xff09;<\/span><br \/>\nansible servers -m yum -a <span class=\"token string\">&#034;name&#061;nginx state&#061;installed&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 4. \u6279\u91cf\u91cd\u542f\u670d\u52a1\u5e76\u68c0\u67e5\u72b6\u6001<\/span><br \/>\nansible servers -m <span class=\"token function\">service<\/span> -a <span class=\"token string\">&#034;name&#061;nginx state&#061;restarted&#034;<\/span><br \/>\nansible servers -m <span class=\"token builtin class-name\">command<\/span> -a <span class=\"token string\">&#034;systemctl status nginx | grep Active&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 5. \u5e76\u884c\u6267\u884c&#xff08;\u6307\u5b9a\u5e76\u53d1\u6570&#xff0c;100\u53f0\u5efa\u8bae\u8bbe50&#xff09;<\/span><br \/>\nansible servers -f <span class=\"token number\">50<\/span> -m <span class=\"token builtin class-name\">command<\/span> -a <span class=\"token string\">&#034;df -h&#034;<\/span><\/p>\n<h3>\u56db\u3001\u5b9e\u6218\u907f\u5751\u6307\u5357&#xff08;100\u53f0\u670d\u52a1\u5668\u5fc5\u770b&#xff09;<\/h3>\n<h4>1. \u7f51\u7edc\u4e0e\u8fde\u63a5\u7c7b\u5751<\/h4>\n<ul>\n<li>\n<p>\u57511&#xff1a;SSH\u8fde\u63a5\u8d85\u65f6\/\u5361\u987f&#xff0c;\u6279\u91cf\u64cd\u4f5c\u65f6\u90e8\u5206\u670d\u52a1\u5668\u65e0\u54cd\u5e94\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>\u811a\u672c\u4e2d\u6dfb\u52a0\u8d85\u65f6\u53c2\u6570&#xff1a;ssh -o ConnectTimeout&#061;5 -o ConnectionAttempts&#061;2&#xff1b;<\/li>\n<li>\u63d0\u524d\u68c0\u67e5\u670d\u52a1\u5668\u7f51\u7edc\u8fde\u901a\u6027&#xff1a;ping -c 1 $IP&#xff0c;\u8fc7\u6ee4\u4e0d\u53ef\u8fbe\u670d\u52a1\u5668&#xff1b;<\/li>\n<li>\u751f\u4ea7\u73af\u5883\u4f7f\u7528SSH\u957f\u8fde\u63a5&#xff0c;\u4fee\u6539\/etc\/ssh\/ssh_config&#xff1a;ControlMaster auto\u3001ControlPersist 30s\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u57512&#xff1a;\u9996\u6b21\u8fde\u63a5\u670d\u52a1\u5668\u65f6&#xff0c;SSH\u4e3b\u673a\u5bc6\u94a5\u9a8c\u8bc1\u5f39\u7a97\u4e2d\u65ad\u6279\u91cf\u6267\u884c\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;\u811a\u672c\u4e2d\u6dfb\u52a0-o StrictHostKeyChecking&#061;no&#xff08;\u6d4b\u8bd5\u73af\u5883&#xff09;&#xff0c;\u751f\u4ea7\u73af\u5883\u63d0\u524d\u6279\u91cf\u5bfc\u5165\u516c\u94a5\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u6743\u9650\u4e0e\u5b89\u5168\u7c7b\u5751<\/h4>\n<ul>\n<li>\n<p>\u57513&#xff1a;\u4f7f\u7528\u5bc6\u7801\u660e\u6587\u5b58\u50a8\u5728server_list.txt&#xff0c;\u5b58\u5728\u6cc4\u9732\u98ce\u9669\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>\u751f\u4ea7\u73af\u5883\u7981\u7528\u5bc6\u7801\u8ba4\u8bc1&#xff0c;\u6539\u7528SSH\u5bc6\u94a5&#xff1a;ssh-copy-id root&#064;$IP&#xff0c;\u6279\u91cf\u5bfc\u5165\u516c\u94a5&#xff1b;<\/li>\n<li>\u5bf9\u670d\u52a1\u5668\u6e05\u5355\u6587\u4ef6\u52a0\u5bc6&#xff1a;chmod 600 server_list.txt&#xff0c;\u4ec5\u8fd0\u7ef4\u7528\u6237\u53ef\u8bfb\u53d6&#xff1b;<\/li>\n<li>\u8fdb\u9636\u65b9\u6848&#xff1a;\u4f7f\u7528Vault\u52a0\u5bc6Ansible\u5bc6\u7801&#xff08;ansible-vault encrypt&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u57514&#xff1a;\u6279\u91cf\u6267\u884c\u547d\u4ee4\u65f6\u6743\u9650\u4e0d\u8db3&#xff08;\u5982\u666e\u901a\u7528\u6237\u6267\u884croot\u547d\u4ee4&#xff09;\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>\u547d\u4ee4\u4e2d\u6dfb\u52a0sudo&#xff1a;.\/run_cmd.sh &#034;sudo systemctl restart nginx&#034;&#xff1b;<\/li>\n<li>\u88ab\u63a7\u7aef\u914d\u7f6esudo\u514d\u5bc6&#xff1a;echo &#034;user ALL&#061;(ALL) NOPASSWD: ALL&#034; &gt;&gt; \/etc\/sudoers&#xff08;\u4ec5\u6388\u6743\u5fc5\u8981\u547d\u4ee4&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>3. \u6267\u884c\u6548\u7387\u4e0e\u7a33\u5b9a\u6027\u7c7b\u5751<\/h4>\n<ul>\n<li>\n<p>\u57515&#xff1a;100\u53f0\u670d\u52a1\u5668\u4e32\u884c\u6267\u884c&#xff0c;\u8017\u65f6\u8fc7\u957f&#xff08;\u6bcf\u53f010\u79d2&#xff0c;\u603b\u8ba11000\u79d2&#xff09;\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>Shell\u811a\u672c\u6539\u7528\u5e76\u884c\u6267\u884c&#xff08;xargs -P\u6216parallel&#xff09;&#xff1b;<\/li>\n<li>Ansible\u6307\u5b9a\u5e76\u53d1\u6570&#xff08;-f 50&#xff09;&#xff0c;\u5e73\u8861\u6548\u7387\u4e0e\u670d\u52a1\u5668\u8d1f\u8f7d&#xff1b;<\/li>\n<li>\u4f7f\u7528parallel-ssh\u5de5\u5177&#xff1a;pssh -h server_list.txt -i &#034;free -m&#034;&#xff08;\u539f\u751f\u652f\u6301\u5e76\u884c&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u57516&#xff1a;\u6279\u91cf\u64cd\u4f5c\u65f6\u90e8\u5206\u670d\u52a1\u5668\u6267\u884c\u5931\u8d25&#xff0c;\u65e0\u65e5\u5fd7\u8ffd\u6eaf\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>\u6240\u6709\u811a\u672c\u5f3a\u5236\u8f93\u51fa\u65e5\u5fd7\u5230\u6587\u4ef6&#xff0c;\u6309IP\u547d\u540d&#xff1b;<\/li>\n<li>\u6267\u884c\u5b8c\u6210\u540e\u751f\u6210\u6c47\u603b\u62a5\u544a&#xff1a;grep &#034;\u6267\u884c\u5931\u8d25&#034; $LOG_DIR\/*.log &gt; fail_report.txt&#xff1b;<\/li>\n<li>\u5173\u952e\u64cd\u4f5c&#xff08;\u5982\u4fee\u6539\u914d\u7f6e\u3001\u91cd\u542f\u670d\u52a1&#xff09;\u5148\u57281-2\u53f0\u6d4b\u8bd5\u673a\u9a8c\u8bc1&#xff0c;\u518d\u6279\u91cf\u6267\u884c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>4. \u4e1a\u52a1\u5f71\u54cd\u7c7b\u5751<\/h4>\n<ul>\n<li>\u57517&#xff1a;\u6279\u91cf\u91cd\u542f\u670d\u52a1\u65f6&#xff0c;100\u53f0\u670d\u52a1\u5668\u540c\u65f6\u91cd\u542f\u5bfc\u81f4\u4e1a\u52a1\u96ea\u5d29\u3002<br \/>\n\u2705 \u907f\u5751\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>\u5206\u6279\u6267\u884c&#xff1a;\u5c06\u670d\u52a1\u5668\u6e05\u5355\u6309\u6279\u6b21\u62c6\u5206&#xff08;\u5982\u6bcf20\u53f0\u4e00\u6279&#xff09;&#xff0c;\u95f4\u96945\u5206\u949f\u6267\u884c&#xff1b;<\/li>\n<li>Ansible\u4f7f\u7528&#8211;limit\u6307\u5b9a\u6279\u6b21&#xff1a;ansible servers &#8211;limit 192.168.1.*:10-30 -m service -a &#034;name&#061;nginx state&#061;restarted&#034;&#xff1b;<\/li>\n<li>\u6838\u5fc3\u4e1a\u52a1\u670d\u52a1\u5668\u6dfb\u52a0\u6267\u884c\u524d\u786e\u8ba4&#xff1a;read -p &#034;\u786e\u8ba4\u91cd\u542f100\u53f0\u670d\u52a1\u5668nginx&#xff1f;(y\/n)&#034; res &amp;&amp; [ $res &#061; y ] || exit 0\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u811a\u672c\u4f18\u5316\u5efa\u8bae&#xff08;\u9002\u914d100\u53f0\u89c4\u6a21&#xff09;<\/h3>\n<li>\u5f02\u6b65\u6267\u884c&#xff1a;\u5c06\u957f\u8017\u65f6\u64cd\u4f5c&#xff08;\u5982\u5b89\u88c5\u8f6f\u4ef6&#xff09;\u6539\u4e3a\u5f02\u6b65&#xff0c;\u907f\u514d\u963b\u585e&#xff1b;<\/li>\n<li>\u72b6\u6001\u76d1\u63a7&#xff1a;\u589e\u52a0\u670d\u52a1\u5668\u5728\u7ebf\u72b6\u6001\u68c0\u6d4b&#xff0c;\u6267\u884c\u524d\u8fc7\u6ee4\u79bb\u7ebf\u8282\u70b9&#xff1b;<\/li>\n<li>\u7ed3\u679c\u6c47\u603b&#xff1a;\u6267\u884c\u5b8c\u6210\u540e\u81ea\u52a8\u751f\u6210Excel\/CSV\u62a5\u544a&#xff0c;\u5305\u542b\u6bcf\u53f0\u670d\u52a1\u5668\u6267\u884c\u72b6\u6001\u3001\u8017\u65f6\u3001\u65e5\u5fd7\u8def\u5f84&#xff1b;<\/li>\n<li>\u5f02\u5e38\u91cd\u8bd5&#xff1a;\u5bf9\u6267\u884c\u5931\u8d25\u7684\u670d\u52a1\u5668\u81ea\u52a8\u91cd\u8bd51-2\u6b21&#xff0c;\u51cf\u5c11\u4eba\u5de5\u5e72\u9884\u3002<\/li>\n<h3>\u603b\u7ed3<\/h3>\n<li>100\u53f0\u670d\u52a1\u5668\u6279\u91cf\u7ba1\u63a7\u53ef\u9009\u62e9\u300cShell&#043;SSH\u300d&#xff08;\u7b80\u5355\u573a\u666f&#xff09;\u6216\u300cAnsible\u300d&#xff08;\u751f\u4ea7\u73af\u5883&#xff09;&#xff0c;\u6838\u5fc3\u662f\u6807\u51c6\u5316\u670d\u52a1\u5668\u6e05\u5355\u548c\u65e5\u5fd7\u8ffd\u6eaf&#xff1b;<\/li>\n<li>\u907f\u5751\u6838\u5fc3\u70b9&#xff1a;\u4f18\u5148\u4f7f\u7528SSH\u5bc6\u94a5\u8ba4\u8bc1\u3001\u63a7\u5236\u5e76\u53d1\u6570\u3001\u5206\u6279\u6267\u884c\u6838\u5fc3\u64cd\u4f5c\u3001\u5168\u91cf\u65e5\u5fd7\u8bb0\u5f55&#xff1b;<\/li>\n<li>\u751f\u4ea7\u73af\u5883\u9700\u517c\u987e\u6548\u7387\u4e0e\u5b89\u5168&#xff0c;\u7981\u6b62\u5bc6\u7801\u660e\u6587\u5b58\u50a8&#xff0c;\u5173\u952e\u64cd\u4f5c\u5148\u6d4b\u8bd5\u540e\u6279\u91cf\u6267\u884c\u3002<\/li>\n<p>\u901a\u8fc7\u672c\u6587\u7684\u811a\u672c\u548c\u907f\u5751\u6307\u5357&#xff0c;\u4f60\u53ef\u5b9e\u73b0100\u53f0\u670d\u52a1\u5668\u7684\u4e00\u952e\u547d\u4ee4\u6267\u884c\u3001\u6587\u4ef6\u5206\u53d1\u3001\u670d\u52a1\u7ba1\u63a7&#xff0c;\u5927\u5e45\u964d\u4f4e\u8fd0\u7ef4\u6210\u672c&#xff0c;\u540c\u65f6\u907f\u514d\u5927\u89c4\u6a21\u64cd\u4f5c\u4e2d\u7684\u5e38\u89c1\u98ce\u9669\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218&#xff1a;100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7&#xff08;\u542b\u811a\u672c\u907f\u5751\u6307\u5357&#xff09;<br \/>\n\u5728\u5927\u89c4\u6a21\u670d\u52a1\u5668\u8fd0\u7ef4\u573a\u666f\u4e2d&#xff0c;\u624b\u52a8\u9010\u53f0\u64cd\u4f5c100\u53f0\u670d\u52a1\u5668\u4e0d\u4ec5\u6548\u7387\u4f4e\u4e0b&#xff0c;\u8fd8\u6781\u6613\u51fa\u73b0\u4eba\u4e3a\u5931\u8bef\u3002\u672c\u6587\u5c06\u57fa\u4e8eSSH\u534f\u8bae\u5b9e\u73b0100\u53f0\u670d\u52a1\u5668\u7684\u4e00\u952e\u7ba1\u63a7&#xff0c;\u6db5\u76d6\u6279\u91cf\u6267\u884c\u547d\u4ee4\u3001\u6587\u4ef6\u5206\u53d1\u3001\u72b6\u6001\u76d1\u63a7\u7b49\u6838\u5fc3\u529f\u80fd&#xff0c;\u5e76\u7ed3\u5408\u5b9e\u6218\u7ecf\u9a8c\u68b3\u7406\u907f\u5751\u6307\u5357&#xff0c;\u5e2e\u52a9\u4f60\u9ad8\u6548\u3001\u5b89\u5168\u5730\u7ba1\u7406\u670d\u52a1\u5668\u96c6\u7fa4\u3002<br \/>\n\u4e00\u3001\u524d\u7f6e\u51c6\u5907<br \/>\n1. \u6838\u5fc3\u4f9d\u8d56<br \/>\n\u73af\u5883\u8981\u6c42&#xff1a;\u63a7\u5236<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-78762","post","type-post","status-publish","format-standard","hentry","category-server","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>\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09 - \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\/78762.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218&#xff1a;100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7&#xff08;\u542b\u811a\u672c\u907f\u5751\u6307\u5357&#xff09; \u5728\u5927\u89c4\u6a21\u670d\u52a1\u5668\u8fd0\u7ef4\u573a\u666f\u4e2d&#xff0c;\u624b\u52a8\u9010\u53f0\u64cd\u4f5c100\u53f0\u670d\u52a1\u5668\u4e0d\u4ec5\u6548\u7387\u4f4e\u4e0b&#xff0c;\u8fd8\u6781\u6613\u51fa\u73b0\u4eba\u4e3a\u5931\u8bef\u3002\u672c\u6587\u5c06\u57fa\u4e8eSSH\u534f\u8bae\u5b9e\u73b0100\u53f0\u670d\u52a1\u5668\u7684\u4e00\u952e\u7ba1\u63a7&#xff0c;\u6db5\u76d6\u6279\u91cf\u6267\u884c\u547d\u4ee4\u3001\u6587\u4ef6\u5206\u53d1\u3001\u72b6\u6001\u76d1\u63a7\u7b49\u6838\u5fc3\u529f\u80fd&#xff0c;\u5e76\u7ed3\u5408\u5b9e\u6218\u7ecf\u9a8c\u68b3\u7406\u907f\u5751\u6307\u5357&#xff0c;\u5e2e\u52a9\u4f60\u9ad8\u6548\u3001\u5b89\u5168\u5730\u7ba1\u7406\u670d\u52a1\u5668\u96c6\u7fa4\u3002 \u4e00\u3001\u524d\u7f6e\u51c6\u5907 1. \u6838\u5fc3\u4f9d\u8d56 \u73af\u5883\u8981\u6c42&#xff1a;\u63a7\u5236\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/78762.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-27T23:51:19+00:00\" \/>\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\/78762.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/78762.html\",\"name\":\"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-27T23:51:19+00:00\",\"dateModified\":\"2026-02-27T23:51:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/78762.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/78762.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78762.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09\"}]},{\"@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":"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09 - \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\/78762.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218&#xff1a;100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7&#xff08;\u542b\u811a\u672c\u907f\u5751\u6307\u5357&#xff09; \u5728\u5927\u89c4\u6a21\u670d\u52a1\u5668\u8fd0\u7ef4\u573a\u666f\u4e2d&#xff0c;\u624b\u52a8\u9010\u53f0\u64cd\u4f5c100\u53f0\u670d\u52a1\u5668\u4e0d\u4ec5\u6548\u7387\u4f4e\u4e0b&#xff0c;\u8fd8\u6781\u6613\u51fa\u73b0\u4eba\u4e3a\u5931\u8bef\u3002\u672c\u6587\u5c06\u57fa\u4e8eSSH\u534f\u8bae\u5b9e\u73b0100\u53f0\u670d\u52a1\u5668\u7684\u4e00\u952e\u7ba1\u63a7&#xff0c;\u6db5\u76d6\u6279\u91cf\u6267\u884c\u547d\u4ee4\u3001\u6587\u4ef6\u5206\u53d1\u3001\u72b6\u6001\u76d1\u63a7\u7b49\u6838\u5fc3\u529f\u80fd&#xff0c;\u5e76\u7ed3\u5408\u5b9e\u6218\u7ecf\u9a8c\u68b3\u7406\u907f\u5751\u6307\u5357&#xff0c;\u5e2e\u52a9\u4f60\u9ad8\u6548\u3001\u5b89\u5168\u5730\u7ba1\u7406\u670d\u52a1\u5668\u96c6\u7fa4\u3002 \u4e00\u3001\u524d\u7f6e\u51c6\u5907 1. \u6838\u5fc3\u4f9d\u8d56 \u73af\u5883\u8981\u6c42&#xff1a;\u63a7\u5236","og_url":"https:\/\/www.wsisp.com\/helps\/78762.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-27T23:51:19+00:00","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\/78762.html","url":"https:\/\/www.wsisp.com\/helps\/78762.html","name":"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-27T23:51:19+00:00","dateModified":"2026-02-27T23:51:19+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/78762.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/78762.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/78762.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6279\u91cf\u670d\u52a1\u5668\u64cd\u4f5c\u5b9e\u6218\uff1a100\u53f0\u670d\u52a1\u5668\u4e00\u952e\u7ba1\u63a7\uff08\u542b\u811a\u672c+\u907f\u5751\u6307\u5357\uff09"}]},{"@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\/78762","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=78762"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/78762\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=78762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=78762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=78762"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=78762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}