{"id":22898,"date":"2025-04-19T06:37:11","date_gmt":"2025-04-18T22:37:11","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/22898.html"},"modified":"2025-04-19T06:37:11","modified_gmt":"2025-04-18T22:37:11","slug":"%e4%b8%8b%e8%bd%bd%e4%bb%a5%e5%90%8e%e5%90%84%e4%b8%aa%e8%bd%af%e4%bb%b6%e6%88%96%e8%80%85%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e5%90%af%e5%8a%a8%e4%b8%8e%e5%85%b3%e9%97%ad","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/22898.html","title":{"rendered":"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed"},"content":{"rendered":"<h3>1.Redis<\/h3>\n<p>\u7ba1\u7406\u5458\u542f\u52a8&#xff1a;redis-cli -m 607607\u00a0 \u6216\u8005redis server-m 607607<\/p>\n<p>\u5173\u95ed&#xff1a;exit<\/p>\n<p>\u8fd9\u4e2a\u8fd8\u6709\u5bf9\u5e94\u8f6f\u4ef6\u53ef\u4ee5\u8fde\u63a5Redis\u8fdb\u884c\u5b9e\u65f6\u67e5\u770bRDM<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"129\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223701-6802d40d37990.png\" width=\"136\" \/><\/p>\n<p>\u52a0\u8f7d\u914d\u7f6e<\/p>\n<p>\u6253\u5f00\u5bf9\u5e94\u7aef\u53e3\u7684redis\u670d\u52a1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"707\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223701-6802d40d4dd43.png\" width=\"1327\" \/><\/p>\n<p>\u52a0\u5165redis<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"69\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223701-6802d40daf6f1.png\" width=\"708\" \/><\/p>\n<p>\u6210\u4e3a\u5bf9\u5e94redis\u670d\u52a1\u5668\u7684\u4ece\u8282\u70b9 slaveof 192.168.98.163 6380\u00a0 replicaof 192.168.98.163 6380\u00a0<\/p>\n<p>slaveof 127.0.0.1 6380\u00a0 replicaof 127.0.0.1\u00a06380\u00a0<\/p>\n<\/p>\n<h3>2.Nacos<\/h3>\n<p>\u9ed8\u8ba4\u8d26\u53f7\u5bc6\u7801\u90fd\u662fnacos<\/p>\n<p>\u542f\u52a8\u6253\u5f00\u5bf9\u5e94\u7684bin\u76ee\u5f55\u4e0b\u7684\u7ec8\u7aef&#xff1a;startup.cmd -m standalone<\/p>\n<p>\u7ed3\u675f:\u4e24\u6b21Ctrl&#043;c\u7136\u540e\u8f93\u5165yes\u5373\u53ef<\/p>\n<p>\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1473\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223701-6802d40dcaa55.png\" width=\"2495\" \/><\/p>\n<p>\u7136\u540e\u53ef\u4ee5\u6253\u5f00\u5bf9\u5e94\u7684\u7f51\u7ad9\u8fdb\u884c\u4f7f\u7528&#xff1a;<\/p>\n<p>\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8bbf\u95eehttp:\/\/localhost:8848\/nacos&#xff0c;\u5982\u679c\u80fd\u591f\u770b\u5230Nacos\u7684\u767b\u5f55\u9875\u9762&#xff0c;\u5219\u8bf4\u660eNacos\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u5e76\u542f\u52a8\u3002<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"947\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223703-6802d40f524b5.png\" width=\"1865\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1339\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223704-6802d41004623.png\" width=\"2547\" \/><\/p>\n<\/p>\n<\/p>\n<h3>3.swagger<\/h3>\n<p>\u914d\u7f6e\u7c7b&#xff0c;\u4f5c\u7528&#xff1a;\u7f51\u7ad9<\/p>\n<p>http:\/\/localhost:8080\/swagger-ui.html <\/p>\n<p>\u6253\u5f00\u63a5\u53e3\u6587\u6863&#xff0c;\u652f\u6301jwt\u5b89\u5168\u8bbf\u95ee<\/p>\n<p>package com.example.servicecreation.Config;<\/p>\n<p>import io.swagger.v3.oas.models.OpenAPI;<br \/>\nimport io.swagger.v3.oas.models.info.Contact;<br \/>\nimport io.swagger.v3.oas.models.info.Info;<br \/>\nimport io.swagger.v3.oas.models.info.License;<br \/>\nimport io.swagger.v3.oas.models.security.SecurityRequirement;<br \/>\nimport io.swagger.v3.oas.models.security.SecurityScheme;<br \/>\nimport org.springdoc.core.GroupedOpenApi;<br \/>\nimport org.springframework.context.annotation.Bean;<br \/>\nimport org.springframework.context.annotation.Configuration;<\/p>\n<p>&#064;Configuration<br \/>\npublic class OpenApiConfig {<\/p>\n<p>    \/**<br \/>\n     * \u914d\u7f6e OpenAPI \u7684\u57fa\u672c\u4fe1\u606f<br \/>\n     *\/<br \/>\n    private static String SwaggerHttp&#061;&#034;http:\/\/localhost:8080\/swagger-ui.html&#034;;<br \/>\n    private static String Token&#061;&#034;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlMj&#034; &#043;<br \/>\n            &#034;g1ZmNkOC00MDA2LTQwMjMtOTcwNS0wNTMyN2I4ODc2YzIiLCJpc3MiOiJ5eXoiLCJpYXQiOjE3&#034; &#043;<br \/>\n            &#034;NDE0MTY1MjIsInN1YiI6IjEyMzQ1NiIsImV4cCI6LTkyMjMzNzAyOTU0MzgyNTMsInJvbGUiOiJhZG&#034; &#043;<br \/>\n            &#034;1pbiJ9.p5xxkQZKh-8bGlkFjD_L8_9kXo2Q13XYEMNAPJlzu4c&#034;;<\/p>\n<p>    &#064;Bean<br \/>\n    public OpenAPI customOpenAPI() {<br \/>\n        System.out.println(&#034;OpenAPI&#8212;&#8212;&#8212;swagger\u63a5\u53e3\u6587\u6863\u8bbe\u7f6e&#034;);<br \/>\n        return new OpenAPI()<br \/>\n                \/\/ API \u57fa\u672c\u4fe1\u606f<br \/>\n                .info(new Info()<br \/>\n                        .title(&#034;\u670d\u52a1\u9879\u76eeA05&#034;)<br \/>\n                        .version(&#034;1.0&#034;)  \/\/\u7248\u672c<br \/>\n                        .description(&#034;ai\u667a\u80fd\u6392\u8bfe\u7cfb\u7edf&#034;)  \/\/\u63cf\u8ff0<br \/>\n                        .contact(new Contact()<br \/>\n                                .name(&#034;yyz&#034;)<br \/>\n                                .email(&#034;2161672768&#064;qq.com&#034;)<br \/>\n                                .url(&#034;https:\/\/example.com&#034;))<br \/>\n                        .license(new License()<br \/>\n                                .name(&#034;\u8bb8\u53ef\u8bc1\u5bf9\u8c61:Apache 2.0&#034;)<br \/>\n                                .url(&#034;https:\/\/www.apache.org\/licenses\/LICENSE-2.0&#034;)));<br \/>\n\/\/                 \u5168\u5c40\u5b89\u5168\u914d\u7f6e&#xff08;\u4f8b\u5982 JWT&#xff09;<br \/>\n\/\/                .addSecurityItem(new SecurityRequirement().addList(&#034;BearerAuth&#034;))  \/\/\u6301\u6709\u8005\u9a8c\u8bc1  BearerAuth<br \/>\n\/\/                .components(new io.swagger.v3.oas.models.Components()<br \/>\n\/\/                        .addSecuritySchemes(&#034;BearerAuth&#034;, new SecurityScheme()<br \/>\n\/\/                                .name(&#034;BearerAuth&#034;)<br \/>\n\/\/                                .type(SecurityScheme.Type.HTTP)  \/\/\u4ee5http\u7684\u5f62\u5f0f<br \/>\n\/\/                                .scheme(&#034;Bearer &#034;)<br \/>\n\/\/                                .bearerFormat(&#034;JWT\u8ba4\u8bc1&#034;)));<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u5206\u7ec4\u914d\u7f6e&#xff1a;\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u5305\u8def\u5f84\u6216 URL \u524d\u7f00\u5206\u7ec4<br \/>\n     *\/<br \/>\n    &#064;Bean<br \/>\n    public GroupedOpenApi publicApi() {<br \/>\n        return GroupedOpenApi.builder()<br \/>\n                .group(&#034;\u672c\u9879\u76eeapi&#xff1a;&#034;) \/\/ \u7ec4\u540d<br \/>\n                .packagesToScan(&#034;com.example.servicecreation.Controller&#034;) \/\/ \u5339\u914d com.example.controller<br \/>\n                .build();<br \/>\n    }<\/p>\n<p>    &#064;Bean<br \/>\n    public GroupedOpenApi adminApi() {<br \/>\n        return GroupedOpenApi.builder()<br \/>\n                .group(&#034;\u6d4b\u8bd5api&#xff1a;&#034;) \/\/ \u7ec4\u540d<br \/>\n                .packagesToScan(&#034;com.example.servicecreation.Controller&#034;) \/\/ \u5339\u914d com.example.controller<br \/>\n\/\/                .pathsToMatch(&#034;\/api\/admin\/**&#034;) \/\/ \u6309\u8def\u5f84\u5339\u914d<br \/>\n                .build();<br \/>\n    }<br \/>\n}<\/p>\n<\/p>\n<h3>4.Docker<\/h3>\n<p>\u6267\u884c&#xff1a;systemctl start docker<\/p>\n<p>\u67e5\u8be2Docker\u5bb9\u5668&#xff1a;docker ps<\/p>\n<h4>\u8fde\u63a5\u52a0\u901f\u5668<\/h4>\n<p>\u8fde\u63a5\u963f\u91cc\u4e91\u955c\u50cf\u52a0\u901f\u5668&#xff0c;\u4e5f\u53ef\u4ee5\u662f\u5176\u4ed6\u7684\u52a0\u901f\u5668<\/p>\n<p>\u6253\u5f00Ubuntu\u6839\u636e\u7ed9\u51fa\u7684\u5177\u4f53\u64cd\u4f5c\u8fdb\u884c\u64cd\u4f5c\u5373\u53ef<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"560\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223705-6802d41152597.png\" width=\"1208\" \/><\/p>\n<p>\u68c0\u67e5\u662f\u5426\u914d\u7f6e\u6210\u529f<\/p>\n<p>\u65b9\u6cd5\u4e00&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"885\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223705-6802d411ab1b8.png\" width=\"1457\" \/><\/p>\n<p>\u65b9\u6cd5\u4e8c&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"695\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223706-6802d412219cf.png\" width=\"1294\" \/><\/p>\n<h4>\u6267\u884csystemctl start docker.service&#xff0c;\u62a5\u9519Failed to start docker.service: Unit docker.service not found. \u600e\u4e48\u89e3\u51b3<\/h4>\n<p>\u539f\u56e0&#xff1a;\u53ef\u80fd\u662f\u7cfb\u7edf\u5b89\u88c5\u4e0d\u5b8c\u6574&#xff0c;\u8fdb\u884c\u5b8c\u6574\u7684\u91cd\u65b0\u5b89\u88c5<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"304\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223706-6802d4127aecf.png\" width=\"1294\" \/><\/p>\n<\/p>\n<h4>docker\u7684\u542f\u52a8<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"832\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223706-6802d412afc8c.png\" width=\"1311\" \/><\/p>\n<p>\u542f\u52a8docker\u670d\u52a1&#xff1a;<\/p>\n<p>sudo systemctl start docker <\/p>\n<p>Docker \u5f00\u673a\u81ea\u542f<\/p>\n<p>sudo systemctl enable docker <\/p>\n<p>\u68c0\u67e5 Docker \u670d\u52a1\u72b6\u6001&#xff0c;docker\u662f\u5426\u8fd0\u884c<\/p>\n<p>sudo systemctl status docker <\/p>\n<h4>docker\u7684\u5173\u95ed<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1089\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223707-6802d4132044d.png\" width=\"1301\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"699\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223707-6802d4139d17b.png\" width=\"1323\" \/><\/p>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u505c\u6b62 Docker&#xff1a;<\/p>\n<p>sudo systemctl stop docker <\/p>\n<p>\u5982\u679c\u4e4b\u524d\u8bbe\u7f6e\u4e86 Docker \u5f00\u673a\u81ea\u542f&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u7981\u7528&#xff1a;<\/p>\n<p>sudo systemctl disable docker <\/p>\n<p>\u68c0\u67e5\u72b6\u6001&#xff0c;\u786e\u8ba4 Docker \u662f\u5426\u5df2\u5173\u95ed&#xff1a;<\/p>\n<p>sudo systemctl status docker <\/p>\n<p>\u5982\u679c Docker \u4ecd\u6709\u8fdb\u7a0b\u5728\u8fd0\u884c&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5f3a\u5236\u505c\u6b62&#xff1a;<\/p>\n<p>sudo pkill docker <\/p>\n<ul>\n<li>\n<p>\u505c\u6b62 Docker&#xff1a;sudo systemctl stop docker<\/p>\n<\/li>\n<li>\n<p>\u7981\u7528\u5f00\u673a\u81ea\u542f&#xff1a;sudo systemctl disable docker<\/p>\n<\/li>\n<li>\n<p>\u68c0\u67e5\u72b6\u6001&#xff1a;sudo systemctl status docker<\/p>\n<\/li>\n<\/ul>\n<h4>docker\u7684\u91cd\u542f<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"313\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223708-6802d4140543c.png\" width=\"1257\" \/><\/p>\n<p>sudo systemctl restart docker <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"691\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223708-6802d4143bc8a.png\" width=\"1216\" \/><\/p>\n<p>docker restart<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"715\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223708-6802d41494c09.png\" width=\"1259\" \/><\/p>\n<p>sudo journalctl -u docker.service<br \/>\nsudo systemctl daemon-reload<br \/>\nsudo systemctl restart docker<br \/>\nsudo reboot <\/p>\n<h3>5.rabbitmq<\/h3>\n<p>rabbitmq\u5728windows\u4e0a\u7684\u542f\u52a8\u4e0e\u5173\u95ed<\/p>\n<p>\u9996\u5148\u6253\u5f00\u5bf9\u5e94\u7684\u547d\u4ee4\u7b26<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"969\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223708-6802d414ef6ee.png\" width=\"1420\" \/><\/p>\n<p>.\u5982\u679c\u914d\u7f6e\u597d\u73af\u5883\u53d8\u91cf\u4e4b\u540e&#xff0c;\u53ef\u4ee5\u6253\u5f00CMD\u7a97\u53e3&#xff0c;\u4ee5\u8fd9\u4e24\u4e2a\u547d\u4ee4\u5f00\u542f\u6216\u8005\u5173\u95edRabbitMq\u670d\u52a1&#xff1a; Rabbitmq-service start\u5f00\u59cb\u670d\u52a1 Rabbitmq-service stop\u505c\u6b62\u670d\u52a1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"747\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223709-6802d41589e1c.png\" width=\"1221\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"662\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223709-6802d415e8420.png\" width=\"1300\" \/><\/p>\n<p>http:\/\/localhost:15672\u6253\u5f00\u6d4f\u89c8\u5668\u7684\u670d\u52a1<\/p>\n<ul>\n<li>\u7528\u6237\u540d&#xff1a;guest<\/li>\n<li>\u5bc6\u7801&#xff1a;guest<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"144\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223710-6802d416495cf.png\" width=\"1281\" \/><\/li>\n<\/ul>\n<\/p>\n<h3>6.MySql<\/h3>\n<p>mysql\u600e\u4e48\u5728\u672c\u673a\u4f7f\u7528\u5c40\u57df\u7f51\u8fde\u63a5<\/p>\n<p>1.\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>C:\\\\ProgramData\\\\MySQL\\\\MySQL Server 8.0<\/p>\n<p>\u53bb\u8fd9\u91cc\u627e\u5230my.ini\u914d\u7f6e\u6587\u4ef6&#xff0c;\u6dfb\u52a0\u5982\u4e0b\u914d\u7f6e&#xff0c;\u9009\u4e00\u4e2a\u5c31\u597d\u4e86<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"964\" src=\"2025-04-19jclhcnv5ype.png\" width=\"1248\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"841\" src=\"2025-04-19rq5rayt32sn.png\" width=\"1187\" \/><\/p>\n<p>mysql -u root&#xff08;\u8d26\u53f7&#xff09; -p \u7136\u540e\u8f93\u5165\u5bc6\u7801\u8fdb\u5165\u547d\u4ee4\u884c<\/p>\n<p>create user &#039;root&#039;&#064;&#039;192.168.223.57&#039; identified by &#039;607607&#039;;<\/p>\n<p>\u00a0grant all privileges on *.* to &#039;root&#039;&#064;&#039;192.168.223.57&#039;;<\/p>\n<p>\u00a0select host,user from mysql.user where user&#061;&#039;root&#039;;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"922\" src=\"2025-04-19epkjoglkwjy.png\" width=\"1077\" \/><\/p>\n<p>\u5728\u8fd9\u91cc\u8fd0\u884c\u5982\u4e0b\u8bed\u53e5\u5373\u53ef&#xff01;&#xff01;&#xff01;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"813\" src=\"2025-04-193lkveytf4vh.png\" width=\"1358\" \/><\/p>\n<\/p>\n<h3 style=\"background-color:transparent\">7.\u57df\u540d\u9690\u85cf<\/h3>\n<p>C:\\\\Windows\\\\System32\\\\drivers\\\\etc<\/p>\n<p>\u4fee\u6539hosts\u6587\u4ef6<\/p>\n<\/p>\n<h3>8.nginx<\/h3>\n<p>1.\u542f\u52a8\u670d\u52a1\u5668 \u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u8fdb\u5165nginx\u4e2d&#xff0c;\u8f93\u5165\u4e00\u4e0b\u547d\u4ee4(\u6ce8\u610f&#xff1a;\u56de\u8f66\u786e\u8ba4\u662f\u4f1a\u51fa\u73b0\u4e00\u95ea&#xff0c;\u8fd9\u662f\u6b63\u5e38\u73b0\u8c61&#xff09;&#xff1a;<\/p>\n<p>start nginx\u00a0 <\/p>\n<p> 2\u3001\u518d\u662f\u67e5\u770b\u4efb\u52a1\u8fdb\u7a0b\u662f\u5426\u5b58\u5728&#xff0c;dos\u6216\u6253\u5f00\u4efb\u52a1\u7ba1\u7406\u5668\u90fd\u884c \u6211\u4eec\u4ee5\u547d\u4ee4\u63d0\u793a\u67e5\u770b\u65b9\u5f0f\u8f93\u5165\u4e00\u4e0b\u547d\u4ee4<\/p>\n<p>tasklist \/fi &#034;imagename eq nginx.exe&#034; <\/p>\n<p> \u00a03\u3001\u6700\u540e\u4e00\u6b65\u662f\u6253\u5f00\u6211\u4eec\u7684\u6d4f\u89c8\u5668\u8bbf\u95ee\u521a\u624d\u7684\u57df\u540d\u53ca\u7aef\u53e3&#xff0c;nginx\u9ed8\u8ba4http:\/\/localhost:80\u6216127.0.0.1:80&#xff0c;\u9ed8\u8ba4\u7aef\u53e3\u53f7\u662f80&#xff0c;\u51fa\u73b0Welcome to nginx!\u5c31\u8bf4\u660e\u90e8\u7f72\u6210\u529f\u4e86&#xff01;<\/p>\n<p>\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"448\" src=\"2025-04-19mtuuiridkdk.png\" width=\"775\" \/><\/p>\n<p>\u542f\u52a8\/\u505c\u6b62 NGINX:<\/p>\n<p>nginx -s start\/stop:\u542f\u52a8\u6216\u505c\u6b62 NGINX \u670d\u52a1\u3002 \u67e5\u770b NGINX \u72b6\u6001:<\/p>\n<p>nginx -t:\u68c0\u67e5 NGINX \u662f\u5426\u6b63\u5e38\u5de5\u4f5c&#xff0c;\u5e76\u663e\u793a\u4efb\u4f55\u9519\u8bef\u6216\u8b66\u544a\u4fe1\u606f\u3002 \u914d\u7f6e NGINX:<\/p>\n<p>nginx.conf:\u6253\u5f00 NGINX \u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u3002\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u6dfb\u52a0\u3001\u7f16\u8f91\u6216\u5220\u9664\u914d\u7f6e\u9009\u9879&#xff0c;\u4ee5\u81ea\u5b9a\u4e49 NGINX \u7684\u884c\u4e3a\u3002<\/p>\n<p> \u67e5\u627e\u548c\u4fee\u6539 NGINX \u914d\u7f6e:<\/p>\n<p>nginx -c \/path\/to\/nginx.conf:\u5728 NGINX \u914d\u7f6e\u6587\u4ef6\u4e2d\u67e5\u627e\u6216\u4fee\u6539\u7279\u5b9a\u914d\u7f6e\u9009\u9879\u3002\u5176\u4e2d&#xff0c;\/path\/to\/nginx.conf\u662f\u8981\u67e5\u627e\u6216\u4fee\u6539\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\u3002<\/p>\n<p> \u52a0\u8f7d NGINX \u6a21\u5757:<\/p>\n<p>nginx -m:\u52a0\u8f7d NGINX \u6a21\u5757\u3002NGINX \u652f\u6301\u591a\u79cd\u6a21\u5757&#xff0c;\u4f8b\u5982\u7f13\u5b58\u3001SSL \u7ec8\u6b62\u3001\u8d1f\u8f7d\u5747\u8861\u7b49&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u6b64\u547d\u4ee4\u52a0\u8f7d\u8fd9\u4e9b\u6a21\u5757\u3002<\/p>\n<p> \u5217\u51fa\u6240\u6709 NGINX \u5b88\u62a4\u8fdb\u7a0b:<\/p>\n<p>nginx -t:\u68c0\u67e5 NGINX \u5b88\u62a4\u8fdb\u7a0b\u7684\u72b6\u6001&#xff0c;\u5e76\u663e\u793a\u4efb\u4f55\u9519\u8bef\u6216\u8b66\u544a\u4fe1\u606f\u3002 \u91cd\u542f NGINX \u5b88\u62a4\u8fdb\u7a0b:<\/p>\n<p>nginx -s restart:\u91cd\u542f NGINX \u5b88\u62a4\u8fdb\u7a0b\u3002<\/p>\n<p> \u67e5\u770b NGINX \u65e5\u5fd7:<\/p>\n<p>nginx -t:\u68c0\u67e5 NGINX \u65e5\u5fd7\u6587\u4ef6\u7684\u72b6\u6001&#xff0c;\u5e76\u663e\u793a\u4efb\u4f55\u9519\u8bef\u6216\u8b66\u544a\u4fe1\u606f\u3002<\/p>\n<p> \u914d\u7f6e NGINX \u65e5\u5fd7:<\/p>\n<p>nginx.conf:\u914d\u7f6e NGINX \u65e5\u5fd7\u6587\u4ef6\u7684\u4f4d\u7f6e\u3001\u5927\u5c0f\u3001\u5199\u5165\u6743\u9650\u7b49\u3002 \u76d1\u89c6 NGINX \u6027\u80fd:<\/p>\n<p>nginx -t:\u68c0\u67e5 NGINX \u6027\u80fd\u72b6\u6001&#xff0c;\u5e76\u663e\u793a\u4efb\u4f55\u9519\u8bef\u6216\u8b66\u544a\u4fe1\u606f\u3002 \u00a0<\/p>\n<p>\u914d\u7f6e NGINX \u6027\u80fd\u76d1\u89c6: nginx.conf:\u914d\u7f6e NGINX \u6027\u80fd\u76d1\u89c6\u7684\u53c2\u6570\u548c\u65b9\u5f0f\u3002 \u8fd9\u4e9b\u662f NGINX \u7684\u6240\u6709\u547d\u4ee4\u5927\u5168&#xff0c;\u60a8\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u547d\u4ee4\u6765\u914d\u7f6e\u3001\u7ba1\u7406\u3001\u76d1\u89c6\u548c\u7ef4\u62a4 NGINX\u3002\u719f\u7ec3\u638c\u63e1\u8fd9\u4e9b\u547d\u4ee4\u53ef\u4ee5\u5e2e\u52a9\u60a8\u66f4\u6709\u6548\u5730\u7ba1\u7406 NGINX&#xff0c;\u5e76\u63d0\u9ad8\u5176\u6027\u80fd\u3002 \u00a0<\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb996\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95eehttp:\/\/localhost:8848\/nacos\uff0c\u5982\u679c\u80fd\u591f\u770b\u5230Nacos\u7684\u767b\u5f55\u9875\u9762\uff0c\u5219\u8bf4\u660eNacos\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u5e76\u542f\u52a8\u3002\u7ba1\u7406\u5458\u542f\u52a8\uff1aredis-cli -m 607607  \u6216\u8005redis server-m 607607\u3002\u542f\u52a8\u6253\u5f00\u5bf9\u5e94\u7684bin\u76ee\u5f55\u4e0b\u7684\u7ec8\u7aef\uff1astartup.cmd -m standalone\u3002\u68c0\u67e5 Docker \u670d\u52a1\u72b6\u6001\uff0cdocker\u662f\u5426\u8fd0\u884c\u3002\u539f\u56e0\uff1a\u53ef\u80fd\u662f\u7cfb\u7edf\u5b89\u88c5\u4e0d\u5b8c\u6574\uff0c\u8fdb\u884c\u5b8c\u6574\u7684\u91cd\u65b0\u5b89\u88c5\u3002\u67e5\u8be2Docker\u5bb9\u5668\uff1adocker ps\u3002\u955c\u50cf\u52a0\u901f\u5668\uff0c\u4e5f\u53ef\u4ee5\u662f\u5176\u4ed6\u7684\u52a0\u901f\u5668\u3002<\/p>\n","protected":false},"author":2,"featured_media":22878,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-22898","post","type-post","status-publish","format-standard","has-post-thumbnail","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>\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed - \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\/22898.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb996\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95eehttp:\/\/localhost:8848\/nacos\uff0c\u5982\u679c\u80fd\u591f\u770b\u5230Nacos\u7684\u767b\u5f55\u9875\u9762\uff0c\u5219\u8bf4\u660eNacos\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u5e76\u542f\u52a8\u3002\u7ba1\u7406\u5458\u542f\u52a8\uff1aredis-cli -m 607607 \u6216\u8005redis server-m 607607\u3002\u542f\u52a8\u6253\u5f00\u5bf9\u5e94\u7684bin\u76ee\u5f55\u4e0b\u7684\u7ec8\u7aef\uff1astartup.cmd -m standalone\u3002\u68c0\u67e5 Docker \u670d\u52a1\u72b6\u6001\uff0cdocker\u662f\u5426\u8fd0\u884c\u3002\u539f\u56e0\uff1a\u53ef\u80fd\u662f\u7cfb\u7edf\u5b89\u88c5\u4e0d\u5b8c\u6574\uff0c\u8fdb\u884c\u5b8c\u6574\u7684\u91cd\u65b0\u5b89\u88c5\u3002\u67e5\u8be2Docker\u5bb9\u5668\uff1adocker ps\u3002\u955c\u50cf\u52a0\u901f\u5668\uff0c\u4e5f\u53ef\u4ee5\u662f\u5176\u4ed6\u7684\u52a0\u901f\u5668\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/22898.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-18T22:37:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223701-6802d40d37990.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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22898.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/22898.html\",\"name\":\"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T22:37:11+00:00\",\"dateModified\":\"2025-04-18T22:37:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/22898.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/22898.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22898.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed\"}]},{\"@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":"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed - \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\/22898.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb996\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95eehttp:\/\/localhost:8848\/nacos\uff0c\u5982\u679c\u80fd\u591f\u770b\u5230Nacos\u7684\u767b\u5f55\u9875\u9762\uff0c\u5219\u8bf4\u660eNacos\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u5e76\u542f\u52a8\u3002\u7ba1\u7406\u5458\u542f\u52a8\uff1aredis-cli -m 607607 \u6216\u8005redis server-m 607607\u3002\u542f\u52a8\u6253\u5f00\u5bf9\u5e94\u7684bin\u76ee\u5f55\u4e0b\u7684\u7ec8\u7aef\uff1astartup.cmd -m standalone\u3002\u68c0\u67e5 Docker \u670d\u52a1\u72b6\u6001\uff0cdocker\u662f\u5426\u8fd0\u884c\u3002\u539f\u56e0\uff1a\u53ef\u80fd\u662f\u7cfb\u7edf\u5b89\u88c5\u4e0d\u5b8c\u6574\uff0c\u8fdb\u884c\u5b8c\u6574\u7684\u91cd\u65b0\u5b89\u88c5\u3002\u67e5\u8be2Docker\u5bb9\u5668\uff1adocker ps\u3002\u955c\u50cf\u52a0\u901f\u5668\uff0c\u4e5f\u53ef\u4ee5\u662f\u5176\u4ed6\u7684\u52a0\u901f\u5668\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/22898.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T22:37:11+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418223701-6802d40d37990.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/22898.html","url":"https:\/\/www.wsisp.com\/helps\/22898.html","name":"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T22:37:11+00:00","dateModified":"2025-04-18T22:37:11+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/22898.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/22898.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/22898.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4e0b\u8f7d\u4ee5\u540e\u5404\u4e2a\u8f6f\u4ef6\u6216\u8005\u670d\u52a1\u5668\u7684\u542f\u52a8\u4e0e\u5173\u95ed"}]},{"@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\/22898","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=22898"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22898\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/22878"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=22898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=22898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=22898"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=22898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}