{"id":101,"date":"2025-12-10T19:23:16","date_gmt":"2025-12-10T11:23:16","guid":{"rendered":"https:\/\/zcc609.online\/?p=101"},"modified":"2025-12-10T19:23:16","modified_gmt":"2025-12-10T11:23:16","slug":"%e5%85%a8%e6%a0%88%e9%a1%b9%e7%9b%ae%e9%83%a8%e7%bd%b2%e5%ae%9e%e6%88%98%ef%bc%9a%e4%bb%8e%e9%9b%b6%e5%88%b0%e4%b8%8a%e7%ba%bf%e7%9a%84%e5%ae%8c%e6%95%b4%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/zcc609.online\/?p=101","title":{"rendered":"\u5168\u6808\u9879\u76ee\u90e8\u7f72\u5b9e\u6218\uff1a\u4ece\u96f6\u5230\u4e0a\u7ebf\u7684\u5b8c\u6574\u6307\u5357"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u524d\u8a00<\/h2>\n\n\n\n<p>\u672c\u6587\u8bb0\u5f55\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684\u5168\u6808\u9879\u76ee\uff08Spring Boot + React\uff09\u4ece\u672c\u5730\u5f00\u53d1\u5230\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u7684\u5168\u8fc7\u7a0b\uff0c\u5305\u62ec\u9047\u5230\u7684\u6240\u6709\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6848\u3002\u9879\u76ee\u6700\u7ec8\u90e8\u7f72\u5728 CentOS 7 \u670d\u52a1\u5668\u4e0a\uff0c\u901a\u8fc7 IP \u5730\u5740\u76f4\u63a5\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p><strong>\u9879\u76ee\u6280\u672f\u6808\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u540e\u7aef\uff1aJava 17 + Spring Boot 3.1.5 + Spring Security + JWT<\/li>\n\n\n\n<li>\u524d\u7aef\uff1aReact 18 + Ant Design + Vite<\/li>\n\n\n\n<li>\u670d\u52a1\u5668\uff1aCentOS 7 + Nginx + \u5b9d\u5854\u9762\u677f<\/li>\n<\/ul>\n\n\n\n<p><strong>\u6700\u7ec8\u6548\u679c\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bbf\u95ee\u5730\u5740\uff1a\u00a0<code class=\"\">http:\/\/\u670d\u52a1\u5668IP<\/code><\/li>\n\n\n\n<li>\u524d\u7aef\u548c\u540e\u7aef\u5206\u79bb\u90e8\u7f72<\/li>\n\n\n\n<li>Nginx \u53cd\u5411\u4ee3\u7406\u5b9e\u73b0\u7edf\u4e00\u8bbf\u95ee<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u670d\u52a1\u5668\u73af\u5883\u51c6\u5907<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 \u670d\u52a1\u5668\u57fa\u672c\u4fe1\u606f<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS 7.9\n\u7ba1\u7406\u5de5\u5177\uff1a\u5b9d\u5854\u9762\u677f\n\u670d\u52a1\u5668 IP\uff1a101.32.242.75\uff08\u793a\u4f8b\uff09\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">1.2 \u5b89\u88c5 Java 17<\/h3>\n\n\n\n<p>CentOS 7 \u9ed8\u8ba4\u7684 Java \u7248\u672c\u592a\u4f4e\uff0c\u9700\u8981\u624b\u52a8\u5b89\u88c5 OpenJDK 17\u3002<\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# 1. \u4e0b\u8f7d OpenJDK 17\ncd \/opt\nwget https:\/\/download.java.net\/java\/GA\/jdk17.0.2\/dfd4a8d0985749f896bed50d7138ee7f\/8\/GPL\/openjdk-17.0.2_linux-x64_bin.tar.gz\n\n# 2. \u89e3\u538b\ntar -zxvf openjdk-17.0.2_linux-x64_bin.tar.gz\n\n# 3. \u914d\u7f6e\u73af\u5883\u53d8\u91cf\ncat &gt;&gt; \/etc\/profile &amp;lt;&amp;lt; 'EOF'\nexport JAVA_HOME=\/opt\/jdk-17.0.2\nexport PATH=$JAVA_HOME\/bin:$PATH\nEOF\n\n# 4. \u4f7f\u914d\u7f6e\u751f\u6548\nsource \/etc\/profile\n\n# 5. \u9a8c\u8bc1\u5b89\u88c5\njava -version\n# \u8f93\u51fa\uff1aopenjdk version &quot;17.0.2&quot; 2022-01-18\n\n<\/pre><\/div>\n\n\n<p><strong>\u26a0\ufe0f \u5e38\u89c1\u95ee\u9898\uff1a<\/strong>&nbsp;\u6587\u4ef6\u540d\u4e0d\u5339\u914d<\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u4e0b\u8f7d\u540e\u5148\u7528&nbsp;<code class=\"\">ls<\/code>&nbsp;\u67e5\u770b\u5b9e\u9645\u6587\u4ef6\u540d\uff0c\u518d\u89e3\u538b\u3002<\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nls -lh \/opt\/*.tar.gz\ntar -zxvf openjdk-17.0.2_linux-x64_bin.tar.gz  # \u4f7f\u7528\u5b9e\u9645\u6587\u4ef6\u540d\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">1.3 \u5b89\u88c5 Maven<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# 1. \u4e0b\u8f7d Maven 3.9.9\ncd \/opt\nwget https:\/\/mirrors.tuna.tsinghua.edu.cn\/apache\/maven\/maven-3\/3.9.9\/binaries\/apache-maven-3.9.9-bin.tar.gz\n\n# 2. \u89e3\u538b\ntar -zxvf apache-maven-3.9.9-bin.tar.gz\n\n# 3. \u914d\u7f6e\u73af\u5883\u53d8\u91cf\ncat &gt;&gt; \/etc\/profile &amp;lt;&amp;lt; 'EOF'\nexport MAVEN_HOME=\/opt\/apache-maven-3.9.9\nexport PATH=$MAVEN_HOME\/bin:$PATH\nEOF\n\n# 4. \u4f7f\u914d\u7f6e\u751f\u6548\nsource \/etc\/profile\n\n# 5. \u9a8c\u8bc1\u5b89\u88c5\nmvn -version\n\n<\/pre><\/div>\n\n\n<p><strong>\u4f18\u5316\u5efa\u8bae\uff1a<\/strong>&nbsp;\u914d\u7f6e\u56fd\u5185\u955c\u50cf\u52a0\u901f\u4f9d\u8d56\u4e0b\u8f7d<\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncat &gt; ~\/.m2\/settings.xml &amp;lt;&amp;lt; 'EOF'\n&amp;lt;settings&gt;\n  &amp;lt;mirrors&gt;\n    &amp;lt;mirror&gt;\n      &amp;lt;id&gt;aliyun&amp;lt;\/id&gt;\n      &amp;lt;mirrorOf&gt;central&amp;lt;\/mirrorOf&gt;\n      &amp;lt;url&gt;https:\/\/maven.aliyun.com\/repository\/public&amp;lt;\/url&gt;\n    &amp;lt;\/mirror&gt;\n  &amp;lt;\/mirrors&gt;\n&amp;lt;\/settings&gt;\nEOF\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">1.4 \u5b89\u88c5 Nginx<\/h3>\n\n\n\n<p>\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u5b89\u88c5 Nginx\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u767b\u5f55\u5b9d\u5854\u9762\u677f\uff1a\u00a0<code class=\"\">http:\/\/\u670d\u52a1\u5668IP:8888<\/code><\/li>\n\n\n\n<li>\u8f6f\u4ef6\u5546\u5e97 \u2192 \u641c\u7d22 Nginx \u2192 \u5b89\u88c5<\/li>\n<\/ol>\n\n\n\n<p>\u6216\u8005\u547d\u4ee4\u884c\u5b89\u88c5\uff1a<\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nyum install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u540e\u7aef\u90e8\u7f72<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">2.1 \u4e0a\u4f20\u4ee3\u7801\u5230\u670d\u52a1\u5668<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u9879\u76ee\u76ee\u5f55\nmkdir -p \/home\/restaurant-reservation\n\n# \u4ece\u672c\u5730\u4e0a\u4f20\u540e\u7aef\u4ee3\u7801\ncd ~\/Desktop\/restaurant-reservation\nscp -r backend root@\u670d\u52a1\u5668IP:\/home\/restaurant-reservation\/\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2.2 \u7f16\u8bd1\u540e\u7aef\u9879\u76ee<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# SSH \u8fde\u63a5\u5230\u670d\u52a1\u5668\nssh root@\u670d\u52a1\u5668IP\n\n# \u8fdb\u5165\u540e\u7aef\u76ee\u5f55\ncd \/home\/restaurant-reservation\/backend\n\n# \u7f16\u8bd1\u9879\u76ee\uff08\u8df3\u8fc7\u6d4b\u8bd5\uff09\nmvn clean package -DskipTests\n\n# \u7f16\u8bd1\u5b8c\u6210\u540e\u68c0\u67e5 jar \u6587\u4ef6\nls -lh target\/*.jar\n\n<\/pre><\/div>\n\n\n<p><strong>\u8f93\u51fa\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n-rw-r--r-- 1 root root 50M Dec 10 18:00 reservation-system-1.0.0.jar\n\n<\/pre><\/div>\n\n\n<p><strong>\u26a0\ufe0f \u5e38\u89c1\u95ee\u9898\uff1a<\/strong>&nbsp;\u7f16\u8bd1\u8d85\u65f6\u6216\u4f9d\u8d56\u4e0b\u8f7d\u5931\u8d25<\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong>&nbsp;\u786e\u4fdd\u5df2\u914d\u7f6e Maven \u963f\u91cc\u4e91\u955c\u50cf\uff08\u89c1 1.3 \u8282\uff09<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u524d\u7aef\u90e8\u7f72<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">3.1 \u4e3a\u4ec0\u4e48\u8981\u5728\u672c\u5730\u6784\u5efa\uff1f<\/h3>\n\n\n\n<p>CentOS 7 \u7684 glibc \u7248\u672c\u8fc7\u4f4e\uff0c\u65e0\u6cd5\u5f88\u597d\u5730\u652f\u6301\u6700\u65b0\u7684 Node.js \u548c Vite\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u6784\u5efa\u524d\u7aef\u4f1a\u9047\u5230\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nerror during build:\nTypeError: crypto$2.getRandomValues is not a function\n\n<\/pre><\/div>\n\n\n<p><strong>\u6700\u4f73\u5b9e\u8df5\uff1a<\/strong>&nbsp;\u5728\u672c\u5730 Mac\/Windows \u4e0a\u6784\u5efa\uff0c\u7136\u540e\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.2 \u672c\u5730\u6784\u5efa\u524d\u7aef<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u5728\u672c\u5730\u8fdb\u5165\u524d\u7aef\u76ee\u5f55\ncd ~\/Desktop\/restaurant-reservation\/frontend\n\n# \u5b89\u88c5\u4f9d\u8d56\uff08\u9996\u6b21\uff09\nnpm install\n\n# \u6784\u5efa\u751f\u4ea7\u7248\u672c\nnpm run build\n\n# \u6784\u5efa\u6210\u529f\u540e\uff0cdist \u76ee\u5f55\u5305\u542b\u6240\u6709\u9759\u6001\u6587\u4ef6\nls -lh dist\/\n\n<\/pre><\/div>\n\n\n<p><strong>\u6784\u5efa\u8f93\u51fa\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndist\/index.html                     0.58 kB \u2502 gzip:   0.44 kB\ndist\/assets\/index-BOrl-zwt.css      0.27 kB \u2502 gzip:   0.22 kB\ndist\/assets\/index-DlJaEm6z.js   2,717.96 kB \u2502 gzip: 834.43 kB\n\u2713 built in 13.07s\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">3.3 \u4e0a\u4f20\u5230\u670d\u52a1\u5668<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u4e0a\u4f20\u6784\u5efa\u597d\u7684 dist \u76ee\u5f55\nscp -r dist root@\u670d\u52a1\u5668IP:\/home\/restaurant-reservation\/frontend\/\n\n# \u8f93\u5165\u5bc6\u7801\uff0c\u7b49\u5f85\u4e0a\u4f20\u5b8c\u6210\n\n<\/pre><\/div>\n\n\n<p><strong>\ud83d\udca1 \u63d0\u793a\uff1a<\/strong>&nbsp;\u8f93\u5165\u5bc6\u7801\u65f6\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u5b57\u7b26\uff0c\u8fd9\u662f\u6b63\u5e38\u7684\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u914d\u7f6e Nginx<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">4.1 \u521b\u5efa Nginx \u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# SSH \u5230\u670d\u52a1\u5668\nssh root@\u670d\u52a1\u5668IP\n\n# \u521b\u5efa\u914d\u7f6e\u6587\u4ef6\ncat &gt; \/www\/server\/panel\/vhost\/nginx\/restaurant.conf &amp;lt;&amp;lt; 'EOF'\nserver {\n    listen 80;\n    server_name \u670d\u52a1\u5668IP;\n\n    # \u524d\u7aef\u9759\u6001\u6587\u4ef6\n    root \/home\/restaurant-reservation\/frontend\/dist;\n    index index.html;\n\n    # \u524d\u7aef\u8def\u7531\uff08SPA\uff09\n    location \/ {\n        try_files $uri $uri\/ \/index.html;\n    }\n\n    # \u540e\u7aef API \u4ee3\u7406\n    location \/api\/ {\n        proxy_pass http:\/\/127.0.0.1:8080\/api\/;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}\nEOF\n\n<\/pre><\/div>\n\n\n<p><strong>\u914d\u7f6e\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code class=\"\">listen 80<\/code>\u00a0\uff1a\u76d1\u542c 80 \u7aef\u53e3\uff08HTTP\uff09<\/li>\n\n\n\n<li><code class=\"\">root<\/code>\u00a0\uff1a\u524d\u7aef\u9759\u6001\u6587\u4ef6\u76ee\u5f55<\/li>\n\n\n\n<li><code class=\"\">location \/<\/code>\u00a0\uff1a\u5904\u7406\u524d\u7aef\u8def\u7531\uff0c\u6240\u6709\u8def\u5f84\u90fd\u8fd4\u56de index.html\uff08SPA \u5fc5\u9700\uff09<\/li>\n\n\n\n<li><code class=\"\">location \/api\/<\/code>\u00a0\uff1a\u53cd\u5411\u4ee3\u7406\u540e\u7aef API\uff0c\u524d\u7aef\u901a\u8fc7\u00a0<code class=\"\">\/api\/xxx<\/code>\u00a0\u8bbf\u95ee\u540e\u7aef<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4.2 \u6d4b\u8bd5\u5e76\u91cd\u542f Nginx<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u6d4b\u8bd5\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\nnginx -t\n# \u8f93\u51fa\uff1anginx: configuration file test is successful\n\n# \u91cd\u542f Nginx\n\/etc\/init.d\/nginx restart\n\n<\/pre><\/div>\n\n\n<p><strong>\u26a0\ufe0f \u5e38\u89c1\u95ee\u9898\uff1a<\/strong>&nbsp;<code class=\"\">nginx: [error] invalid PID number<\/code><\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong>&nbsp;\u4f7f\u7528\u5b9d\u5854\u63d0\u4f9b\u7684\u542f\u52a8\u811a\u672c\uff0c\u4e0d\u8981\u7528&nbsp;<code class=\"\">nginx -s reload<\/code><\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/init.d\/nginx restart\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u542f\u52a8\u670d\u52a1<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">5.1 \u521b\u5efa\u4e00\u952e\u542f\u52a8\u811a\u672c<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncat &gt; \/home\/restaurant-reservation\/start-server.sh &amp;lt;&amp;lt; 'EOF'\n#!\/bin\/bash\n\necho &quot;==========================================&quot;\necho &quot;\u542f\u52a8\u9910\u5385\u9884\u8ba2\u7cfb\u7edf&quot;\necho &quot;==========================================&quot;\n\n# \u8bbe\u7f6e Java 17\nexport JAVA_HOME=\/opt\/jdk-17.0.2\nexport PATH=$JAVA_HOME\/bin:$PATH\n\n# \u91cd\u542f Nginx\necho &quot;1. \u91cd\u542f Nginx...&quot;\n\/etc\/init.d\/nginx restart\nsleep 2\n\n# \u505c\u6b62\u65e7\u7684\u540e\u7aef\u8fdb\u7a0b\necho &quot;2. \u505c\u6b62\u65e7\u7684\u540e\u7aef\u8fdb\u7a0b...&quot;\npkill -f 'reservation-system'\nsleep 2\n\n# \u542f\u52a8\u540e\u7aef\u670d\u52a1\necho &quot;3. \u542f\u52a8\u540e\u7aef\u670d\u52a1...&quot;\ncd \/home\/restaurant-reservation\nnohup java -jar backend\/target\/reservation-system-1.0.0.jar &gt; backend.log 2&gt;&amp;amp;1 &amp;amp;\necho &quot;\u540e\u7aef\u8fdb\u7a0b PID: $!&quot;\n\n# \u7b49\u5f85\u542f\u52a8\necho &quot;4. \u7b49\u5f85\u540e\u7aef\u542f\u52a8\uff0815\u79d2\uff09...&quot;\nsleep 15\n\n# \u68c0\u67e5\u670d\u52a1\u72b6\u6001\necho &quot;5. \u68c0\u67e5\u670d\u52a1\u72b6\u6001...&quot;\nps aux | grep nginx | grep -v grep | head -n 2\nps aux | grep java | grep reservation | grep -v grep\n\necho &quot;&quot;\necho &quot;==========================================&quot;\necho &quot;\u2705 \u7cfb\u7edf\u542f\u52a8\u5b8c\u6210\uff01&quot;\necho &quot;==========================================&quot;\necho &quot;\u8bbf\u95ee\u5730\u5740: http:\/\/\u670d\u52a1\u5668IP&quot;\necho &quot;\u67e5\u770b\u65e5\u5fd7: tail -f \/home\/restaurant-reservation\/backend.log&quot;\nEOF\n\n# \u8d4b\u4e88\u6267\u884c\u6743\u9650\nchmod +x \/home\/restaurant-reservation\/start-server.sh\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">5.2 \u542f\u52a8\u7cfb\u7edf<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/home\/restaurant-reservation\/start-server.sh\n\n<\/pre><\/div>\n\n\n<p><strong>\u8f93\u51fa\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n==========================================\n\u542f\u52a8\u9910\u5385\u9884\u8ba2\u7cfb\u7edf\n==========================================\n\n\u4f7f\u7528 Java \u7248\u672c:\nopenjdk version &quot;17.0.2&quot; 2022-01-18\n\n==========================================\n1. \u91cd\u542f Nginx...\n==========================================\nStarting nginx...  done\n\n==========================================\n2. \u505c\u6b62\u65e7\u7684\u540e\u7aef\u8fdb\u7a0b...\n==========================================\n\n==========================================\n3. \u542f\u52a8\u540e\u7aef\u670d\u52a1...\n==========================================\n\u540e\u7aef\u8fdb\u7a0b PID: 25544\n\n==========================================\n4. \u7b49\u5f85\u540e\u7aef\u542f\u52a8\uff0815\u79d2\uff09...\n==========================================\n\n==========================================\n5. \u68c0\u67e5\u670d\u52a1\u72b6\u6001...\n==========================================\n\nNginx \u8fdb\u7a0b:\nroot     25519  0.0  0.2 143312  4804 ?        Ss   18:16   0:00 nginx: master process\n\n\u540e\u7aef\u8fdb\u7a0b:\nroot     25544  132 13.8 3229216 282728 pts\/1  Sl+  18:16   0:19 java -jar backend\/target\/reservation-system-1.0.0.jar\n\n==========================================\n\u2705 \u7cfb\u7edf\u542f\u52a8\u5b8c\u6210\uff01\n==========================================\n\u8bbf\u95ee\u5730\u5740: http:\/\/\u670d\u52a1\u5668IP\n\u67e5\u770b\u65e5\u5fd7: tail -f \/home\/restaurant-reservation\/backend.log\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u9a8c\u8bc1\u90e8\u7f72<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">6.1 \u6d4b\u8bd5\u524d\u7aef<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -I http:\/\/localhost:80\n\n<\/pre><\/div>\n\n\n<p><strong>\u671f\u671b\u8f93\u51fa\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nHTTP\/1.1 200 OK\nServer: nginx\nContent-Type: text\/html\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">6.2 \u6d4b\u8bd5\u540e\u7aef API<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u6d4b\u8bd5\u767b\u5f55\u63a5\u53e3\ncurl -X POST http:\/\/localhost:8080\/api\/auth\/login \\\n  -H &quot;Content-Type: application\/json&quot; \\\n  -d '{&quot;username&quot;:&quot;user1&quot;,&quot;password&quot;:&quot;123456&quot;}'\n\n<\/pre><\/div>\n\n\n<p><strong>\u671f\u671b\u8f93\u51fa\uff1a<\/strong><\/p>\n\n\n\n<p><strong>json<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n  &quot;token&quot;: &quot;eyJhbGciOiJIUzI1NiJ9...&quot;,\n  &quot;type&quot;: &quot;Bearer&quot;,\n  &quot;user&quot;: {\n    &quot;id&quot;: 1,\n    &quot;username&quot;: &quot;user1&quot;,\n    &quot;role&quot;: &quot;USER&quot;\n  }\n}\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">6.3 \u6d4f\u89c8\u5668\u8bbf\u95ee<\/h3>\n\n\n\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee\uff1a&nbsp;<code class=\"\">http:\/\/\u670d\u52a1\u5668IP<\/code><\/p>\n\n\n\n<p>\u5982\u679c\u80fd\u770b\u5230\u767b\u5f55\u9875\u9762\uff0c\u8bf4\u660e\u90e8\u7f72\u6210\u529f\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001\u5b9e\u6218\u4e2d\u9047\u5230\u7684\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6848<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u9898 1\uff1a\u627e\u4e0d\u5230 jar \u6587\u4ef6<\/h3>\n\n\n\n<p><strong>\u9519\u8bef\u4fe1\u606f\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nError: Unable to access jarfile backend\/target\/reservation-system-1.0-SNAPSHOT.jar\n\n<\/pre><\/div>\n\n\n<p><strong>\u539f\u56e0\uff1a<\/strong>&nbsp;\u542f\u52a8\u811a\u672c\u4e2d\u7684 jar \u6587\u4ef6\u540d\u4e0e\u5b9e\u9645\u7f16\u8bd1\u51fa\u7684\u6587\u4ef6\u540d\u4e0d\u4e00\u81f4\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# 1. \u67e5\u627e\u5b9e\u9645\u7684 jar \u6587\u4ef6\nfind \/home\/restaurant-reservation -name &quot;*.jar&quot; -type f\n\n# 2. \u4fee\u6539\u542f\u52a8\u811a\u672c\u4e2d\u7684\u6587\u4ef6\u540d\uff0c\u4f7f\u7528\u5b9e\u9645\u6587\u4ef6\u540d\n# \u4f8b\u5982\uff1areservation-system-1.0.0.jar \u800c\u4e0d\u662f reservation-system-1.0-SNAPSHOT.jar\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u9898 2\uff1a\u524d\u7aef\u6784\u5efa\u5931\u8d25<\/h3>\n\n\n\n<p><strong>\u9519\u8bef\u4fe1\u606f\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nerror during build:\nTypeError: crypto$2.getRandomValues is not a function\n\n<\/pre><\/div>\n\n\n<p><strong>\u539f\u56e0\uff1a<\/strong>&nbsp;CentOS 7 \u7684 glibc \u7248\u672c\u8fc7\u4f4e\uff0c\u4e0d\u652f\u6301\u65b0\u7248 Node.js \u548c Vite\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong>&nbsp;\u5728\u672c\u5730\u6784\u5efa\uff0c\u7136\u540e\u4e0a\u4f20\uff08\u89c1\u7b2c\u4e09\u7ae0\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u9898 3\uff1aAPI \u8fd4\u56de 403 Forbidden<\/h3>\n\n\n\n<p><strong>\u6d4b\u8bd5\u547d\u4ee4\uff1a<\/strong><\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl http:\/\/localhost:8080\/api\/restaurants\n\n<\/pre><\/div>\n\n\n<p><strong>\u8fd4\u56de\uff1a<\/strong><\/p>\n\n\n\n<p><strong>json<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{&quot;timestamp&quot;:&quot;2025-12-10T10:16:24.638+00:00&quot;,&quot;status&quot;:403,&quot;error&quot;:&quot;Forbidden&quot;,&quot;path&quot;:&quot;\/api\/restaurants&quot;}\n\n<\/pre><\/div>\n\n\n<p><strong>\u8bf4\u660e\uff1a<\/strong>&nbsp;\u8fd9\u662f<strong>\u6b63\u5e38\u73b0\u8c61<\/strong>\uff01\u8be5\u63a5\u53e3\u9700\u8981 JWT \u8ba4\u8bc1\u3002\u516c\u5f00\u63a5\u53e3\uff08\u5982\u767b\u5f55\u63a5\u53e3\uff09\u4e0d\u4f1a\u8fd4\u56de 403\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u9898 4\uff1aNginx PID \u9519\u8bef<\/h3>\n\n\n\n<p><strong>\u9519\u8bef\u4fe1\u606f\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnginx: &#x5B;error] invalid PID number &quot;&quot; in &quot;\/www\/server\/nginx\/logs\/nginx.pid&quot;\n\n<\/pre><\/div>\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u4e0d\u8981\u4f7f\u7528 nginx -s reload\n# \u4f7f\u7528\u5b9d\u5854\u63d0\u4f9b\u7684\u542f\u52a8\u811a\u672c\n\/etc\/init.d\/nginx restart\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u9898 5\uff1ascp \u4e0a\u4f20\u5931\u8d25<\/h3>\n\n\n\n<p><strong>\u9519\u8bef\u4fe1\u606f\uff1a<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPermission denied, please try again.\nssh_dispatch_run_fatal: Connection to \u670d\u52a1\u5668IP port 22: Broken pipe\n\n<\/pre><\/div>\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u786e\u8ba4\u5bc6\u7801\u6b63\u786e\uff08\u8f93\u5165\u65f6\u4e0d\u663e\u793a\u4efb\u4f55\u5b57\u7b26\uff09<\/li>\n\n\n\n<li>\u5982\u679c\u591a\u6b21\u5931\u8d25\uff0c\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u7684\u6587\u4ef6\u7ba1\u7406\u529f\u80fd\u4e0a\u4f20<\/li>\n\n\n\n<li>\u8bbf\u95ee\u5b9d\u5854\u9762\u677f \u2192 \u6587\u4ef6 \u2192 \u4e0a\u4f20<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u516b\u3001\u8fd0\u7ef4\u7ba1\u7406<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">8.1 \u5e38\u7528\u547d\u4ee4<\/h3>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u542f\u52a8\u7cfb\u7edf\n\/home\/restaurant-reservation\/start-server.sh\n\n# \u505c\u6b62\u540e\u7aef\npkill -f 'reservation-system'\n\n# \u91cd\u542f Nginx\n\/etc\/init.d\/nginx restart\n\n# \u67e5\u770b\u540e\u7aef\u65e5\u5fd7\ntail -f \/home\/restaurant-reservation\/backend.log\n\n# \u67e5\u770b\u6700\u540e 100 \u884c\u65e5\u5fd7\ntail -n 100 \/home\/restaurant-reservation\/backend.log\n\n# \u67e5\u770b\u8fdb\u7a0b\u72b6\u6001\nps aux | grep java\nps aux | grep nginx\n\n# \u67e5\u770b\u7aef\u53e3\u5360\u7528\nnetstat -tlnp | grep 8080\nnetstat -tlnp | grep 80\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">8.2 \u66f4\u65b0\u90e8\u7f72<\/h3>\n\n\n\n<p><strong>\u66f4\u65b0\u540e\u7aef\uff1a<\/strong><\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# 1. \u4e0a\u4f20\u65b0\u4ee3\u7801\nscp -r backend root@\u670d\u52a1\u5668IP:\/home\/restaurant-reservation\/\n\n# 2. SSH \u5230\u670d\u52a1\u5668\nssh root@\u670d\u52a1\u5668IP\n\n# 3. \u91cd\u65b0\u7f16\u8bd1\ncd \/home\/restaurant-reservation\/backend\nmvn clean package -DskipTests\n\n# 4. \u91cd\u542f\u670d\u52a1\n\/home\/restaurant-reservation\/start-server.sh\n\n<\/pre><\/div>\n\n\n<p><strong>\u66f4\u65b0\u524d\u7aef\uff1a<\/strong><\/p>\n\n\n\n<p><strong>bash<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# 1. \u672c\u5730\u6784\u5efa\ncd ~\/Desktop\/restaurant-reservation\/frontend\nnpm run build\n\n# 2. \u4e0a\u4f20\u5230\u670d\u52a1\u5668\nscp -r dist root@\u670d\u52a1\u5668IP:\/home\/restaurant-reservation\/frontend\/\n\n# 3. \u91cd\u542f Nginx\nssh root@\u670d\u52a1\u5668IP\n\/etc\/init.d\/nginx restart\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u4e5d\u3001\u67b6\u6784\u8bf4\u660e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">9.1 \u8bf7\u6c42\u6d41\u7a0b<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\u7528\u6237\u6d4f\u89c8\u5668\n    \u2193\nhttp:\/\/\u670d\u52a1\u5668IP\n    \u2193\nNginx (\u7aef\u53e3 80)\n    \u251c\u2500 \/ \u2192 \u524d\u7aef\u9759\u6001\u6587\u4ef6 (React)\n    \u2514\u2500 \/api\/ \u2192 \u53cd\u5411\u4ee3\u7406\u5230 http:\/\/127.0.0.1:8080\/api\/\n           \u2193\n       Spring Boot \u540e\u7aef (\u7aef\u53e3 8080)\n           \u2193\n       H2 \u5185\u5b58\u6570\u636e\u5e93\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">9.2 \u76ee\u5f55\u7ed3\u6784<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/home\/restaurant-reservation\/\n\u251c\u2500\u2500 backend\/\n\u2502   \u251c\u2500\u2500 src\/\n\u2502   \u251c\u2500\u2500 pom.xml\n\u2502   \u2514\u2500\u2500 target\/\n\u2502       \u2514\u2500\u2500 reservation-system-1.0.0.jar\n\u251c\u2500\u2500 frontend\/\n\u2502   \u2514\u2500\u2500 dist\/\n\u2502       \u251c\u2500\u2500 index.html\n\u2502       \u2514\u2500\u2500 assets\/\n\u251c\u2500\u2500 backend.log\n\u2514\u2500\u2500 start-server.sh\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u5341\u3001\u603b\u7ed3<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">10.1 \u5173\u952e\u70b9\u56de\u987e<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u73af\u5883\u51c6\u5907\u662f\u57fa\u7840<\/strong>\n<ul class=\"wp-block-list\">\n<li>Java 17\uff08\u4e0d\u80fd\u7528\u9ed8\u8ba4\u7684 Java 8\uff09<\/li>\n\n\n\n<li>Maven 3.9+<\/li>\n\n\n\n<li>Nginx<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u524d\u7aef\u6784\u5efa\u8981\u7075\u6d3b<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u670d\u52a1\u5668\u73af\u5883\u53d7\u9650\u65f6\uff0c\u672c\u5730\u6784\u5efa\u662f\u6700\u4f18\u89e3<\/li>\n\n\n\n<li>dist \u76ee\u5f55\u662f\u7eaf\u9759\u6001\u6587\u4ef6\uff0c\u53ef\u76f4\u63a5\u4e0a\u4f20\u4f7f\u7528<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Nginx \u914d\u7f6e\u662f\u6838\u5fc3<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u524d\u7aef\u9759\u6001\u6587\u4ef6\u670d\u52a1<\/li>\n\n\n\n<li>\u540e\u7aef API \u53cd\u5411\u4ee3\u7406<\/li>\n\n\n\n<li>SPA \u8def\u7531\u652f\u6301\uff08try_files\uff09<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u81ea\u52a8\u5316\u811a\u672c\u5f88\u91cd\u8981<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u51cf\u5c11\u624b\u52a8\u64cd\u4f5c<\/li>\n\n\n\n<li>\u907f\u514d\u9057\u6f0f\u6b65\u9aa4<\/li>\n\n\n\n<li>\u63d0\u9ad8\u90e8\u7f72\u6548\u7387<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u65e5\u5fd7\u662f\u6392\u67e5\u95ee\u9898\u7684\u5173\u952e<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5b9e\u65f6\u67e5\u770b\u65e5\u5fd7\uff1a\u00a0<code class=\"\">tail -f backend.log<\/code><\/li>\n\n\n\n<li>\u641c\u7d22\u9519\u8bef\uff1a\u00a0<code class=\"\">grep -i \"error\" backend.log<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">10.2 \u4f18\u5316\u5efa\u8bae<\/h3>\n\n\n\n<p><strong>\u751f\u4ea7\u73af\u5883\u5efa\u8bae\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u4f7f\u7528\u57df\u540d<\/strong><strong>nginx<\/strong><code>server_name yourdomain.com;<\/code><\/li>\n\n\n\n<li><strong>\u542f\u7528 HTTPS<\/strong><strong>nginx<\/strong><code>listen 443 ssl; ssl_certificate \/path\/to\/cert.pem; ssl_certificate_key \/path\/to\/key.pem;<\/code><\/li>\n\n\n\n<li><strong>\u4f7f\u7528 MySQL \u66ff\u4ee3 H2<\/strong><strong>yaml<\/strong><code>spring: datasource: url: jdbc:mysql:\/\/localhost:3306\/restaurant username: root password: your_password<\/code><\/li>\n\n\n\n<li><strong>\u914d\u7f6e\u9632\u706b\u5899<\/strong><strong>bash<\/strong><code>firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https firewall-cmd --reload<\/code><\/li>\n\n\n\n<li><strong>\u8bbe\u7f6e\u8fdb\u7a0b\u5b88\u62a4<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 systemd \u6216 supervisor \u7ba1\u7406\u540e\u7aef\u8fdb\u7a0b<\/li>\n\n\n\n<li>\u8fdb\u7a0b\u610f\u5916\u9000\u51fa\u65f6\u81ea\u52a8\u91cd\u542f<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">10.3 \u7ecf\u9a8c\u603b\u7ed3<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u9047\u5230\u95ee\u9898\u4e0d\u8981\u614c\uff0c\u5148\u67e5\u65e5\u5fd7<\/strong><\/li>\n\n\n\n<li><strong>\u6587\u4ef6\u540d\u3001\u8def\u5f84\u8981\u4ed4\u7ec6\u6838\u5bf9<\/strong><\/li>\n\n\n\n<li><strong>\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u540e\u8981 source \u751f\u6548<\/strong><\/li>\n\n\n\n<li><strong>\u672c\u5730\u80fd\u8dd1\u901a\uff0c\u670d\u52a1\u5668\u5c31\u80fd\u8dd1\u901a\uff08\u73af\u5883\u4e00\u81f4\u7684\u524d\u63d0\u4e0b\uff09<\/strong><\/li>\n\n\n\n<li><strong>\u5199\u597d\u811a\u672c\uff0c\u4e00\u952e\u90e8\u7f72\u624d\u662f\u738b\u9053<\/strong><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u9644\u5f55\uff1a\u5feb\u901f\u90e8\u7f72\u68c0\u67e5\u6e05\u5355<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\u25a1 \u670d\u52a1\u5668\u51c6\u5907\n  \u25a1 Java 17 \u5b89\u88c5\u5e76\u914d\u7f6e\u73af\u5883\u53d8\u91cf\n  \u25a1 Maven \u5b89\u88c5\u5e76\u914d\u7f6e\u955c\u50cf\n  \u25a1 Nginx \u5b89\u88c5\n\n\u25a1 \u540e\u7aef\u90e8\u7f72\n  \u25a1 \u4ee3\u7801\u4e0a\u4f20\u5230\u670d\u52a1\u5668\n  \u25a1 mvn clean package -DskipTests\n  \u25a1 \u786e\u8ba4 jar \u6587\u4ef6\u5b58\u5728\n\n\u25a1 \u524d\u7aef\u90e8\u7f72\n  \u25a1 \u672c\u5730 npm run build\n  \u25a1 \u4e0a\u4f20 dist \u76ee\u5f55\u5230\u670d\u52a1\u5668\n\n\u25a1 Nginx \u914d\u7f6e\n  \u25a1 \u521b\u5efa\u914d\u7f6e\u6587\u4ef6\n  \u25a1 nginx -t \u6d4b\u8bd5\n  \u25a1 \u91cd\u542f Nginx\n\n\u25a1 \u542f\u52a8\u670d\u52a1\n  \u25a1 \u521b\u5efa\u542f\u52a8\u811a\u672c\n  \u25a1 \u6267\u884c\u542f\u52a8\u811a\u672c\n  \u25a1 \u68c0\u67e5\u8fdb\u7a0b\u662f\u5426\u8fd0\u884c\n\n\u25a1 \u9a8c\u8bc1\n  \u25a1 \u6d4f\u89c8\u5668\u8bbf\u95ee IP\n  \u25a1 \u6d4b\u8bd5\u767b\u5f55\u529f\u80fd\n  \u25a1 \u67e5\u770b\u540e\u7aef\u65e5\u5fd7\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u672c\u6587\u8bb0\u5f55\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684\u5168\u6808\u9879\u76ee\uff08Spring Boot + React\uff09\u4ece\u672c\u5730\u5f00\u53d1\u5230\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u7684\u5168\u8fc7\u7a0b\uff0c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zcc609.online\/?p=101\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;\u5168\u6808\u9879\u76ee\u90e8\u7f72\u5b9e\u6218\uff1a\u4ece\u96f6\u5230\u4e0a\u7ebf\u7684\u5b8c\u6574\u6307\u5357&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/zcc609.online\/index.php?rest_route=\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zcc609.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zcc609.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zcc609.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zcc609.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=101"}],"version-history":[{"count":1,"href":"https:\/\/zcc609.online\/index.php?rest_route=\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":102,"href":"https:\/\/zcc609.online\/index.php?rest_route=\/wp\/v2\/posts\/101\/revisions\/102"}],"wp:attachment":[{"href":"https:\/\/zcc609.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zcc609.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zcc609.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}