{"id":23424,"date":"2025-04-19T07:47:33","date_gmt":"2025-04-18T23:47:33","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/23424.html"},"modified":"2025-04-19T07:47:33","modified_gmt":"2025-04-18T23:47:33","slug":"%e8%b4%ad%e4%b9%b0%e9%98%bf%e9%87%8c%e4%ba%91ecs%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b%e4%bb%a5%e5%8f%8a%e7%8e%af%e5%a2%83%e9%83%a8%e7%bd%b2","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/23424.html","title":{"rendered":"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72"},"content":{"rendered":"<p>\u5728\u642d\u5efa\u524d\u9700\u8981\u670d\u52a1\u5668&#xff0c;\u8bf7\u6309\u64cd\u4f5c\u6b65\u9aa4\u8fdb\u884c\u9009\u8d2d\u4e0e\u642d\u5efa&#xff0c;\u53ef\u5feb\u901f\u642d\u5efa\u8d77\u5c5e\u4e8e\u81ea\u5df1\u7684\u670d\u52a1\u5668&#xff0c;\u6ca1\u6709\u7684\u53ef\u4ee5\u70b9\u6b64\u8fde\u63a5\u00a0\u00a0 \u00a0\u4e91\u670d\u52a1\u5668-\u963f\u91cc\u4e91<\/p>\n<p>&#xff0c;\u611f \u7d27 \u8bd5 \u8bd5 \u5427&#xff01;\u00a0<\/p>\n<h3>1.\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668<\/h3>\n<p><img decoding=\"async\" alt=\"1675f1b3a9333bb5053c65a9e70c21cc.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234723-6802e48b5c87c.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"b5a8752f5d3d7427a6113b4edb242bd0.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234724-6802e48c0ea48.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"2c8885a8f04ed56c9341359d4e476c86.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234724-6802e48ca71b8.png\" \/><\/p>\n<\/p>\n<p>\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u9009\u62e9\u76f8\u5e94\u7684\u914d\u7f6e&#xff1a;<\/p>\n<p>\u00a0\u670d\u52a1\u5668\u94fe\u63a5&#xff1a;\u4e91\u670d\u52a1\u5668ECS_\u4e91\u4e3b\u673a_\u670d\u52a1\u5668\u6258\u7ba1_\u8ba1\u7b97-\u963f\u91cc\u4e91\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"aee4888381dd9b7d63c0745af2c17b67.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234725-6802e48d9a7d7.png\" \/>\u200b<\/p>\n<p>\u76ee\u524d\u6709\u4e00\u4e2a\u6708\u7684\u670d\u52a1\u5668\u514d\u8d39\u4f53\u9a8c\u65f6\u95f4&#xff0c;\u6211\u9009\u62e9\u4e86\u514d\u8d39\u4f53\u9a8c&#xff0c;\u70b9\u51fb\u540e&#xff0c;\u53ef\u4ee5\u770b\u5230\u4f60\u521a\u624d\u8d2d\u4e70\u7684\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"56fc61c082f5b2981b0bac99320576fe.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234727-6802e48f7b0b4.png\" \/>\u200b<\/p>\n<p>\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8fd9\u91cc\u67e5\u770b\u4f60\u7684\u670d\u52a1\u5668&#xff1a;\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"c74dbe7bd970540426669508042589bd.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234727-6802e48fc93b2.png\" \/>\u200b<\/p>\n<p>\u5230\u8fd9\u91cc\u670d\u52a1\u5668\u5df2\u7ecf\u8d2d\u4e70\u6210\u529f&#xff0c;\u63a5\u4e0b\u6765\u662f\u901a\u8fc7\u5de5\u5177&#xff08;xshell\u3001Termius\u7b49&#xff09;\u53bb\u8fde\u63a5\u4f60\u81ea\u5df1\u7684\u670d\u52a1\u5668&#xff0c;\u65b9\u4fbf\u5b89\u88c5JDK,Mysql,nginx\u7b49\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u662f\u5982\u4f55\u901a\u8fc7\u5de5\u5177\u8fde\u63a5\u670d\u52a1\u5668&#xff1a;<\/p>\n<p>\u8fdc\u7a0b\u767b\u5f55\u4f60\u9700\u8981\u5148\u8bbe\u7f6e\u5bc6\u7801&#xff1a;\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"95b0f9eabca35255566688fad78519bc.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234728-6802e4903e8dc.png\" \/>\u200b<\/p>\n<p><img decoding=\"async\" alt=\"dfbcccb2d8edab165969538147557b74.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234728-6802e490bea89.png\" \/>\u200b<\/p>\n<\/p>\n<p>\u8bbe\u7f6e\u6210\u529f\u540e\u8bb0\u4f4f\u4f60\u8f93\u5165\u7684\u5bc6\u7801&#xff0c;\u5728\u4f60\u670d\u52a1\u5668\u5b9e\u4f8b\u4e2d\u70b9\u51fb\u8fdc\u7a0b\u8fde\u63a5&#xff1a;\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"9fef2bd6ff6f3d36d7c514fad709c25a.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234728-6802e490e310b.png\" \/>\u200b<\/p>\n<p>\u70b9\u51fb\u540e\u51fa\u73b0\u4ee5\u4e0b\u9875\u9762&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"200cae4d4537aa762df50579567857a6.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234729-6802e491884fa.png\" \/>\u200b<\/p>\n<p>\u70b9\u51fb\u540e\u51fa\u73b0\u4e0b\u9762\u9875\u9762&#xff0c;\u8f93\u5165\u4f60\u76846\u4f4d\u5bc6\u7801&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"a3d2ce8102f48c92efd561b74692a194.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234729-6802e491af205.png\" \/>\u200b<\/p>\n<p>\u8f93\u5165\u6b63\u786e\u5bc6\u7801\u540e&#xff0c;\u8f93\u5165\u4f60\u7684\u5b9e\u4f8b\u8d26\u53f7\u548c\u5bc6\u7801\u663e\u793a\u5982\u4e0b\u4ee3\u8868\u6210\u529f&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"79dfaa9eaca72149ca6f762d1f3ae4bf.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234730-6802e492167f7.png\" \/>\u200b<\/p>\n<p>\u00a0\u8981\u662f\u4e0d\u786e\u5b9a\u4f60\u7684\u5b9e\u4f8b\u8d26\u53f7\u548c\u5bc6\u7801\u53ef\u5728\u8fd9\u4e2a\u5730\u65b9\u67e5\u770b&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"eea00199b14d42bbbbe4efaccd5dc0fa.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234730-6802e4925b515.png\" \/>\u200b<\/p>\n<p>\u70b9\u51fb\u91cd\u7f6e\u5bc6\u7801\u540e\u51fa\u73b0\u5982\u4e0b\u9875\u9762&#xff0c;\u53ef\u67e5\u770b\u8d26\u53f7\u548c\u5bc6\u7801&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"d03d3d106fc1d476fe03488bf733c3ba.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234730-6802e492e5bb8.png\" \/>\u200b<\/p>\n<p>\u81f3\u6b64\u6574\u4e2a\u963f\u91cc\u4e91\u670d\u52a1\u5668\u7684\u7533\u8bf7\u5c31\u7b97\u5b8c\u6210\u4e86\u3002<\/p>\n<p> \u00a0\u670d\u52a1\u5668\u94fe\u63a5&#xff1a;\u4e13\u4eab\u963f\u91cc\u4e91   2.Xshell \u7684\u5b89\u88c5\u4f7f\u7528<\/p>\n<p>\u7b80\u5355\u6d4b\u8bd5\u4e00\u4e0b&#xff0c;\u4f60\u4f1a\u53d1\u73b0\u7f51\u9875\u767b\u9646\u4e91\u670d\u52a1\u5668\u7684\u65b9\u5f0f\u6709\u4e00\u4e2a\u5f0a\u7aef&#xff0c;\u90a3\u5c31\u662f\u53ea\u8981\u4e00\u5c0f\u6bb5\u65f6\u95f4\u4e0d\u64cd\u4f5c&#xff0c;\u670d\u52a1\u5668\u5c31\u4f1a\u8fdb\u5165\u4f11\u7720&#xff0c;\u53c8\u5f97\u8f93\u5165\u8fde\u63a5\u5bc6\u7801\u624d\u80fd\u6fc0\u6d3b&#xff0c;\u5f88\u70e6\u3002\u6240\u4ee5\u6211\u4eec\u91c7\u7528\u522b\u7684\u65b9\u5f0f\u767b\u5f55\u8fd9\u4e2a\u4e91\u670d\u52a1\u5668\u3002<\/p>\n<p>2.2 Xshell\u662f\u4e00\u4e2a\u7ec8\u7aef\u6a21\u62df\u8f6f\u4ef6&#xff0c;\u6362\u8a00\u4e4b&#xff0c;\u6211\u4eec\u53ea\u8981\u5728\u672c\u5730Windows\u7cfb\u7edf\u4e0b\u5b89\u88c5\u8fd9\u4e2a\u8f6f\u4ef6&#xff0c;\u6253\u5f00\u8f93\u5165\u8d26\u53f7\u5bc6\u7801&#xff0c;\u5c31\u80fd\u767b\u5f55\u8fdc\u7a0b\u7684\u4e91\u670d\u52a1\u5668<\/p>\n<p>2.3 Xshell\u4e0b\u8f7d\u5b98\u7f51&#xff1a;https:\/\/xshell.en.softonic.com\/&#xff08;\u5982\u679c\u5b98\u7f51\u4e0b\u8f7d\u592a\u6162&#xff0c;\u53ef\u4ee5\u767e\u5ea6\u4e00\u4e0bXshell&#xff0c;\u5f88\u591a\u8d44\u6e90&#xff0c;\u4e0b\u8f7d\u6700\u65b0\u7248\u7684\u5c31\u884c&#xff0c;\u6211\u7528\u7684\u662fXshell 7 &#xff09;<\/p>\n<p>2.4 \u4e0b\u8f7d\u5b8c\u4e86\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u5f00\u59cb\u5b89\u88c5&#xff0c;\u8fd9\u4e2a\u8f6f\u4ef6\u5f88\u5c0f&#xff0c;\u5b89\u88c5\u4e5f\u7b80\u5355&#xff0c;\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u51fa\u73b0\u95ee\u9898&#xff08;\u65b0\u624b\u7684\u6211\u4e5f\u4e00\u8def\u7545\u901a&#xff09;<\/p>\n<p>2.5 \u6253\u5f00Xshell\u4eec\u53ef\u4ee5\u770b\u5230\u5982\u4e0b\u754c\u9762&#xff1a; <img decoding=\"async\" alt=\"cdfefd4fed9838e5acaaf865c440dd16.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234731-6802e493195dc.png\" \/>\u200b<\/p>\n<p>2.6 \u65b0\u5efa\u4e00\u4e2a\u4f1a\u8bdd&#xff0c;\u62ff\u51fa\u4e4b\u524d\u7684\u7b14\u8bb0&#xff0c;\u5c06\u516c\u7f51IP\u8f93\u5165\u5230\u4e3b\u673a\u680f&#xff0c;\u7aef\u53e3\u53f7\u8bbe\u7f6e\u4e3a22&#xff08;\u670d\u52a1\u5668\u7684\u76d1\u542c\u7aef\u53e3&#xff0c;ftp\u9ed8\u8ba4\u4e3a21&#xff0c;sftp\u4e3a22&#xff0c;\u5982\u679c\u4f60\u8bbe\u7f6e22\u8fde\u4e0d\u8fdb\u53bb&#xff0c;\u90a3\u5c31\u636221\u8bd5\u4e00\u4e0b&#xff09;<\/p>\n<p><img decoding=\"async\" alt=\"d91847396d42f4c620a22ba9a9f5e971.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234731-6802e49341117.png\" \/>\u200b<\/p>\n<p>2.7 \u70b9\u51fb \u201d\u786e\u5b9a\u201d&gt;&gt;\u201c\u8fde\u63a5\u201d&#xff0c;\u7ee7\u7eed\u62ff\u51fa\u7b14\u8bb0&#xff0c;\u628a\u670d\u52a1\u5668\u8d26\u53f7\u586b\u8fdb\u201c\u767b\u5f55\u7684\u7528\u6237\u540d\u201d&#xff0c;\u628a\u670d\u52a1\u5668\u5bc6\u7801\u586b\u8fdb\u201c\u5bc6\u7801\u201d&#xff0c;\u5982\u4e0b\u56fe\u3002<\/p>\n<p><img decoding=\"async\" alt=\"7fff1b86db8d9cfd145975d4c128d88a.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234731-6802e49368e1b.png\" \/>\u200b<\/p>\n<p><img decoding=\"async\" alt=\"50393ad67ca2e68f5ba392a0da16c262.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234731-6802e49386c51.png\" \/>\u200b<\/p>\n<p>2.8 \u767b\u5f55\u6210\u529f&#xff0c;\u8fdb\u5165\u670d\u52a1\u5668\u3002\u4ee5\u540e\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u754c\u9762\u5bf9\u4e91\u670d\u52a1\u5668\u8fdb\u884c\u8fdc\u7a0b\u64cd\u63a7&#xff0c;\u5728\u4e0a\u9762\u8fdb\u884cjdk&#xff0c;mysql\u5b89\u88c5&#xff0c;springboot\u90e8\u7f72\u7b49\u64cd\u4f5c\u4e86\u3002 \u00a0<img decoding=\"async\" alt=\"d0cb96b940639c5f7116166fe3694172.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234731-6802e493a8811.png\" \/>\u200b<\/p>\n<\/p>\n<h3>3\u3001ECS\u670d\u52a1\u5668\u5b89\u88c5JDK\u6b65\u9aa4&#xff1a;<\/h3>\n<p>SpringBoot\u9879\u76ee\u91cc\u81ea\u5e26\u4e86Tomacat&#xff0c;\u6240\u4ee5\u6211\u4eec\u4e0d\u9700\u8981\u518d\u53bb\u670d\u52a1\u5668\u5b89\u88c5\u3002\u6240\u9700\u8981\u5b89\u88c5\u7684\u662fJDK(\u4f60\u60f3\u8981\u90e8\u7f72\u9879\u76ee\u7684JDK\u7248\u672c)\u3002<\/p>\n<p>3.1 \u5148\u7528Xshell \u8fde\u63a5\u5230\u4f60\u7684\u4e91\u670d\u52a1\u5668&#xff08;\u6216\u8005\u76f4\u63a5\u5728\u963f\u91cc\u4e91\u5b98\u7f51\u4e2d\u8fdc\u7a0b\u8fde\u63a5\u4e5f\u884c&#xff09;<\/p>\n<p>3.2 \u5728\u4f60\u7684\u672c\u5730Windows\u7cfb\u7edf\u4e2d\u4e0b\u8f7d Linux\u7cfb\u7edf\u4e0b\u7684jdk&#xff0c;jdk\u4e0b\u8f7d\u5b98\u7f51&#xff1a;https:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jdk8-downloads-2133151.html\u3002\u4e0b\u8f7d\u4f60\u9700\u8981\u7684jdk\u7248\u672c&#xff0c;\u6211\u7528\u7684\u662f jdk-8u261-linux-x64.tar.gz<\/p>\n<p>\u5728\u5b98\u7f51\u4e0a\u9700\u8981Oracle\u7684\u8d26\u53f7&#xff0c;\u56e0\u4e3a\u6211\u6ca1\u6709Oracle\u8d26\u53f7&#xff0c;\u6211\u5728CSDN\u4e0a\u627e\u4e86\u4e00\u4e2ajdk-8u261-linux-x64.tar.gz\u5305\u3002<\/p>\n<p><img decoding=\"async\" alt=\"eeb1afe81ebf02e2452b25515a8e7dcc.png\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234731-6802e493cde43.png\" \/>\u200b<\/p>\n<p>\u5f97\u5230tar\u5305\u540e&#xff0c;\u4f60\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u5b58\u653e\u5305\u7684\u6587\u4ef6\u5939&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"760ae5ec38a14aa1328b3923c3b13a53.png\" src=\"2025-04-19axtbvjqwz1x.png\" \/>\u200b<\/p>\n<p>\u00a0\u5207\u6362\u5230\u5bf9\u5e94\u76ee\u5f55&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"8d6d9f2ee1493f25868c0f10242679d0.png\" src=\"2025-04-19kzvbylbllpq.png\" \/>\u200b<\/p>\n<p>\u00a0\u6211\u5728\u5bf9\u5e94\u7684\u5305\u4e0b\u521b\u5efa\u4e86java\u5305&#xff0c;\u7528\u6765\u4fdd\u5b58jdk:<\/p>\n<p><img decoding=\"async\" alt=\"12b685069f6725de3362cbe116a4b2e6.png\" src=\"2025-04-19bp001ypjwrf.png\" \/>\u200b<\/p>\n<p>\u00a0<img decoding=\"async\" alt=\"ff5ddfde5b0589f66e9e1fb2cb28786a.png\" src=\"2025-04-19rpcykgk3cdg.png\" \/>\u200b<\/p>\n<p>\u73b0\u5728\u6211\u4eec\u9700\u8981\u628atar\u4f20\u5230\u8fd9\u4e2a\u76ee\u5f55\u5982\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"fb01e14c146467d35610119b955714ac.png\" src=\"2025-04-190dsi12xv4h4.png\" \/>\u200b<\/p>\n<\/p>\n<p>\u00a0\u00a0\u7136\u540e\u6211\u4eec\u8981\u628a\u8fd9\u4e2a\u6587\u4ef6\u4f20\u5230\u4e91\u670d\u52a1\u5668\u4e0a\u53bb\u3002\u542c\u8d77\u6765\u5f88\u9ad8\u7aef&#xff0c;\u5176\u5b9e\u5f88\u7b80\u5355\u7684\u3002\u5728Xshell\u4e0a\u6267\u884crz\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b9e\u73b0\u3002\u9996\u5148\u6211\u4eec\u8981\u5728\u4e91\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u8fd9\u4e2a\u547d\u4ee4\u3002\u5728Xshell\u4e2d\u6267\u884c<\/p>\n<p> yum install lrzsz<\/p>\n<p><img decoding=\"async\" alt=\"1cb9a08b9f13599cb52d767b41ccd9b8.png\" src=\"2025-04-19qsfwy1rgqxz.png\" \/>\u200b<\/p>\n<p>\u6211\u4eec\u8981\u628a\u4e0a\u4f20\u7684\u6587\u4ef6\u653e\u5230\u54ea\u4e2a\u76ee\u5f55&#xff0c;\u5c31\u8981\u5148cd\u8fdb\u5165\u90a3\u4e2a\u76ee\u5f55\u3002\u6211\u4eec\u7533\u8bf7\u7684\u670d\u52a1\u5668\u7684\u521d\u59cb\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b&#xff1a;&#xff08;cd\u547d\u4ee4&#xff1a;\u8fdb\u5165\u76ee\u5f55&#xff09;<\/p>\n<p>\u4f8b\u5982&#xff1a;\u6211\u73b0\u5728\u6211\u60f3\u628ajdk\u4fdd\u5b58\u5230&#xff0c;\/root\/user\/java\u8fd9\u4e2a\u76ee\u5f55\u4e0b&#xff0c;\u8fd9\u4e2a\u76ee\u5f55\u4e5f\u662f\u521a\u624d\u6211\u4eec\u81ea\u5df1\u521b\u5efa\u7684&#xff0c;\u7528cd\u547d\u4ee4\u5207\u6362\u5230\u5bf9\u5e94\u76ee\u5f55&#xff1a;<\/p>\n<p>  cd \/root\/user\/java\/ <\/p>\n<p><img decoding=\"async\" alt=\"1e94d51088ce9c140e6f70c73381b03e.png\" src=\"2025-04-19ww3rs30fici.png\" \/>\u200b\u7136\u540e\u00a0rz\u00a0\u628a\u5b89\u88c5\u5305\u4e0a\u4f20\u4e0a\u53bb&#xff08;rz\u547d\u4ee4&#xff1a;\u4e0a\u4f20\u6587\u4ef6&#xff09;<\/p>\n<p> rz <\/p>\n<p>\u6267\u884crz\u547d\u4ee4\u4f1a\u5f39\u51fa\u4e00\u4e2a\u6587\u4ef6\u9009\u62e9\u6846&#xff0c;\u9009\u62e9\u5b89\u88c5\u5305\u4e0a\u4f20&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"96d1a874374ab1c9d31b570a62e71250.png\" src=\"2025-04-190jk1rd1vnvr.png\" \/>\u200b<\/p>\n<\/p>\n<p>\u00a0\u4e0a\u4f20\u4e2d&#xff0c;\u7b49\u5f85\u4e0a\u4f20\u5b8c\u6bd5&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"5dbedbab019605b6517965de870fe5b9.png\" src=\"2025-04-19penys5okw2u.png\" \/>\u200b<\/p>\n<p>\u4f20\u8f93\u5b8c\u6bd5&#xff0c;\u70b9\u51fb\u201c\u5173\u95ed\u201d<\/p>\n<p><img decoding=\"async\" alt=\"24b88099bedc871aab2d14b8a240aa90.png\" src=\"2025-04-19lmevjzukeyy.png\" \/>\u200b<\/p>\n<p>\u4f7f\u7528ls\u547d\u4ee4\u67e5\u770b\u76ee\u5f55\u3002\u53ef\u4ee5\u770b\u5230&#xff0c;\u6211\u4eec\u521a\u624d\u4e0a\u4f20\u7684\u5b89\u88c5\u5305\u5df2\u7ecf\u5b58\u5728\u4e8e\u76ee\u5f55\u4e2d\u4e86&#xff08;ls\u547d\u4ee4&#xff1a;\u67e5\u770b\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6&#xff09;<\/p>\n<p> ls <\/p>\n<p>\u56e0\u4e3a\u6211\u7684\u4e4b\u524d\u89e3\u538b\u8fc7\u4e00\u6b21&#xff0c;\u6240\u6709\u4f1a\u6709\u4e00\u4e2a\u84dd\u8272\u7684\u5305&#xff0c;\u4e0d\u5fc5\u5728\u610f&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"56be947c212bf3f5ff49ed54c14ba803.png\" src=\"2025-04-19dpnatkrtcpp.png\" \/>\u200b<\/p>\n<p>\u63a5\u4e0b\u6765\u89e3\u538b\u5b89\u88c5\u5305\u5c31\u7b97\u5b89\u88c5\u6210\u529f\u4e86&#xff01;\u4f7f\u7528tar\u547d\u4ee4\u89e3\u538b\u538b\u7f29\u5305&#xff0c;\u5982\u679c\u4f60\u4e0b\u8f7d\u7684\u7248\u672c\u8ddf\u6211\u4e0d\u4e00\u6837&#xff0c;\u8bb0\u5f97\u628a\u5305\u540d\u6539\u6210\u4f60\u81ea\u5df1\u7684\u7248\u672c \u3002&#xff08;tar\u547d\u4ee4&#xff1a;\u89e3\u538b&#xff09;<\/p>\n<p> tar -zxvf jdk-8u261-linux-x64.tar.gz <\/p>\n<p>\u89e3\u538b\u5b8c\u6210\u540e\u5c31\u4f1a\u6709\u5982\u4e0b\u84dd\u8272\u7684\u5305&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"e31c75411ca989fd5c423dd86ff832a4.png\" src=\"2025-04-19niznsl2pmzm.png\" \/>\u200b<\/p>\n<p>\u8ddf\u4f60\u5728windows\u7cfb\u7edf\u4e0b\u5b89\u88c5\u5b8cjdk\u4e00\u6837&#xff0c;\u4f60\u8fd8\u8981\u8bbe\u7f6e\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u3002linux\u7cfb\u7edf\u4e2d\u7684\u8bbe\u7f6e\u65b9\u6cd5\u4e3a&#xff1a;\u627e\u5230\u6587\u4ef6 \/etc\/profile &#xff0c;\u5411\u5176\u4e2d\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801&#xff1a;<\/p>\n<p>\u5148cd\u8fdb\u76ee\u5f55 \/etc &#xff0c;\u518d\u4f7f\u7528\u00a0vim\u547d\u4ee4\u7f16\u8f91\u6587\u4ef6profile&#xff08;vim\u547d\u4ee4&#xff1a;\u7f16\u5199\u4fee\u6539\u6587\u4ef6\u5185\u5bb9&#xff09;&#xff0c;\u8be5\u6587\u4ef6\u7c7b\u4f3c\u4e8ewindows\u7cfb\u7edf\u4e0b\u8bbe\u7f6e\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>cd \/etc<\/p>\n<\/li>\n<li>\n<p>vim profile<\/p>\n<\/li>\n<p><img decoding=\"async\" alt=\"7e5497ca3332ec38644072b124fb2687.png\" src=\"2025-04-19o5fgnfqp5ug.png\" \/>\u200b<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>export JAVA_HOME&#061;\/root\/user\/java\/jdk1.8.0_261<\/p>\n<\/li>\n<li>\n<p>export CLASSPATH&#061;$JAVA_HOME\/lib\/<\/p>\n<\/li>\n<li>\n<p>export PATH&#061;$PATH:$JAVA_HOME\/bin<\/p>\n<\/li>\n<li>\n<p>export PATH JAVA_HOME CLASSPATH<\/p>\n<\/li>\n<p>\u00a0\u8fdb\u6765\u4ee5\u540e\u662f\u4e0b\u9762\u8fd9\u4e2a\u754c\u9762&#xff0c;\u6309i \u952e\u5165\u7f16\u8f91,\u5728\u6587\u4ef6\u6700\u540e\u6dfb\u52a0\u5982\u4e0a\u5185\u5bb9\u3002\u5176\u4e2dexport JAVA_HOME&#061;\/root\/user\/java\/jdk1.8.0_261\u4e3a\u4f60\u89e3\u538b\u5f97\u5230\u84dd\u8272\u5305\u540d\u7684\u8def\u5f84\u3002<\/p>\n<p><img decoding=\"async\" alt=\"2f5ca474791adeaa0579f6ca71f3f84b.png\" src=\"2025-04-19cw0fwvronqe.png\" \/>\u200b<\/p>\n<p>\u00a0\u5728\u6587\u4ef6\u7684\u6700\u540e\u628a\u4e0a\u9762\u7684\u4ee3\u7801\u6253\u8fdb\u53bb&#xff0c;\u5982\u679c\u4f60\u7684jdk\u7248\u672c\u8ddf\u6211\u4e0d\u4e00\u6837&#xff0c;\u8bb0\u5f97\u628a\u00a0export JAVA_HOME&#061;\/root\/user\/java\/jdk1.8.0_261\u00a0\u8fd9\u4e00\u884c\u6539\u6210\u4f60\u81ea\u5df1\u7684\u7248\u672c\u3002\u7136\u540e\u6309ESC\u952e\u9000\u51fa\u7f16\u8f91&#xff0c;\u8f93\u5165\u00a0:wq\u00a0&#043; \u56de\u8f66\u952e\u4fdd\u5b58\u9000\u51fa\u6587\u4ef6\u3002<\/p>\n<p><img decoding=\"async\" alt=\"b92f524469f3e23f4feab4c634c1cc17.png\" src=\"2025-04-19h3baxztdy2o.png\" \/>\u200b<\/p>\n<p>\u67e5\u770b\u6587\u4ef6\u662f\u5426\u4fdd\u5b58\u6210\u529f\u3002<\/p>\n<p> cat profile <\/p>\n<p>\u00a0<img decoding=\"async\" alt=\"4cabc2c4bf514b501ca0de695c02d98d.png\" src=\"2025-04-19bq4lzzom4kf.png\" \/>\u200b<\/p>\n<p><img decoding=\"async\" alt=\"00ff491403c7c6d2c6585067e03d7a19.png\" src=\"2025-04-19drkte022eoe.png\" \/>\u200b\u00a0\u7acb\u5373\u6267\u884cprofile\u6587\u4ef6&#xff0c;\u4f7f\u4e4b\u751f\u6548&#xff0c;\u4f7f\u7528source\u547d\u4ee4&#xff08;source\u547d\u4ee4&#xff1a;\u4f9d\u6b21\u6267\u884c\u6587\u4ef6\u6240\u6709\u8bed\u53e5&#xff09;<\/p>\n<p> source \/etc\/profile <\/p>\n<p>\u00a0<img decoding=\"async\" alt=\"aadcdc11cc5b012486dd7201b1de1f18.png\" src=\"2025-04-190aksk0lqd3r.png\" \/>\u200b<\/p>\n<p>\u5230\u8fd9\u4e00\u6b65&#xff0c;jdk\u7684\u5b89\u88c5\u5c31\u5168\u90e8\u5b8c\u6210\u4e86\u3002\u6700\u540e&#xff0c;\u6211\u4eec\u518d\u4f7f\u7528java\u547d\u4ee4\u9a8c\u8bc1\u4e00\u4e0b&#xff0c;\u5982\u679c\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u7684\u7248\u672c\u4fe1\u606f\u5c31\u53ef\u4ee5\u4e86\u3002\u00a0\u00a0<\/p>\n<p> java -version <\/p>\n<p>\u00a0\u8f93\u5165\u547d\u4ee4\u540e&#xff0c;\u5f97\u5230\u4e00\u4e0b\u7ed3\u679c&#xff0c;\u8bc1\u660e\u5b89\u88c5\u6210\u529f&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"4f29a1cfd4c992b8665d4d37759b2ace.png\" src=\"2025-04-19ay0qgkiku34.png\" \/>\u200b<\/p>\n<h3>\u00a04.linux\u4e91\u670d\u52a1\u5668\u5b89\u88c5mysql<\/h3>\n<p>4.1 \u542f\u52a8Xshell&#xff0c;\u8fde\u63a5\u963f\u91cc\u4e91\u670d\u52a1\u5668<\/p>\n<p>4.2 \u68c0\u67e5\u7cfb\u7edf\u6709\u6ca1\u6709\u81ea\u5e26mysql&#xff1b;<\/p>\n<p> rpm -qa | grep mysql <\/p>\n<p>4.3 \u4e00\u822c\u60c5\u51b5\u662f\u6ca1\u6709\u7684&#xff0c;\u4f46\u5982\u679c\u6709&#xff0c;\u5c31\u5378\u8f7d<\/p>\n<p> rpm -e &#8211;nodeps mysql <\/p>\n<p>4.4\u5b89\u88c5mysql5.*\u7248\u672c&#xff0c;\u770b\u81ea\u5df1\u9700\u6c42\u5b89\u88c5<\/p>\n<p>MySQL 5.7 Linux\u5b89\u88c5\u5305 \u5b98\u7f51\u4e0b\u8f7d&#xff1a;https:\/\/dev.mysql.com\/downloads\/mysql\/<\/p>\n<p>\u9009\u62e9\u4f60\u7684\u955c\u50cf\u7248\u672c\u548c\u76ee\u524d\u6700\u65b0\u662f8.*\u7248\u672c&#xff0c;\u5982\u679c\u9700\u8981\u5176\u4ed6\u672c\u90e8\u70b9\u51fb\u53f3\u4fa7\u5982\u4e0b\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"f31ecc0642acfc65ce159dd8d7998bd5.png\" src=\"2025-04-19xvjne0kfq2g.png\" \/>\u200b<\/p>\n<p>\u00a08.*\u7248\u672c&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"8871d26719d1dd86a8edc2150f616dca.png\" src=\"2025-04-19zzvbt4ecnwj.png\" \/>\u200b<\/p>\n<\/p>\n<p>\u4ee5\u4e0b\u662f\u5176\u4ed6\u7248\u672c&#xff0c;\u9009\u62e9\u4f60\u9700\u8981\u7684\u7248\u672c&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"f6f6dcd03bb407a4623b84abac662a34.png\" src=\"2025-04-19tcgberu5uzb.png\" \/>\u200b<\/p>\n<p>\u5c06\u4e0b\u8f7d\u7684\u538b\u7f29\u5305\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e2d&#xff0c;\u6211\u81ea\u5df1\u5728root\u76ee\u5f55\u4e0buser\u4e2d\u521b\u5efa\u4e00\u4e2amysql\u5305\u7528\u6765\u4fdd\u5b58\u4e0b\u8f7d\u7684tar\u5305\u3002<\/p>\n<p>\u5207\u6362\u5230\u5bf9\u5e94\u76ee\u5f55&#xff1a;<\/p>\n<p> cd \/root\/user\/mysql\/<\/p>\n<p><img decoding=\"async\" alt=\"d137458861279051e011cfba5db96a5b.png\" src=\"2025-04-19diltv5cjngi.png\" \/>\u200b<\/p>\n<p>\u901a\u8fc7rz,\u628a\u4e0b\u8f7d\u7684tar\u5305\u4e0a\u4f20\u5230\u670d\u52a1\u5668&#xff1a;<\/p>\n<p> rz <\/p>\n<p>\u00a0\u6210\u529f\u540e&#xff0c;\u89e3\u538b\u521a\u4e0b\u56de\u6765\u7684tar\u5305&#xff0c;\u5f97\u5230rpm\u5305<\/p>\n<p> sudo tar -zvxf mysql-5mysql-5.7.33-1.el7.x86_64.rpm-bundle.tar  <\/p>\n<p><img decoding=\"async\" alt=\"13b08732a352b82250a198639f4f5c5a.png\" src=\"2025-04-193r3tj1530a3.png\" \/>\u200b\u67e5\u8be2\u5e76\u5378\u8f7d\u7cfb\u7edf\u81ea\u5e26\u7684Mariadb<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>rpm -qa | grep mariadb<\/p>\n<\/li>\n<li><\/li>\n<li>\n<p>rpm -e &#8211;nodeps \u663e\u793a\u51fa\u7684\u6587\u4ef6\u540d<\/p>\n<\/li>\n<p>\u67e5\u8be2\u5e76\u5378\u8f7d\u7cfb\u7edf\u8001\u65e7\u7248\u672c\u7684Mysql<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>rpm -qa | grep mysql<\/p>\n<\/li>\n<li>\n<p>rpm -e &#8211;nodeps \u663e\u793a\u51fa\u7684\u6587\u4ef6\u540d<\/p>\n<\/li>\n<p>\u5982\u679c\u8fd9\u4e24\u4e2a\u90fd\u6ca1\u6709\u5219\u4ec0\u4e48\u90fd\u4e0d\u4f1a\u663e\u793a&#xff0c;\u8fd9\u5c31\u53ef\u4ee5\u7701\u4e00\u534a\u7684\u5fc3\u4e86\u3002<\/p>\n<p>\u5f00\u59cb\u6b63\u5f0f\u5b89\u88c5&#xff1a;1.\u627e\u5230\u4f60\u89e3\u538b\u51fa\u6765\u5bf9\u5e94\u5305\u6267\u884cRpm\u5305\u5b89\u88c5\u3002\u6ce8\u610f\u770b\u4f60\u7684\u6570\u636e\u5e93\u7248\u672c\u3002\u5b89\u88c5\u7684\u987a\u5e8f\u5fc5\u987b\u5982\u4e0b&#xff0c;\u56e0\u4e3a\u6709\u7684\u5305\u4e4b\u95f4\u6709\u4f9d\u8d56\u5173\u7cfb&#xff0c;\u987a\u5e8f\u4e0d\u4e00\u6837\u4f1a\u62a5\u9519\u3002<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>rpm -ivh mysql-community-common-5.7.27-1.el7.x86_64.rpm<\/p>\n<\/li>\n<li><\/li>\n<li>\n<p>rpm -ivh mysql-community-libs-5.7.27-1.el7.x86_64.rpm<\/p>\n<\/li>\n<li><\/li>\n<li>\n<p>rpm -ivh mysql-community-devel-5.7.27-1.el7.x86_64.rpm<\/p>\n<\/li>\n<li><\/li>\n<li>\n<p>rpm -ivh mysql-community-libs-compat-5.7.27-1.el7.x86_64.rpm<\/p>\n<\/li>\n<li><\/li>\n<li>\n<p>rpm -ivh mysql-community-client-5.7.27-1.el7.x86_64.rpm<\/p>\n<\/li>\n<li><\/li>\n<li>\n<p>rpm -ivh mysql-community-server-5.7.27-1.el7.x86_64.rpm<\/p>\n<\/li>\n<p>\u00a0\u8fd9\u51e0\u6b65\u90fd\u6ca1\u9519\u4ee3\u8868\u5b89\u88c5\u5b8c\u6210\u3002<\/p>\n<p>\u5728\u5b89\u88c5\u65f6\u6211\u9047\u5230\u7684\u9519\u8bef&#xff0c;\u5b89\u88c5\u8fd9\u4e2a\u4f1a\u62a5\u7f3a\u5c11\u4f9d\u8d56&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"ad5ab4dbc626621d8464250584cb83d8.png\" src=\"2025-04-190xb1o0sqnog.png\" \/>\u200b<\/p>\n<p>\u00a0\u53ea\u8981\u6dfb\u52a0\u5982\u4e0b\u4f9d\u8d56\u5728\u5b89\u88c5&#xff1a;<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>\u89e3\u51b3\u529e\u6cd5&#xff1a;<\/p>\n<\/li>\n<li>\n<p>yum install compat-openssl10<\/p>\n<\/li>\n<li><\/li>\n<p>1.\u00a0\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n<p> systemctl start mysqld <\/p>\n<p>2. \u542f\u52a8mysql\u670d\u52a1<\/p>\n<p>\u67e5\u770bmysql\u670d\u52a1\u662f\u5426\u542f\u52a8<\/p>\n<p> service mysqld status <\/p>\n<p>3. \u91cd\u7f6eroot\u5bc6\u7801 MySQL5.7\u4f1a\u5728\u5b89\u88c5\u540e\u4e3aroot\u7528\u6237\u751f\u6210\u4e00\u4e2a\u968f\u673a\u5bc6\u7801&#xff0c;\u800c\u4e0d\u662f\u50cf\u4ee5\u5f80\u7248\u672c\u7684\u7a7a\u5bc6\u7801\u3002 \u53ef\u4ee5\u5b89\u5168\u6a21\u5f0f\u4fee\u6539root\u767b\u5f55\u5bc6\u7801\u6216\u8005\u7528\u968f\u673a\u5bc6\u7801\u767b\u5f55\u4fee\u6539\u5bc6\u7801\u3002\u4e0b\u9762\u7528\u968f\u673a\u5bc6\u7801\u65b9\u5f0f MySQL\u4e3aroot\u7528\u6237\u751f\u6210\u7684\u968f\u673a\u5bc6\u7801\u901a\u8fc7mysqld.log\u6587\u4ef6\u53ef\u4ee5\u67e5\u627e\u5230&#xff1a;<\/p>\n<p> sudo grep &#039;temporary password&#039; \/var\/log\/mysqld.log <\/p>\n<p>4. \u4fee\u6539root\u7528\u6237\u5bc6\u7801 (MySQL\u7684\u5bc6\u7801\u7b56\u7565\u6bd4\u8f83\u590d\u6742,\u8981\u5927\u5c0f\u5199&#xff0c;\u8fc7\u4e8e\u7b80\u5355\u7684\u5bc6\u7801\u4f1a\u88ab\u62d2\u7edd<\/p>\n<p>mysql -u root -p mysql&gt; Enter password: &#xff08;\u8f93\u5165\u521a\u624d\u67e5\u8be2\u5230\u7684\u968f\u673a\u5bc6\u7801&#xff09; mysql&gt; SET PASSWORD &#061; PASSWORD(&#039;\u81ea\u5df1\u8bbe\u7f6e\u5bc6\u7801&#039;); \u00a0 \u00a0 \u00a0\/*\u6ce8\u610f\u540e\u9762\u4e00\u5b9a\u8981\u52a0\u4e0a\u201c&#xff1b;\u201d\u4e0d\u7136\u53ef\u80fd\u65e0\u6cd5\u6267\u884c*\/ mysql&gt; exit<\/p>\n<p>5\u3001\u5f00\u653e\u8fdc\u7a0b\u8fde\u63a5<\/p>\n<p>mysql&gt;use mysql; mysql&gt;update user set user.Host&#061;&#039;%&#039; where user.User&#061;&#039;root&#039;; mysql&gt;flush privileges;<\/p>\n<p> 6.\u4e0b\u4e00\u6b65\u5f00\u653e\u5916\u90e8\u7f51\u6bb5\u8bbf\u95ee3306\u7aef\u53e3\u3002<\/p>\n<p>\u00a0mysql&gt;GRANT ALL PRIVILEGES ON *.* TO &#039;root&#039;&#064;&#039;%&#039; IDENTIFIED BY &#039;\u81ea\u5df1\u8bbe\u7f6e\u7684\u5bc6\u7801&#039; WITH GRANT OPTION;<\/p>\n<p>mysql&gt;FLUSH PRIVILEGES;<\/p>\n<p>\u00a0mysql&gt;exit;<\/p>\n<p>7.\u67e5\u770b\u9632\u706b\u5899\u914d\u7f6e3306\u7aef\u53e3 \u67e5\u8be2\u9632\u706b\u5899\u72b6\u6001:<\/p>\n<p> systemctl status firewalld.service <\/p>\n<p>8.\u5f00\u542f\u9632\u706b\u5899mysql 3306\u7aef\u53e3\u7684\u5916\u90e8\u8bbf\u95ee&#xff1a;<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;3306\/tcp &#8211;permanent;\u00a0\/*\u6ce8\u610f\u540e\u9762\u90fd\u8981\u5e26\u5206\u53f7\u201c&#xff1b;\u201d*\/<\/p>\n<\/li>\n<li>\n<p>firewall-cmd &#8211;reload;<\/p>\n<\/li>\n<p>\u00a0\u4f46\u4f60\u6267\u884c\u4ee5\u4e0a\u6b65\u9aa4\u65f6\u62a5\u5982\u4e0b\u9519\u662f\u56e0\u4e3a\u6ca1\u6253\u5f00\u9632\u706b\u5899&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"5ebfa7c5b2b504ecf7faeb16d640e57f.png\" src=\"2025-04-19wcqu4g5lkq0.png\" \/>\u200b<\/p>\n<p>\u00a0\u6253\u5f00\u9632\u706b\u5899\u5373\u53ef&#xff1a;<\/p>\n<p>\u901a\u8fc7\u00a0 systemctl start firewalld\u00a0 \u5f00\u542f\u9632\u706b\u5899&#xff0c;\u6ca1\u6709\u4efb\u4f55\u63d0\u793a\u5373\u5f00\u542f\u6210\u529f\u3002<\/p>\n<p> systemctl start firewalld <\/p>\n<p>9.\u4f7f\u7528\u6570\u636e\u5e93\u8f6f\u4ef6\u9a8c\u8bc1\u662f\u5426\u6b63\u5e38\u5de5\u4f5c<\/p>\n<p>\u5728\u8fde\u63a5\u4e4b\u524d\u4f60\u9700\u8981\u5728\u670d\u52a1\u5668\u4e2d\u7ed9\u6570\u636e\u5e93\u76843306\u7aef\u53e3\u6dfb\u52a0\u5230\u5b89\u5168\u7ec4\u4e2d&#xff0c;\u5728\u5b9e\u4f8b\u5217\u8868\u4e2d\u5c31\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u8d2d\u4e70\u7684\u4e91\u670d\u52a1\u5668\u3002\u70b9\u8fdb\u53bb&#xff0c;\u6211\u4eec\u9700\u8981\u5bf9\u670d\u52a1\u5668\u7684\u5b89\u5168\u7ec4\u8fdb\u884c\u8bbe\u7f6e&#xff1b;<\/p>\n<p><img decoding=\"async\" alt=\"f2deb66635d58c9f5f3b766efae2f151.png\" src=\"2025-04-19kz1aff5uxwa.png\" \/>\u200b<\/p>\n<\/p>\n<p>\u5b89\u5168\u7ec4\u4e2d\u9664\u4e86\u81ea\u5e26\u7684\u89c4\u5219&#xff0c;\u6211\u4eec\u8fd8\u9700\u8981\u6dfb\u52a0\u51e0\u4e2a\u65b0\u7684\u5b89\u5168\u7ec4&#xff08;\u8fd9\u4e9b\u5b89\u5168\u7ec4\u7684\u5177\u4f53\u4f5c\u7528\u53ef\u4ee5\u770b\u5176\u4ed6\u535a\u4e3b\u7684\u6587\u7ae0&#xff09;<\/p>\n<p><img decoding=\"async\" alt=\"9e2b3290d70d9ca94a9afbe9f0197578.png\" src=\"2025-04-19anokb3tcpif.png\" \/>\u200b<\/p>\n<p><img decoding=\"async\" alt=\"2aaeba2636f0b19dbc7b55e9f44e2f35.png\" src=\"2025-04-19cqeko1qz34n.png\" \/>\u200b<\/p>\n<\/p>\n<p><img decoding=\"async\" alt=\"3b4771b58bd97be8c7ddf46f2c49731c.png\" src=\"2025-04-19kj3l2akwwvb.png\" \/>\u200b<\/p>\n<p>\u5b8c\u6210\u8fd9\u4e9b\u9519\u8bef\u540e&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u6570\u636e\u5e93\u8fde\u63a5\u5de5\u5177\u8fdc\u7a0b\u8fde\u63a5\u6570\u636e\u5e93\u3002<\/p>\n<h4>5.\u90e8\u7f72SpringBoot\u9879\u76ee<\/h4>\n<p>5.1 linux\u4e91\u670d\u52a1\u5668\u4e0a\u7684\u73af\u5883\u6211\u4eec\u90fd\u5df2\u7ecf\u914d\u7f6e\u597d\u4e86&#xff0c;\u4f46\u597d\u50cf\u5dee\u4e86\u4e00\u4e2atomcat&#xff1f;\u56e0\u4e3aspringboot\u5185\u7f6e\u4e86tomcat&#xff0c;\u6240\u4ee5\u540e\u9762\u6211\u4eec\u628a\u5b83\u6253\u5305\u6210jar\u5305\u5c31\u53ef\u4ee5\u514d\u53bbtomcat\u7684\u914d\u7f6e\u4e86&#xff08;\u5982\u679c\u662f\u6253\u5305\u6210war\u5305&#xff0c;\u90a3\u8fd8\u662f\u8981\u914d\u7f6etomcat\u7684&#xff09;\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u662f\u7528\u7684\u662fIDEA\u5de5\u5177\u8fdb\u884cspringboot\u9879\u76ee\u7684\u6253\u5305&#xff1a;<\/p>\n<p>\u6253\u5f00\u4f60\u7684\u9879\u76ee&#xff0c;\u5728\u53f3\u4fa7\u627e\u5230maven\u70b9\u5f00&#xff0c;\u6267\u884c\u4e00\u4e0b\u64cd\u4f5c&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"e2152f0b63e3d1b389066af427220ec6.png\" src=\"2025-04-19jxusnogkvem.png\" \/>\u200b<\/p>\n<p>\u00a0\u8fd0\u884c\u5b8c\u6210\u540e&#xff0c;\u53ef\u4ee5\u5728\u4f60\u9879\u76ee\u7684target\u5305\u4e2d\u53bb\u627e&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"d3623cedef5fb1840e2c90a7bd9e69b2.png\" src=\"2025-04-19zq4zlivbb0y.png\" \/>\u200b\u00a0\u628a\u8fd9\u4e2ajar\u5305\u4f20\u5230\u670d\u52a1\u5668\u4e0a&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"3516dffe3b1be89345a7aac96ba91a27.png\" src=\"2025-04-19ke0d53xq215.png\" \/>\u200b<\/p>\n<p>\u00a0\u6253\u5f00application.properties,\u8bbe\u7f6e\u9879\u76ee\u8fd0\u884c\u7aef\u53e3&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"feab80e3d536ecbd3cc825f4ecbe2425.png\" src=\"2025-04-19k3ya0pgs50t.png\" \/>\u200b<\/p>\n<p>\u628a\u8fd9\u4e2ajar\u590d\u5236\u5230\u684c\u9762&#xff0c;\u6253\u5f00Xshell&#xff0c;\u4f7f\u7528rz\u6307\u4ee4\u628a\u5b83\u4e0a\u4f20\u5230linux\u4e91\u670d\u52a1\u5668\u7684\u6839\u76ee\u5f55&#xff1a;<\/p>\n<p>\u8fd9\u91cc\u6211\u81ea\u5df1\u521b\u5efa\u4e86\u4e00\u4e2a\u6587\u4ef6\u5939\u7528\u4e8e\u5b58\u653ejar\u5305&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"018b3735e6cba5b4392e9ae21f0daba9.png\" src=\"2025-04-192wqtisojx4q.png\" \/>\u200b<\/p>\n<p>\u00a0\u4e0a\u4f20\u6210\u529f\u540e&#xff0c;\u6211\u4eec\u8981\u60f3\u5728linux\u7cfb\u7edf\u4e0a\u8fd0\u884c\u8fd9\u4e2a\u9879\u76ee&#xff0c;\u5c31\u8981\u4fdd\u8bc1\u4ed6\u8fd0\u884c\u6240\u7528\u7684\u7aef\u53e3\u6ca1\u6709\u88ab\u5360\u7528&#xff0c;\u4e0d\u7136\u8fd0\u884c\u5c31\u4f1a\u62a5\u9519\u3002<\/p>\n<p>\u67e5\u770b\u7aef\u53e3\u4f7f\u7528\u60c5\u51b5&#xff1a;<\/p>\n<p> netstat -anp | grep 8099  \/\/netstat -anp | grep &lt;\u7aef\u53e3\u53f7&gt; <\/p>\n<p><img decoding=\"async\" alt=\"d13b2432b04620e2c6ec3381197dc31c.png\" src=\"2025-04-1902ibvflu1gf.png\" \/>\u200b<\/p>\n<p>\u00a0\u53ef\u4ee5\u770b\u5230\u8fd9\u4e2a\u7aef\u53e3\u88ab\u5360\u7528\u4e86&#xff08;\u6ca1\u88ab\u5360\u7528\u7684\u65f6\u5019\u4e0d\u663e\u793a\u4efb\u4f55\u4e1c\u897f&#xff09;&#xff0c;\u67e5\u770b\u5360\u7528\u7aef\u53e3\u7684PID<\/p>\n<p> sudo lsof -i:8099  \/\/sudo lsof -i:&lt;\u7aef\u53e3\u53f7&gt; <\/p>\n<p><img decoding=\"async\" alt=\"2d4c863b4ff44e0c412feac00656431d.png\" src=\"2025-04-19wxwjdvvwufa.png\" \/>\u200b<\/p>\n<p>\u00a0\u6211\u4eec\u8981\u628a\u5b83kill\u6389&#xff0c;\u7559\u51fa\u7a7a\u4f4d\u6765\u8fd0\u884c\u6211\u4eec\u7684\u9879\u76ee\u3002kill\u540e\u518d\u6b21\u67e5\u770b\u7aef\u53e3&#xff0c;\u53ef\u4ee5\u770b\u5230\u8fd9\u4e2a\u7aef\u53e3\u5df2\u7ecf\u817e\u51fa\u6765\u4e86&#xff08;\u67e5\u8be2\u4e3a\u7a7a&#xff09;<\/p>\n<p> sudo kill -9 26191  \/\/sudo kill -9 &lt;PID&gt; <\/p>\n<p><img decoding=\"async\" alt=\"246d612591b3520db1e67d5dab89ca5c.png\" src=\"2025-04-19413nrauej0a.png\" \/>\u200b<\/p>\n<p>\u00a0\u00a0\u4f7f\u7528java\u6307\u4ee4\u8fd0\u884c\u9879\u76eejar\u5305&#xff0c;\u8fd9\u6837\u6211\u4eec\u7684\u9879\u76ee\u5c31\u7b97\u90e8\u7f72\u6210\u529f\u4e86<\/p>\n<p> java -jar ***.jar  \/\/***\u4e3a\u4f60\u7684jar\u5305\u540d <\/p>\n<p><img decoding=\"async\" alt=\"6c63622272359e9dfac744120d8550c8.png\" src=\"2025-04-195p0nm3th31i.png\" \/>\u200b\u4f60\u9700\u8981\u628a\u4f60\u7684\u9879\u76ee\u7684\u7aef\u53e3\u7684\u5916\u90e8\u8bbf\u95ee&#xff1a;<\/p>\n<p>\u505a\u5b8c\u4e4b\u540e\u4f60\u9700\u8981\u5728\u670d\u52a1\u5668\u7684\u5b89\u5168\u7ec4\u4e2d\u6dfb\u52a0\u4f60\u7684\u9879\u76ee\u7aef\u53e3\u53f7&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"a3652ecc26fd05287b8d83e92fffe3e3.png\" src=\"2025-04-19aqp554ieexp.png\" \/>\u200b<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;8099\/tcp &#8211;permanent;\u00a0\/*\u6ce8\u610f\u540e\u9762\u90fd\u8981\u5e26\u5206\u53f7\u201c&#xff1b;\u201d*\/<\/p>\n<\/li>\n<li>\n<p>firewall-cmd &#8211;reload;<\/p>\n<\/li>\n<p>\u00a0\u968f\u4fbf\u627e\u4e2a\u6d4f\u89c8\u5668&#xff0c;\u641c\u7d22\u680f\u8f93\u5165http:\/\/\u516c\u7f51ip:\u7aef\u53e3\u53f7 \u5c31\u53ef\u4ee5\u641c\u7d22\u5230\u4f60\u7684\u7f51\u7ad9\u4e86\u3002<\/p>\n<\/p>\n<p>\u63a5\u4e0b\u6765\u5b8c\u5584\u4e00\u4e0b\u554ajar\u5305\u8fd0\u884c&#xff1a;<\/p>\n<p>\u8fd9\u79cd\u542f\u52a8\u65b9\u5f0f\u662f\u4e00\u6b21\u542f\u52a8&#xff0c;\u5f53\u6211\u4eec\u5173\u6389Xshell\u7684\u65f6\u5019&#xff0c;\u6211\u4eec\u7684\u7f51\u7ad9\u53c8\u8bbf\u95ee\u4e0d\u4e0a\u4e86&#xff0c;\u53c8\u5f97\u91cd\u65b0\u6253\u5f00Xshell&#xff0c;\u6267\u884c java -jar ***.jar\u3002\u6240\u4ee5\u6211\u4eec\u8981\u4f7f\u7528\u4e0b\u9762\u7684\u65b9\u6cd5\u8ba9\u8fd9\u4e2a\u9879\u76ee\u5728\u670d\u52a1\u5668\u4e0a\u81ea\u52a8\u4e0d\u95f4\u65ad\u5730\u8dd1.<\/p>\n<p>\u00a0\u5173\u6389\u91cd\u542f\u4e00\u4e0bXshell&#xff08;\u8fd9\u6837\u7684\u8bdd\u539f\u672c\u7684\u9879\u76ee\u5c31\u505c\u6389\u4e86&#xff09;&#xff0c;\u521b\u5efa\u5e76\u7f16\u5199\u6587\u4ef6 start.sh,\u5411\u5176\u4e2d\u6dfb\u52a0\u5b57\u6bb5 &#xff1a; java -jar ***.jar \u3002\u6309ESC &#043; :wq &#043; \u56de\u8f66\u952e\u4fdd\u5b58\u9000\u51fa<\/p>\n<p> touch start.sh <\/p>\n<p>\u00a0\u521b\u5efa\u5b8c\u6210\u540e\u67e5\u770b\u662f\u5426\u6210\u529f&#xff1a;<\/p>\n<p>\u00a0<img decoding=\"async\" alt=\"f91a604c68b58a12f6820c20e701ab68.png\" src=\"2025-04-19vo5ccybztg5.png\" \/>\u200b<\/p>\n<p>\u00a0\u7f16\u8f91start.sh\u6587\u4ef6&#xff1a;<\/p>\n<p> vim start.sh <\/p>\n<p>\u00a0<img decoding=\"async\" alt=\"75562bcc3aedcbacc9a2bcbe742d1234.png\" src=\"2025-04-190t3vhdrquug.png\" \/>\u200b<\/p>\n<p>\u00a0\u6309ESC &#043; :wq &#043; \u56de\u8f66\u952e\u4fdd\u5b58\u9000\u51fa<\/p>\n<p>\u7ed9\u8fd9\u4e2astart.sh \u7ba1\u7406\u5458\u6743\u9650&#xff0c;\u7136\u540e\u7528nohup\u6307\u4ee4\u4e0d\u95f4\u65ad\u5730\u8fd0\u884c&#xff08;nohup\u6307\u4ee4&#xff1a;\u5ffd\u7565\u6240\u6709\u6302\u65ad&#xff08;SIGHUP&#xff09;\u4fe1\u53f7&#xff0c;\u4e0d\u6302\u65ad\u5730\u8fd0\u884c\u547d\u4ee4&#xff09;<\/p>\n<p>\u00a0\u8d4b\u4e88\u7ba1\u7406\u5458\u6743\u9650:<\/p>\n<p> chmod 777 start.sh <\/p>\n<p>\u4e0d\u95f4\u65ad\u8fd0\u884c\u6587\u4ef6\u5185\u7684\u6307\u4ee4<\/p>\n<p> nohup  .\/start.sh &amp;  <\/p>\n<p>\u00a0\u64cd\u4f5c\u56fe\u7247&#xff1a;<img decoding=\"async\" alt=\"27694762eb47a14dd9666f01350a5383.png\" src=\"2025-04-192p21jfw1qie.png\" \/>\u200b<\/p>\n<p>\u00a0\u67e5\u770bjar\u5305\u662f\u5426\u8fd0\u884c&#xff1a;<\/p>\n<p> ps -ef | grep java <\/p>\n<p>\u00a0\u5982\u4e0b\u53ef\u4ee5\u770b\u5230\u65f6\u95f4\u548c\u540e\u9762\u7684jar\u5305\u540d\u8bf4\u660e\u6210\u529f&#xff1a;<img decoding=\"async\" alt=\"e8ac4eeff5c2de0dda5c35d607e803c7.png\" src=\"2025-04-19ou5s55txjd0.png\" \/>\u200b<\/p>\n<p>\u00a0\u8981\u662f\u6d4f\u89c8\u5668\u4e0a\u7d22\u680f\u8f93\u5165http:\/\/\u516c\u7f51ip:\u7aef\u53e3\u53f7 \u641c\u7d22\u4e0d\u5230\u4f60\u7684\u7f51\u7ad9&#xff0c;\u8bb0\u5f97\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\u4ee5\u53ca\u6dfb\u52a0\u5b89\u5168\u7ec4&#xff1a;<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;8099\/tcp &#8211;permanent;\u00a0\/*\u6ce8\u610f\u540e\u9762\u90fd\u8981\u5e26\u5206\u53f7\u201c&#xff1b;\u201d*\/<\/p>\n<\/li>\n<li>\n<p>firewall-cmd &#8211;reload;<\/p>\n<\/li>\n<p>\u00a0\u8fd9\u6837\u6211\u4eec\u5c31\u80fd\u62ff\u5230\u4f60\u540e\u53f0jar\u5305\u7684\u6570\u636e\u4e86&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"970d7b090b447d4a20a37f5d8cf730b5.png\" src=\"2025-04-19y2d5ydrmetb.png\" \/>\u200b<\/p>\n<p>\u5982\u679c\u9700\u8981\u628a\u524d\u7aef\u9879\u76ee\u90e8\u7f72\u5728\u670d\u52a1\u5668\u4e0a\u9700\u8981\u5b89\u88c5\u4e00\u4e0bnginx&#xff0c;\u5173\u6ce8\u6211\u6301\u7eed\u66f4\u65b0&#xff01;&#xff01;&#xff01;<\/p>\n<h3>6.\u5b89\u88c5nginx<\/h3>\n<h4>1.\u5b89\u88c5nginx\u4f9d\u8d56<\/h4>\n<p> Nginx\u7684\u5b89\u88c5\u901a\u8fc7\u6e90\u7801\u5305\u7f16\u8bd1\u5b8c\u6210&#xff0c;\u9700\u8981c&#043;&#043;\u652f\u6301\u5e93&#xff0c;\u540c\u65f6\u5728Nginx\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u5bf9\u4e8e\u4e00\u4e9b\u538b\u7f29\u3001\u8def\u7531\u6b63\u5219\u8868\u8fbe\u5f0f\u3001https\u652f\u6301\u7b49\u76f8\u5173\u7279\u6027\u9700\u8981\u5176\u4ed6\u4e00\u4e9b\u652f\u6301\u5e93\u3002\u4e00\u822c\u60c5\u51b5\u4e0b&#xff0c;\u5b89\u88c5 gcc gcc-c&#043;&#043; pcre pcre-devel zlib zlib-devel\u00a0openssl\u00a0openssl-devel \u8fd9\u4e9b\u4f9d\u8d56\u53ef\u6ee1\u8db3\u57fa\u672c\u8981\u6c42&#xff0c;\u5b89\u88c5\u6307\u4ee4\u5982\u4e0b&#xff1a;<\/p>\n<p> yum install -y gcc gcc-c&#043;&#043; pcre pcre-devel zlib zlib-devel openssl openssl-devel <\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u5982\u4e0b\u56fe&#xff1a;\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"a3bf6ac6394608de07fdad9dbb0f443b.png\" src=\"2025-04-19orsww1gz1i3.png\" \/>\u200b<\/p>\n<\/p>\n<h4>2 \u5b89\u88c5Nginx<\/h4>\n<h4>2.1 \u4e0b\u8f7d\u6e90\u7801\u5305<\/h4>\n<p> wget http:\/\/nginx.org\/download\/nginx-1.18.0.tar.gz <\/p>\n<p>\u00a0\u5982\u4e0b\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"a9364eba5841095960ffbfd328347e52.png\" src=\"2025-04-192qusfab4m2z.png\" \/>\u200b<\/p>\n<p>\u00a02. 2 \u89e3\u538b\u6e90\u7801\u5305<\/p>\n<p> tar -zxvf nginx-1.18.0.tar.gz <\/p>\n<p>\u00a0\u5982\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"54d8f40c8a955cc848073bd4bf05157e.png\" src=\"2025-04-194tlhksoxol0.png\" \/>\u200b<\/p>\n<h4>2.3\u00a0\u5b89\u88c5\u914d\u7f6e\u68c0\u67e5<\/h4>\n<p>\u89e3\u538b\u5b8c\u6210\u540e&#xff0c;\u8fdb\u5165\u5230\u89e3\u538b\u76ee\u5f55\u00a0\u6267\u884c\u5b89\u88c5\u68c0\u67e5&#xff0c;\u8fd0\u884c\u5982\u4e0b\u6307\u4ee4&#xff1a;<\/p>\n<p> .\/configure <\/p>\n<p>\u5982\u56fe&#xff1a;\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"95949eeb131d2607e4948fa6957884c3.png\" src=\"2025-04-19r3okpwsr4c4.png\" \/>\u200b<\/p>\n<p>\u00a0\u68c0\u67e5\u5b8c\u6210\u540e&#xff0c;\u9ed8\u8ba4\u5b89\u88c5\u914d\u7f6e\u4fe1\u606f\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" alt=\"50d82f6e5a401fc42ef77b2ff10dfbeb.png\" src=\"2025-04-19x4uqwenoas3.png\" \/>\u200b<\/p>\n<\/p>\n<h4>2.4 \u5b89\u88c5<\/h4>\n<p>\u5728\u89e3\u538b\u76ee\u5f55\u4e0b\u00a0\u6267\u884c\u4e0b\u9762\u6307\u4ee4&#xff0c;\u9ed8\u8ba4\u4f1a\u5b89\u88c5\u5230\/usr\/local\/\u76ee\u5f55\u4e0b<\/p>\n<p> make &amp;&amp; make install <\/p>\n<p>\u6267\u884c\u5b8c\u4e0a\u9762\u547d\u4ee4\u540e&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"85ea3265fc069400d4778588e1208f7d.png\" src=\"2025-04-19csug50fl05j.png\" \/>\u200b<\/p>\n<h4>2.5 \u914d\u7f6e\u522b\u540d<\/h4>\n<p>\u6b64\u6b65\u9aa4\u53ef\u9009&#xff0c;\u76ee\u7684\u662f\u4e3a\u4e86\u540e\u7eed\u8fd0\u884cnginx\u64cd\u4f5c\u6307\u4ee4\u65b9\u4fbf\u3002\u522b\u540d\u914d\u7f6e\u65b9\u5f0f\u548c\u5f53\u524d\u4f7f\u7528\u7684shell\u7c7b\u578b\u76f8\u5173&#xff0c;\u8fd9\u91cc\u4f7f\u7528zsh&#xff0c;\u6240\u4ee5\u5728\u7528\u6237\u76ee\u5f55\u7684.zshrc\u6587\u4ef6\u4e2d\u52a0\u5165\u5982\u4e0b\u522b\u540d\u00a0nginx\u00a0\u66ff\u4ee3nginx\u6267\u884c\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u3002<\/p>\n<p> vim ~\/.zshrc<\/p>\n<p> alias nginx&#061;&#039;\/usr\/local\/nginx\/sbin\/nginx&#039; <\/p>\n<p><img decoding=\"async\" alt=\"0d77670ad51b20e7659306d20c466a14.png\" src=\"2025-04-19cit25po431f.png\" \/>\u200b<\/p>\n<p>\u00a0\u6309Esc,\u8f93\u5165:wq\u9000\u51fa\u5e76\u4fdd\u5b58&#xff0c;\u7136\u540e\u6267\u884c\u4e0b\u9762\u64cd\u4f5c&#xff1a;<\/p>\n<p> source ~\/.zshrc <\/p>\n<h4>2.6 \u5b89\u88c5\u7ed3\u679c\u9a8c\u8bc1<\/h4>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u4f1a\u751f\u6210nginx\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u00a0\/usr\/local\/nginx\/conf\/nginx.conf\u3002<\/p>\n<p>\u53ef\u6267\u884c\u5982\u4e0b\u547d\u4ee4nginx\u914d\u7f6e\u68c0\u67e5&#xff0c;\u5982\u679c\u914d\u7f6e\u6587\u4ef6\u6709\u9519\u8bef\u4f1a\u6709\u76f8\u5e94\u63d0\u793a\u3002<\/p>\n<p> nginx -t <\/p>\n<p>\u00a0\u200b<img decoding=\"async\" alt=\"0a0da1bc77c77990645b2d3325fc8074.png\" src=\"2025-04-19idjktsfuhrj.png\" \/>\u200b<\/p>\n<p>\u00a0\u5982\u4e0a\u56fe&#xff0c;nginx\u914d\u7f6e\u6b63\u786e&#xff0c;\u4e0b\u9762\u6307\u4ee4\u542f\u52a8nginx\u3001\u67e5\u770bnginx\u8fdb\u7a0b\u3001\u5e76\u4ece\u672c\u673a\u6d4b\u8bd5\u53ef\u8bbf\u95ee\u6027&#xff08;\u9ed8\u8ba4\u5f00\u542f80\u7aef\u53e3&#xff0c;\u6240\u4ee5\u4f7f\u7528\u00a0localhost\u00a0\u8bbf\u95ee\u5373\u53ef&#xff09;,\u5982\u4e0b\u56fe&#xff1a;<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>nginx<\/p>\n<\/li>\n<li>\n<p>ps -ef|grep nginx<\/p>\n<\/li>\n<li>\n<p>curl localhost<\/p>\n<\/li>\n<p>\u5982\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"9c95a94c678203158b49315089731a0f.png\" src=\"2025-04-19wpwafvi5mwk.png\" \/>\u200b<\/p>\n<p>\u00a0\u4e0a\u56fe\u4e2d\u4f7f\u7528\u00a0curl\u00a0\u547d\u4ee4\u8bbf\u95ee\u672c\u673a\u53ef\u6b63\u5e38\u8fd4\u56de\u9875\u9762\u4fe1\u606f&#xff0c;nginx\u5b89\u88c5\u5b8c\u6210\u3002\u540e\u7eed\u53ef\u8fdb\u884c\u5176\u4ed6\u57df\u540d\u76f8\u5173\u7684\u7ed1\u5b9a\u914d\u7f6e\u3002<\/p>\n<p>\u5982\u9700\u8981\u5728\u6d4f\u89c8\u5668\u4e0a\u8bbf\u95ee\u5219\u9700\u8981\u66b4\u973280\u7aef\u53e3:<\/p>\n<p>\u00a0 <\/p>\n<li>\n<p>firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;80\/tcp &#8211;permanent;\u00a0\/*\u6ce8\u610f\u540e\u9762\u90fd\u8981\u5e26\u5206\u53f7\u201c&#xff1b;\u201d*\/<\/p>\n<\/li>\n<li>\n<p>firewall-cmd &#8211;reload;<\/p>\n<\/li>\n<p>\u00a0\u5982\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"637b9394d71727561243c6143851ed48.png\" src=\"2025-04-19aj423ycuioa.png\" \/>\u200b<\/p>\n<p>3 \u963f\u91cc\u4e91ECS\u914d\u7f6e<\/p>\n<p> \u5982\u4e0a\u9762\u6b65\u9aa4nginx\u5df2\u6210\u529f\u5b89\u88c5&#xff0c;\u4e14\u5728\u672c\u673a\u53ef\u8bbf\u95ee\u3002\u4f46\u662f\u7531\u4e8e\u963f\u91cc\u4e91\u7684\u5b89\u5168\u673a\u5236&#xff0c;\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u65e0\u6cd5\u4f7f\u7528\u516c\u7f51IP\u8fdb\u884c\u8bbf\u95ee&#xff0c;\u4e5f\u5c31\u662f\u65e0\u6cd5\u5728\u5176\u4ed6\u4e3b\u673a\u901a\u8fc7\u975e\u57df\u540d\u65b9\u5f0f\u8bbf\u95ee\u3002\u89e3\u51b3\u65b9\u5f0f\u5982\u4e0b\u3002<\/p>\n<p>3.1 \u6dfb\u52a0\u5b89\u5168\u7ec4 \u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u963f\u91cc\u4e91\u7cfb\u7edf\u4f1a\u7ed9\u6bcf\u4e2aESC\u4e3b\u673a\u5173\u8054\u4e00\u4e2a\u9ed8\u8ba4\u7684\u5b89\u5168\u7ec4&#xff08;\u6bcf\u4e2aECS\u5b9e\u4f8b\u4e5f\u81f3\u5c11\u8981\u5173\u8054\u4e00\u4e2a\u5b89\u5168\u7ec4&#xff09;&#xff0c;\u8be5\u5b89\u5168\u7ec4\u9ed8\u8ba4\u5f00\u542f\u4e86TCP\u534f\u8bae\u4e2d\u768422 \u548c 3389\u7aef\u53e3&#xff0c;\u7528\u4e8e\u652f\u6301 ssh \u548c mysql \u64cd\u4f5c&#xff0c;\u5982\u4e0b\u56fe\u3002\u6240\u4ee5\u5b89\u88c5Nginx\u540e&#xff0c;\u9ed8\u8ba4\u4f7f\u7528\u7684 80 \u7aef\u53e3\u5e76\u672a\u5f00\u653e&#xff0c;\u6240\u4ee5\u65e0\u6cd5\u8bbf\u95ee\u3002<\/p>\n<p><img decoding=\"async\" alt=\"ba14f6f215d1290e95185e846b9b71fe.png\" src=\"2025-04-191xepjv4zlkg.png\" \/>\u200b<\/p>\n<p>\u00a03.3 \u6d4b\u8bd5\u516c\u7f51IP\u8bbf\u95ee<\/p>\n<p>\u5b8c\u6210\u4e0a\u9762\u6b65\u9aa4\u540e&#xff0c;\u5728\u6d4f\u89c8\u5668\u4e2d&#xff0c;\u76f4\u63a5\u8f93\u5165ECS\u7684\u516c\u7f51IP&#xff0c;\u53ef\u6210\u529f\u8bbf\u95ee&#xff0c;\u5982\u4e0b\u56fe&#xff1a;\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"788b15ee47e96859bcca924478274763.png\" src=\"2025-04-19xbfl14ktsvd.png\" \/>\u200b<\/p>\n<p>\u00a0\u5230\u6b64\u670d\u52a1\u5668\u90e8\u7f72JDK\u3001mysql\u3001Nginx\u3001\u8fd0\u884cjar\u7ed3\u675f&#xff01;&#xff01;<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.5k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf54\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u4e0a\u8d2d\u4e70\u3001\u914d\u7f6e\u3001\u5b89\u88c5JDK\u3001MySQL\u3001Nginx\uff0c\u5e76\u901a\u8fc7Xshell\u8fde\u63a5\u670d\u52a1\u5668\u8fdb\u884c\u64cd\u4f5c\uff0c\u4ee5\u53ca\u5982\u4f55\u90e8\u7f72SpringBoot\u9879\u76ee\u3002\u91cd\u70b9\u6d89\u53ca\u670d\u52a1\u5668\u8fde\u63a5\u8bbe\u7f6e\u3001\u5b89\u5168\u7ec4\u7ba1\u7406\u548c\u7aef\u53e3\u5f00\u653e\u7b49\u6b65\u9aa4\u3002<\/p>\n","protected":false},"author":2,"featured_media":23404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,97,190,43,44,96,1798],"topic":[],"class_list":["post-23424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-97","tag-190","tag-43","tag-44","tag-96","tag-ecs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72 - \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\/23424.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.5k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf54\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u4e0a\u8d2d\u4e70\u3001\u914d\u7f6e\u3001\u5b89\u88c5JDK\u3001MySQL\u3001Nginx\uff0c\u5e76\u901a\u8fc7Xshell\u8fde\u63a5\u670d\u52a1\u5668\u8fdb\u884c\u64cd\u4f5c\uff0c\u4ee5\u53ca\u5982\u4f55\u90e8\u7f72SpringBoot\u9879\u76ee\u3002\u91cd\u70b9\u6d89\u53ca\u670d\u52a1\u5668\u8fde\u63a5\u8bbe\u7f6e\u3001\u5b89\u5168\u7ec4\u7ba1\u7406\u548c\u7aef\u53e3\u5f00\u653e\u7b49\u6b65\u9aa4\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/23424.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-18T23:47:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234723-6802e48b5c87c.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=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23424.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/23424.html\",\"name\":\"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T23:47:33+00:00\",\"dateModified\":\"2025-04-18T23:47:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/23424.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/23424.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23424.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72\"}]},{\"@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":"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72 - \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\/23424.html","og_locale":"zh_CN","og_type":"article","og_title":"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.5k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf54\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u4e0a\u8d2d\u4e70\u3001\u914d\u7f6e\u3001\u5b89\u88c5JDK\u3001MySQL\u3001Nginx\uff0c\u5e76\u901a\u8fc7Xshell\u8fde\u63a5\u670d\u52a1\u5668\u8fdb\u884c\u64cd\u4f5c\uff0c\u4ee5\u53ca\u5982\u4f55\u90e8\u7f72SpringBoot\u9879\u76ee\u3002\u91cd\u70b9\u6d89\u53ca\u670d\u52a1\u5668\u8fde\u63a5\u8bbe\u7f6e\u3001\u5b89\u5168\u7ec4\u7ba1\u7406\u548c\u7aef\u53e3\u5f00\u653e\u7b49\u6b65\u9aa4\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/23424.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T23:47:33+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418234723-6802e48b5c87c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/23424.html","url":"https:\/\/www.wsisp.com\/helps\/23424.html","name":"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T23:47:33+00:00","dateModified":"2025-04-18T23:47:33+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/23424.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/23424.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/23424.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u8d2d\u4e70\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u64cd\u4f5c\u6d41\u7a0b\u4ee5\u53ca\u73af\u5883\u90e8\u7f72"}]},{"@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\/23424","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=23424"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/23424\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/23404"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=23424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=23424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=23424"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=23424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}