{"id":18690,"date":"2025-04-19T01:03:46","date_gmt":"2025-04-18T17:03:46","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/18690.html"},"modified":"2025-04-19T01:03:46","modified_gmt":"2025-04-18T17:03:46","slug":"tomcat%ef%bc%88web%e5%ba%94%e7%94%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/18690.html","title":{"rendered":"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09"},"content":{"rendered":"<\/p>\n<h4>tomcat<\/h4>\n<ul>\n<li>\u4e00.\u4ecb\u7ecd<\/li>\n<li>\n<ul>\n<li>web\u5e94\u7528\u7a0b\u5e8f<\/li>\n<li>tomcat\u7684\u6838\u5fc3\u7ec4\u4ef6<\/li>\n<li>\u529f\u80fd\u7ec4\u4ef6<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c. tomcat\u5b89\u88c5\u4e0e\u4f7f\u7528<\/li>\n<li>\n<ul>\n<li>1. \u5b89\u88c5Java\u4f9d\u8d56\u73af\u5883\u548ctomcat<\/li>\n<li>2. \u7f51\u9875\u754c\u9762\u914d\u7f6e<\/li>\n<li>3. \u4e3b\u914d\u7f6e<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09. tomcat\u7684\u4f18\u5316<\/li>\n<li>\n<ul>\n<li>1. tomcat\u7684\u914d\u7f6e\u4f18\u5316<\/li>\n<li>2. \u64cd\u4f5c\u7cfb\u7edf\u7684\u5185\u6838\u4f18\u5316<\/li>\n<li>\n<ul>\n<li>\u76f8\u5bf9\u91cd\u8981\u7684<\/li>\n<\/ul>\n<\/li>\n<li>3\u3001jvm\u8c03\u4f18<\/li>\n<li>\n<ul>\n<li>tomcat\u9875\u9762\u4ecb\u7ecd<\/li>\n<li>\n<ul>\n<li>&#034;ajp-nio-8009&#034;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u56db. tomcat\u52a8\u9759\u5206\u79bb<\/li>\n<\/ul>\n<h2>\u4e00.\u4ecb\u7ecd<\/h2>\n<h3>web\u5e94\u7528\u7a0b\u5e8f<\/h3>\n<p>php&#xff1a;index.php tomcat&#xff1a;index.jsp &#8212;&#8212;&#8212;&#8212;&gt;java\u7f16\u8bd1\u7684\u4ee3\u7801<\/p>\n<p>\u4e09\u4e2a\u529f\u80fd\u7ec4\u5408\u800c\u6210<\/p>\n<ul>\n<li>java servlet&#xff1a;tomcat\u662f\u4e00\u4e2aservlet\u5bb9\u5668&#xff0c;\u8d1f\u8d23\u7ba1\u7406\u548c\u6267\u884ciava-servlet&#xff0c;\u670d\u52a1\u7aef\u7684java\u7a0b\u5e8f\u3002\u5904\u7406\u5ba2\u6237\u7aef\u7684http\u7684\u8bf7\u6c42\u548c\u54cd\u5e94\u3002&#xff08;\u670d\u52a1\u7aef\u7684\u914d\u7f6e&#xff09;<\/li>\n<li>pages&#xff1a;\u52a8\u6001\u9875\u9762\u7684\u6280\u672f&#8212;&#8211;&gt;Java\u4ee3\u7801\u5b8c\u6210\u7684<\/li>\n<li>tomcat\u65e2\u53ef\u4ee5\u4f5c\u4e3a\u5df2iava\u4ee3\u7801\u4e3a\u57fa\u7840\u7684\u52a8\u6001\u9875\u9762&#xff0c;\u4e5f\u53ef\u4ee5\u5904\u7406\u548c\u8f6c\u53d1\u52a8\u6001\u8bf7\u6c42\u3002&#xff08;\u5e76\u53d1\u80fd\u529b\u5f88\u5dee&#xff0c;\u9002\u5408\u5c0f\u9879\u76ee\u3002&#xff09;<\/li>\n<\/ul>\n<h3>tomcat\u7684\u6838\u5fc3\u7ec4\u4ef6<\/h3>\n<ul>\n<li>\n<p>web\u5bb9\u5668&#xff1a;\u5904\u7406web\u7684\u8bf7\u6c42&#xff0c;\u5f71\u54cd&#xff0c;\u52a8\u6001\u9875\u9762\u7684\u5c55\u793a<\/p>\n<\/li>\n<li>\n<p>jsp\u5bb9\u5668&#xff1a;\u89e3\u6790index.jsp\u4e2d\u7684java\u4ee3\u7801\u8f6c\u6362\u4e3aservlet\u7684\u4ee3\u7801&#xff0c;\u7136\u540eservlet\u7f16\u8bd1\u6267\u884c jsp\u662f\u4e00\u79cd\u6280\u672f\u6a21\u7248&#xff0c;\u7c7b\u4f3c\u4e8ehtml\u8bed\u8a00&#xff0c;\u5141\u8bb8\u5728html\u6587\u4ef6\u5f53\u4e2d&#xff0c;\u5d4c\u5165java\u7684\u4ee3\u7801<\/p>\n<\/li>\n<li>\n<p>servlet\u5bb9\u5668&#xff1a;\u63a5\u53d7web\u5bb9\u5668\u7684\u8bf7\u6c42&#xff0c;\u8d1f\u8d23\u52a0\u8f7d&#xff0c;\u521d\u59cb\u5316&#xff0c;\u6267\u884c\u548c\u7ba1\u7406<\/p>\n<\/li>\n<\/ul>\n<h3>\u529f\u80fd\u7ec4\u4ef6<\/h3>\n<p>\/user\/local\/tomcat\/<\/p>\n<p>connector&#xff1a;\u63a5\u53d7\u5916\u90e8\u7684\u8bf7\u6c42\u5df2\u7ecf\u54cd\u5e94\u8bf7\u6c42<br \/>\ncontainer&#xff1a;\u5305\u542b\u4e86engine host context webapp \u56db\u4e2a\u7ec4\u4ef6\u7ec4\u6210<br \/>\nservice&#xff1a;\u5305\u542b\u4e86connector\u548ccontainer<br \/>\nengine&#xff1a;\u5f15\u64ce&#xff0c;\u7528\u6765\u7ba1\u7406\u591a\u4e2a\u865a\u62df\u4e3b\u673a&#xff0c;\u4e00\u4e2aservice\u53ea\u80fd\u6709\u4e00\u4e2aengine<br \/>\nhost&#xff1a;\u4ee3\u8868\u4e00\u4e2a\u865a\u62df\u4e3b\u673a&#xff0c;\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u7ad9\u70b9<br \/>\ncontext&#xff1a;\u5bf9\u5e94\u7684web\u5e94\u7528<br \/>\nwebapp&#xff1a;\u6700\u4e2d\u7684\u5c01\u88c5\u5668&#xff0c;\u5bb9\u5668\u7684\u6700\u5e95\u5c42 index<span class=\"token punctuation\">.<\/span>jsp<br \/>\nbin&#xff1a;\u542f\u52a8\u548c\u5173\u95ed\u7684\u811a\u672c\u6587\u4ef6<br \/>\nconf&#xff1a;tomcat\u7684\u914d\u7f6e\u6587\u4ef6<br \/>\nlogs&#xff1a;tomcat\u7684\u65e5\u5fd7\u6587\u4ef6<br \/>\nwebapps&#xff1a;\u4fdd\u5b58\u4e0d\u540c\u9879\u76ee\u7684\u5e94\u7528\u76ee\u5f55<br \/>\nwork&#xff1a;\u5de5\u4f5c\u76ee\u5f55<br \/>\ntemp&#xff1a;\u4e34\u65f6\u6587\u4ef6\u4fdd\u5b58\u76ee\u5f55<br \/>\ntomcat<span class=\"token operator\">\/<\/span>conf<span class=\"token operator\">\/<\/span>server<span class=\"token punctuation\">.<\/span>xml #\u4e3b\u914d\u7f6e\u6587\u4ef6<\/p>\n<h2>\u4e8c. tomcat\u5b89\u88c5\u4e0e\u4f7f\u7528<\/h2>\n<h3>1. \u5b89\u88c5Java\u4f9d\u8d56\u73af\u5883\u548ctomcat<\/h3>\n<p>apt -y install openjdk-8-jdk-headless<br \/>\njava -version  #\u67e5\u770b\u7248\u672c<\/p>\n<p>tar -xf apache-tomcat-9.0.16.tar.gz<br \/>\nmv apache-tomcat-9.0.16 \/usr\/local\/tomcat<\/p>\n<p>cd \/usr\/local\/tomcat\/bin<br \/>\n.\/startup.sh<br \/>\nnetstat -antp | grep 8080<br \/>\ntcp6       0      0 :::8080                 :::*                    LISTEN      4038\/java<\/p>\n<h3>2. \u7f51\u9875\u754c\u9762\u914d\u7f6e<\/h3>\n<p>cd <span class=\"token operator\">\/<\/span>usr<span class=\"token operator\">\/<\/span>local<span class=\"token operator\">\/<\/span>tomcat<span class=\"token operator\">\/<\/span>webapps<br \/>\nmkdir test1 test2<br \/>\ncd test1<br \/>\nvim index<span class=\"token punctuation\">.<\/span>jsp<\/p>\n<p><span class=\"token operator\">&lt;<\/span><span class=\"token operator\">%<\/span>&#064; <span class=\"token class-name\">page<\/span> language<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;java&#034;<\/span> import<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;java.util.*&#034;<\/span> pageEncoding<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;UTF-8&#034;<\/span><span class=\"token operator\">%<\/span><span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>html<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>head<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>title<span class=\"token operator\">&gt;<\/span>JSP test1 page<span class=\"token operator\">&lt;<\/span><span class=\"token operator\">\/<\/span>title<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span><span class=\"token operator\">\/<\/span>head<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span><span class=\"token operator\">%<\/span> <span class=\"token keyword\">out<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u52a8\u6001\u9875\u9762 1,http:\/\/www.test1.com&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><span class=\"token operator\">%<\/span><span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span><span class=\"token operator\">\/<\/span>body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span><span class=\"token operator\">\/<\/span>html<span class=\"token operator\">&gt;<\/span><\/p>\n<p><span class=\"token preprocessor property\">#test2\u540c\u7406<\/span><\/p>\n<p>Host name&#xff1a;\u4e3b\u673a\u540d <span class=\"token class-name\">www<span class=\"token punctuation\">.<\/span>test1<span class=\"token punctuation\">.<\/span>com<\/span><br \/>\nappBase<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;webapps&#034;<\/span>&#xff1a;web\u5e94\u7528\u7a0b\u5e8f\u76ee\u5f55<br \/>\nunpackWARs<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span>&#xff1a;\u662f\u642d\u5bf9<span class=\"token punctuation\">.<\/span>war\u683c\u5f0f\u7ed3\u5c3e\u6587\u4ef6\u8fdb\u884c\u5c55\u5f00<br \/>\nautoDeploy<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span>&#xff1a;tomcat\u5728\u8fd0\u884c\u65f6\u4f1a\u81ea\u52a8\u90e8\u7f72webapps\u91cc\u9762\u5bf9\u5e94\u7684\u914d\u7f6e<br \/>\nxmlValidation<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;false&#034;<\/span>&#xff1a;\u662f\u5426\u9a8c\u8bc1xml\u6587\u4ef6\u7684\u6709\u6548\u6027<br \/>\nxmlNamespaceAware<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;false&#034;<\/span>&#xff1a;\u662f\u5426\u542f\u52a8xml\u7684\u547d\u540d\u7a7a\u95f4<br \/>\n<span class=\"token class-name\">Context<\/span> docBase<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/usr\/local\/tomcat\/webapps\/test1&#034;<\/span>&#xff1a;\u8def\u5f84<\/p>\n<h3>3. \u4e3b\u914d\u7f6e<\/h3>\n<p>vim <span class=\"token operator\">\/<\/span>usr<span class=\"token operator\">\/<\/span>local<span class=\"token operator\">\/<\/span>tomcat<span class=\"token operator\">\/<\/span>conf<span class=\"token operator\">\/<\/span>server<span class=\"token punctuation\">.<\/span>xml<br \/>\n<span class=\"token number\">164<\/span>\u5c42\u6dfb\u52a0<\/p>\n<p><span class=\"token operator\">&lt;<\/span><span class=\"token class-name\">Host<\/span> name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;www.test1.com&#034;<\/span> appBase<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;webapps&#034;<\/span> unpackWARs<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span> autoDeploy<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span> xmlValidation<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;false&#034;<\/span> xmlNamespaceAware<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;false&#034;<\/span><span class=\"token operator\">&gt;<\/span><br \/>\n        <span class=\"token operator\">&lt;<\/span><span class=\"token class-name\">Context<\/span> docBase<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/usr\/local\/tomcat\/webapps\/test1&#034;<\/span> path<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;&#034;<\/span> reloadable<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span> <span class=\"token operator\">\/<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&lt;<\/span><span class=\"token operator\">\/<\/span>Host<span class=\"token operator\">&gt;<\/span><\/p>\n<p><span class=\"token operator\">&lt;<\/span><span class=\"token class-name\">Host<\/span> name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;www.test2.com&#034;<\/span> appBase<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;webapps&#034;<\/span> unpackWARs<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span> autoDeploy<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span> xmlValidation<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;false&#034;<\/span> xmlNamespaceAware<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;false&#034;<\/span><span class=\"token operator\">&gt;<\/span><br \/>\n        <span class=\"token operator\">&lt;<\/span><span class=\"token class-name\">Context<\/span> docBase<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/usr\/local\/tomcat\/webapps\/test2&#034;<\/span> path<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;&#034;<\/span> reloadable<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;true&#034;<\/span> <span class=\"token operator\">\/<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&lt;<\/span><span class=\"token operator\">\/<\/span>Host<span class=\"token operator\">&gt;<\/span><\/p>\n<p>vim <span class=\"token operator\">\/<\/span>etc<span class=\"token operator\">\/<\/span>hosts<br \/>\n<span class=\"token preprocessor property\">#\u6dfb\u52a0<\/span><br \/>\n<span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.6<\/span> www<span class=\"token punctuation\">.<\/span>test1<span class=\"token punctuation\">.<\/span>com<br \/>\n<span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.6<\/span> www<span class=\"token punctuation\">.<\/span>test2<span class=\"token punctuation\">.<\/span>com<\/p>\n<p>cd <span class=\"token operator\">\/<\/span>usr<span class=\"token operator\">\/<\/span>local<span class=\"token operator\">\/<\/span>tomcat<span class=\"token operator\">\/<\/span>bin<br \/>\n<span class=\"token punctuation\">.<\/span><span class=\"token operator\">\/<\/span>shutdown<span class=\"token punctuation\">.<\/span>sh<br \/>\n<span class=\"token punctuation\">.<\/span><span class=\"token operator\">\/<\/span>startup<span class=\"token punctuation\">.<\/span>sh<br \/>\nroot&#064;u3<span class=\"token punctuation\">:<\/span><span class=\"token operator\">\/<\/span>usr<span class=\"token operator\">\/<\/span>local<span class=\"token operator\">\/<\/span>tomcat<span class=\"token operator\">\/<\/span>bin# netstat <span class=\"token operator\">&#8211;<\/span>antp <span class=\"token operator\">|<\/span> grep <span class=\"token number\">8080<\/span><br \/>\ntcp6       <span class=\"token number\">0<\/span>      <span class=\"token number\">0<\/span> <span class=\"token punctuation\">::<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">8080<\/span>                 <span class=\"token punctuation\">::<\/span><span class=\"token punctuation\">:<\/span><span class=\"token operator\">*<\/span>                    LISTEN      <span class=\"token number\">6162<\/span><span class=\"token operator\">\/<\/span>java<br \/>\ntcp6       <span class=\"token number\">0<\/span>      <span class=\"token number\">0<\/span> <span class=\"token punctuation\">::<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">60732<\/span>               <span class=\"token punctuation\">::<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">8080<\/span>                TIME_WAIT   <span class=\"token operator\">&#8211;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170344-680285f082873.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170344-680285f09d5d9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e09. tomcat\u7684\u4f18\u5316<\/h2>\n<p>\u9ed8\u8ba4\u7684\u5b89\u88c5\u60c5\u51b5\u4e0b&#xff0c;tomcat\u7ecf\u5e38\u4f1a\u5047\u6b7b\u7684\u60c5\u51b5 tomcat\u9700\u8981\u8fdb\u884c\u4f18\u5316<\/p>\n<h3>1. tomcat\u7684\u914d\u7f6e\u4f18\u5316<\/h3>\n<p>vim <span class=\"token operator\">\/<\/span>usr<span class=\"token operator\">\/<\/span>local<span class=\"token operator\">\/<\/span>tomcat<span class=\"token operator\">\/<\/span>conf<span class=\"token operator\">\/<\/span>server<span class=\"token punctuation\">.<\/span>xml<br \/>\n<span class=\"token number\">69<\/span>\u884c\u4fee\u6539\u6dfb\u52a0<\/p>\n<p><span class=\"token operator\">&lt;<\/span><span class=\"token class-name\">Connector<\/span> port<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;8080&#034;<\/span> protocol<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;HTTP\/1.1&#034;<\/span><br \/>\n              connectionTimeout<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;20000&#034;<\/span><br \/>\n              redirectPort<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;8443&#034;<\/span><br \/>\n      maxThreads<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;500&#034;<\/span><br \/>\n      minSpareThreads<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;50&#034;<\/span><br \/>\n  <span class=\"token operator\">\/<\/span><span class=\"token operator\">&gt;<\/span><\/p>\n<ul>\n<li>maxThreads&#061;\u201c500\u201d&#xff1a;tomcat\u53ef\u4ee5\u521b\u5efa\u6700\u5927\u7684\u7ebf\u7a0b\u6570<\/li>\n<li>minSpareThreads&#061;\u201c50\u201d&#xff1a;\u7a7a\u95f2\u7ebf\u7a0b\u7684\u6700\u5c0f\u6570\u91cf&#xff0c;\u7528\u6765\u5904\u7406\u6ea2\u51fa\u90e8\u5206\u7684\u8bf7\u6c42<\/li>\n<li>enableLookups&#061;\u201cfalse\u201d&#xff1a;\u7981\u7528\u53cd\u5411\u89e3\u6790&#xff0c;\u63d0\u9ad8\u8bbf\u95ee\u901f\u5ea6<\/li>\n<li>disableUploadTimeout&#061;\u201ctrue\u201d&#xff1a;\u5f00\u542f\u4e0a\u4f20\u7684\u8d85\u65f6\u65f6\u95f4&#xff0c;\u8fde\u63a5\u5728\u4e0a\u4f20\u671f\u95f4\u4e0d\u5b58\u5728\u8d85\u65f6\u7684\u60c5\u51b5<\/li>\n<li>acceptCount&#061;\u201c300\u201d &#xff1a;\u5f53\u6240\u7ebf\u7a0b\u90fd\u5728\u5fd9\u788c\u7684\u65f6\u5019&#xff0c;\u53ef\u4ee5\u6392\u961f\u7b49\u5f85\u5904\u7406\u7684\u8bf7\u6c42\u6570\u91cf<\/li>\n<li>processorCache&#061;\u201c500\u201d&#xff1a;\u8fde\u63a5\u5668\u53ef\u4ee5\u7f13\u5b58\u7684\u6700\u5927\u5904\u7406\u7684\u6570\u91cf\u3002<\/li>\n<li>URIEncoding&#061;\u201cUTF-8\u201d&#xff1a;\u8bbe\u7f6e\u5b57\u7b26\u96c6\u7f16\u7801<\/li>\n<li>compression&#061;\u201con\u201d&#xff1a;\u5f00\u542f\u5bf9\u54cd\u5e94\u5185\u5bb9\u7684\u538b\u7f29\u529f\u80fd<\/li>\n<li>compressionMinSize&#061;\u201c2048\u201d&#xff1a;\u5982\u679c\u5927\u5c0f\u8d85\u8fc72M,\u624d\u4f1a\u8fdb\u884c\u538b\u7f29<\/li>\n<li>compressableMimeType&#061;\u201ctext\/html,text\/xml,text\/javascript,text\/css,text\/plain,image\/gif,image \/jpg,image\/png\u201d\/&gt;&#xff1a;\u652f\u6301\u88ab\u538b\u7f29\u7684\u6587\u4ef6\u7c7b\u578b<\/li>\n<\/ul>\n<h3>2. \u64cd\u4f5c\u7cfb\u7edf\u7684\u5185\u6838\u4f18\u5316<\/h3>\n<p>vim \/usr\/local\/tomcat\/bin\/etc\/sysctl.conf<\/p>\n<p>\u6ce8\u610f&#xff1a;\u8bbe\u7f6e\u4fdd\u5b58\u540e&#xff0c;\u9700\u8981\u91cd\u65b0ssh\u8fde\u63a5\u624d\u4f1a\u770b\u5230\u914d\u7f6e\u66f4\u6539\u7684\u53d8\u5316 vim \/etc\/security\/limits.conf #65535 \u4e3aLinux\u7cfb\u7edf\u6700\u5927\u6253\u5f00\u6587\u4ef6\u6570<\/p>\n<ul>\n<li>\n<p>soft nproc 65535<\/p>\n<\/li>\n<li>\n<p>hard nproc 65535<\/p>\n<\/li>\n<li>\n<p>soft nofile 65535<\/p>\n<\/li>\n<li>\n<p>hard nofile 65535<\/p>\n<\/li>\n<li>\n<p>soft nproc 65535&#xff1a; \u6700\u5927\u8fdb\u7a0b\u6570\u8f6f\u9650\u5236\u4e3a 65535&#xff0c;\u5373\u53ef\u4ee5\u4f7f\u7528 ulimit -u \u547d\u4ee4\u67e5\u770b\u548c\u4fee\u6539\u7684\u503c\u3002<\/p>\n<\/li>\n<li>\n<p>hard nproc 65535&#xff1a; \u6700\u5927\u8fdb\u7a0b\u6570\u786c\u9650\u5236\u4e3a 65535&#xff0c;\u5373\u6700\u5927\u53ef\u5206\u914d\u7684\u8fdb\u7a0b\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>soft nofile 65535&#xff1a;\u6700\u5927\u6253\u5f00\u6587\u4ef6\u6570\u8f6f\u9650\u5236\u4e3a 65535&#xff0c;\u5373\u53ef\u4ee5\u4f7f\u7528 ulimit -n \u547d\u4ee4\u67e5\u770b\u548c\u4fee\u6539\u7684\u503c\u3002<\/p>\n<\/li>\n<li>\n<p>hard nofile 65535&#xff1a;\u6700\u5927\u6253\u5f00\u6587\u4ef6\u6570\u786c\u9650\u5236\u4e3a 65535&#xff0c;\u5373\u6700\u5927\u53ef\u5206\u914d\u7684\u6587\u4ef6\u6570\u3002 \u8fd9\u91cc\u4f7f\u7528\u7684\u901a\u914d\u7b26 * \u8868\u793a\u5bf9\u6240\u6709\u7528\u6237\u751f\u6548\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5176\u4ed6\u8c03\u8bd5\u5185\u6838\u53c2\u6570\u7684\u67e5\u770b&#xff1a; sysctl -a<\/p>\n<p>kernel.sysrq &#061; 0: \u7981\u7528\u4e86\u5185\u6838\u7684SysRq\u529f\u80fd&#xff0c;SysRq\u5141\u8bb8\u5728\u7cfb\u7edf\u5d29\u6e83\u6216\u51fa\u73b0\u95ee\u9898\u65f6\u6267\u884c\u4e00\u4e9b\u8c03\u8bd5\u64cd\u4f5c\u3002<\/p>\n<p>kernel.core_uses_pid &#061; 1: \u8bbe\u7f6e\u6838\u5fc3\u8f6c\u50a8\u6587\u4ef6\u540d\u4e2d\u5305\u542b\u8fdb\u7a0bID&#xff0c;\u6709\u52a9\u4e8e\u6807\u8bc6\u662f\u54ea\u4e2a\u8fdb\u7a0b\u5bfc\u81f4\u4e86\u6838\u5fc3\u8f6c\u50a8\u3002<\/p>\n<p>kernel.msgmnb \u548c kernel.msgmax: \u589e\u52a0IPC\u6d88\u606f\u961f\u5217\u7684\u9ed8\u8ba4\u548c\u6700\u5927\u5927\u5c0f&#xff0c;\u7528\u4e8e\u8fdb\u7a0b\u95f4\u901a\u4fe1\u3002<\/p>\n<p>kernel.shmmax \u548c kernel.shmall: \u8c03\u6574\u5171\u4eab\u5185\u5b58\u7684\u6700\u5927\u5927\u5c0f\u548c\u5206\u914d\u9875\u9762\u6570\u3002<\/p>\n<p>net.ipv4.ip_forward &#061; 0: \u7981\u7528IP\u6570\u636e\u5305\u7684\u8f6c\u53d1\u529f\u80fd&#xff0c;\u901a\u5e38\u7528\u4e8e\u4e0d\u5145\u5f53\u8def\u7531\u5668\u7684\u7cfb\u7edf\u3002<\/p>\n<p>net.ipv4.conf.default.rp_filter \u548c net.ipv4.conf.all.rp_filter: \u63a7\u5236\u53cd\u5411\u8def\u5f84\u8fc7\u6ee4&#xff0c;\u63d0\u9ad8\u7f51\u7edc\u5b89\u5168\u6027\u3002<\/p>\n<p>net.ipv4.icmp_echo_ignore_all: \u5141\u8bb8\u6216\u7981\u6b62\u7cfb\u7edf\u54cd\u5e94ping\u8bf7\u6c42\u3002<\/p>\n<p>net.ipv4.icmp_echo_ignore_broadcasts: \u7981\u6b62\u7cfb\u7edf\u5bf9\u5e7f\u64ad\u548c\u591a\u64ad\u5730\u5740\u7684ICMP\u56de\u663e\u548c\u65f6\u95f4\u6233\u8bf7\u6c42\u4f5c\u51fa\u54cd\u5e94\u3002<\/p>\n<p>net.ipv4.conf.default.accept_source_route: \u4e0d\u63a5\u53d7\u6e90\u8def\u7531&#xff0c;\u589e\u52a0\u7f51\u7edc\u5b89\u5168\u6027\u3002<\/p>\n<p>net.ipv4.tcp_syncookies &#061; 1: \u542f\u7528SYN Cookies&#xff0c;\u4fdd\u62a4\u7cfb\u7edf\u514d\u53d7TCP SYN \u653b\u51fb\u3002<\/p>\n<p>net.ipv4.tcp_max_tw_buckets &#061; 6000: \u8bbe\u7f6e\u5141\u8bb8\u7684TIME_WAIT\u5957\u63a5\u5b57\u6700\u5927\u6570\u91cf&#xff0c;\u907f\u514d\u670d\u52a1\u5668\u6027\u80fd\u4e0b\u964d\u3002<\/p>\n<p>net.ipv4.tcp_sack &#061; 1: \u542f\u7528\u6709\u9009\u62e9\u7684\u5e94\u7b54&#xff08;SACK&#xff09;\u6765\u63d0\u9ad8TCP\u6027\u80fd\u3002<\/p>\n<p>net.ipv4.tcp_window_scaling &#061; 1: \u542f\u7528TCP\u7a97\u53e3\u7f29\u653e\u529f\u80fd&#xff0c;\u5141\u8bb8\u5927\u7a97\u53e3\u7684TCP\u4f20\u8f93\u3002<\/p>\n<p>net.ipv4.tcp_rmem, net.ipv4.tcp_wmem: \u8c03\u6574TCP\u5957\u63a5\u5b57\u8bfb\u53d6\u548c\u5199\u5165\u7f13\u51b2\u533a\u5927\u5c0f\u3002<\/p>\n<p>net.ipv4.tcp_mem: \u8bbe\u7f6eTCP\u7f13\u51b2\u533a\u7684\u6700\u5c0f\u3001\u9ed8\u8ba4\u548c\u6700\u5927\u503c\u3002<\/p>\n<p>net.core.wmem_default, net.core.rmem_default, net.core.rmem_max, net.core.wmem_max: \u8c03\u6574\u7f51\u7edc\u6838\u5fc3 \u7f13\u51b2\u533a\u7684\u5927\u5c0f\u3002 net.core.netdev_max_backlog: \u63a7\u5236\u7f51\u7edc\u63a5\u53e3\u63a5\u6536\u6570\u636e\u5305\u7684\u6392\u961f\u961f\u5217\u5927\u5c0f\u3002<\/p>\n<p>net.ipv4.tcp_max_orphans: \u8bbe\u7f6e\u7cfb\u7edf\u5141\u8bb8\u7684\u5b64\u7acbTCP\u8fde\u63a5\u6700\u5927\u6570\u91cf\u3002<\/p>\n<p>net.ipv4.tcp_max_syn_backlog: \u63a7\u5236\u7cfb\u7edf\u5141\u8bb8\u7684\u4e09\u6b21\u63e1\u624b\u961f\u5217\u957f\u5ea6\u3002<\/p>\n<p>net.ipv4.tcp_synack_retries \u548c net.ipv4.tcp_syn_retries: \u8bbe\u7f6eSYN-ACK\u548cSYN\u8bf7\u6c42\u7684\u91cd\u8bd5\u6b21\u6570\u3002<\/p>\n<p>net.ipv4.tcp_tw_recycle \u548c net.ipv4.tcp_tw_reuse: \u542f\u7528TIME_WAIT\u5957\u63a5\u5b57\u5feb\u901f\u56de\u6536\u548c\u91cd\u7528\u3002<\/p>\n<p>net.ipv4.tcp_fin_timeout: \u8bbe\u7f6eTCP\u8fde\u63a5FIN&#xff08;\u5173\u95ed\u8fde\u63a5&#xff09;\u7684\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n<p>net.ipv4.tcp_keepalive_time: \u8bbe\u7f6eTCP keepalive\u63a2\u6d4b\u5305\u53d1\u9001\u9891\u7387&#xff0c;\u4ee5\u68c0\u6d4b\u8fde\u63a5\u72b6\u6001\u3002<\/p>\n<p>net.ipv4.ip_local_port_range: \u8bbe\u7f6e\u672c\u5730\u7aef\u53e3\u8303\u56f4&#xff0c;\u7528\u4e8e\u5206\u914d\u672c\u5730\u5e94\u7528\u7a0b\u5e8f\u7aef\u53e3\u3002<\/p>\n<p>net.ipv6.conf.all.disable_ipv6 \u548c net.ipv6.conf.default.disable_ipv6: \u7981\u7528IPv6\u3002<\/p>\n<p>net.netfilter.nf_conntrack_max \u548c\u5176\u4ed6 net.netfilter.nf_conntrack_*: \u63a7\u5236\u8fde\u63a5\u8ddf\u8e2a\u548c\u9632\u706b\u5899\u76f8\u5173\u8bbe\u7f6e\u3002<\/p>\n<p>net.nf_conntrack_max: \u8bbe\u7f6e\u6700\u5927\u8fde\u63a5\u8ddf\u8e2a\u9879\u6570\u3002<\/p>\n<p>vm.overcommit_memory &#061; 0: \u63a7\u5236\u5185\u5b58\u8d85\u989d\u5206\u914d\u7b56\u7565&#xff0c;\u907f\u514dOOM killer\u6740\u6389\u8fdb\u7a0b\u3002<\/p>\n<p>vm.swappiness &#061; 0: \u8bbe\u7f6e\u5185\u5b58\u4ea4\u6362\u884c\u4e3a&#xff0c;\u964d\u4f4e\u5185\u5b58\u4ea4\u6362\u3002<\/p>\n<p>fs.file-max &#061; 999999: \u8bbe\u7f6e\u8fdb\u7a0b\u53ef\u4ee5\u540c\u65f6\u6253\u5f00\u7684\u6700\u5927\u6587\u4ef6\u53e5\u67c4\u6570\u3002<\/p>\n<p>net.ipv4.tcp_max_tw_buckets &#061; 6000: \u8bbe\u7f6e\u64cd\u4f5c\u7cfb\u7edf\u5141\u8bb8\u7684TIME_WAIT\u5957\u63a5\u5b57\u6700\u5927\u6570\u91cf\u3002<\/p>\n<p>net.ipv4.ip_local_port_range &#061; 1024 65000: \u8bbe\u7f6e\u7cfb\u7edf\u5141\u8bb8\u7684\u672c\u5730\u7aef\u53e3\u8303\u56f4\u3002<\/p>\n<p>net.ipv4.tcp_tw_recycle &#061; 1: \u542f\u7528TIME_WAIT\u5957\u63a5\u5b57\u5feb\u901f\u56de\u6536\u3002<\/p>\n<p>net.ipv4.tcp_tw_reuse &#061; 1: \u5141\u8bb8TIME-WAIT\u5957\u63a5\u5b57\u91cd\u7528\u3002<\/p>\n<p>net.ipv4.tcp_syncookies &#061; 1: \u542f\u7528SYN Cookies&#xff0c;\u9632\u6b62TCP SYN \u653b\u51fb\u3002<\/p>\n<p>net.core.somaxconn &#061; 40960: \u8bbe\u7f6e\u6700\u5927\u76d1\u542c\u961f\u5217\u957f\u5ea6&#xff0c;\u7528\u4e8e\u63a7\u5236\u6700\u5927\u5e76\u53d1\u8fde\u63a5\u6570\u3002<\/p>\n<p>net.core.netdev_max_backlog &#061; 262144: \u8bbe\u7f6e\u6bcf\u4e2a\u7f51\u7edc\u63a5\u53e3\u63a5\u6536\u6570\u636e\u5305\u961f\u5217\u7684\u6700\u5927\u5927\u5c0f\u3002<\/p>\n<p>net.ipv4.tcp_max_syn_backlog &#061; 262144: \u8bbe\u7f6e\u63a5\u53d7SYN\u8bf7\u6c42\u961f\u5217\u7684\u6700\u5927\u957f\u5ea6\u3002<\/p>\n<p>net.ipv4.tcp_rmem, net.ipv4.tcp_wmem: \u8bbe\u7f6eTCP\u5957\u63a5\u5b57\u8bfb\u53d6\u548c\u5199\u5165\u7f13\u51b2\u533a\u7684\u6700\u5c0f\u3001\u9ed8\u8ba4\u548c\u6700\u5927\u5927\u5c0f\u3002<\/p>\n<p>net.core.rmem_default, net.core.wmem_default, net.core.rmem_max, net.core.wmem_max: \u8bbe\u7f6e\u5185\u6838\u5957\u63a5\u5b57\u63a5\u6536\u548c \u53d1\u9001\u7f13\u51b2\u533a\u5927\u5c0f\u3002<\/p>\n<h4>\u76f8\u5bf9\u91cd\u8981\u7684<\/h4>\n<p>net<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>ip_forward<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span> #\u5f00\u542f\u670d\u52a1\u6570\u636e\u7684\u8def\u7531\u529f\u80fd<br \/>\nnet<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>tcp_syncookies <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span> #\u542f\u52a8SYN cookies\u529f\u80fd&#xff0c;\u907f\u514dtcp SYN\u7684\u653b\u51fb<br \/>\nnet<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>tcp_max_tw_buckets <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">6000<\/span> #\u7cfb\u7edf\u4e2d\u5141\u8bb8\u51fa\u73b0\u7684\u6700\u5927\u7684time_wait\u7684\u6570\u91cf<br \/>\nnet<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>tcp_tw_recycle \u548c net<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>tcp_tw_reuse<span class=\"token punctuation\">:<\/span> \u542f\u7528TIME_WAIT\u5957\u63a5\u5b57\u5feb\u901f\u56de\u6536\u548c\u91cd\u7528\u3002<br \/>\nvm<span class=\"token punctuation\">.<\/span>overcommit_memory <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">:<\/span> \u63a7\u5236\u5185\u5b58\u8d85\u989d\u5206\u914d\u7b56\u7565&#xff0c;\u907f\u514dOOM killer\u6740\u6389\u8fdb\u7a0b\u3002<br \/>\nnet<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>ip_local_port_range <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1024<\/span> <span class=\"token number\">65000<\/span><br \/>\nnet<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>tcp_window_scaling <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">:<\/span> \u542f\u7528TCP\u7a97\u53e3\u7f29\u653e\u529f\u80fd&#xff0c;\u5141\u8bb8\u5927\u7a97\u53e3\u7684TCP\u4f20\u8f93\u3002<br \/>\nnet<span class=\"token punctuation\">.<\/span>ipv4<span class=\"token punctuation\">.<\/span>conf<span class=\"token punctuation\">.<\/span><span class=\"token keyword\">default<\/span><span class=\"token punctuation\">.<\/span>accept_source_route<span class=\"token punctuation\">:<\/span> \u4e0d\u63a5\u53d7\u6e90\u8def\u7531&#xff0c;\u589e\u52a0\u7f51\u7edc\u5b89\u5168\u6027\u3002<br \/>\nkernel<span class=\"token punctuation\">.<\/span>sysrq <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">:<\/span> \u7981\u7528\u4e86\u5185\u6838\u7684SysRq\u529f\u80fd&#xff0c;SysRq\u5141\u8bb8\u5728\u7cfb\u7edf\u5d29\u6e83\u6216\u51fa\u73b0\u95ee\u9898\u65f6\u6267\u884c\u4e00\u4e9b\u8c03\u8bd5\u64cd\u4f5c\u3002<br \/>\nkernel<span class=\"token punctuation\">.<\/span>core_uses_pid <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">:<\/span> \u8bbe\u7f6e\u6838\u5fc3\u8f6c\u50a8\u6587\u4ef6\u540d\u4e2d\u5305\u542b\u8fdb\u7a0bID&#xff0c;\u6709\u52a9\u4e8e\u6807\u8bc6\u662f\u54ea\u4e2a\u8fdb\u7a0b\u5bfc\u81f4\u4e86\u6838\u5fc3\u8f6c\u50a8\u3002<br \/>\nkernel<span class=\"token punctuation\">.<\/span>msgmnb \u548c kernel<span class=\"token punctuation\">.<\/span>msgmax<span class=\"token punctuation\">:<\/span> \u589e\u52a0IPC\u6d88\u606f\u961f\u5217\u7684\u9ed8\u8ba4\u548c\u6700\u5927\u5927\u5c0f&#xff0c;\u7528\u4e8e\u8fdb\u7a0b\u95f4\u901a\u4fe1\u3002<br \/>\nkernel<span class=\"token punctuation\">.<\/span>shmmax \u548c kernel<span class=\"token punctuation\">.<\/span>shmall<span class=\"token punctuation\">:<\/span> \u8c03\u6574\u5171\u4eab\u5185\u5b58\u7684\u6700\u5927\u5927\u5c0f\u548c\u5206\u914d\u9875\u9762\u6570\u3002<\/p>\n<h3>3\u3001jvm\u8c03\u4f18<\/h3>\n<p>vim <span class=\"token operator\">\/<\/span>usr<span class=\"token operator\">\/<\/span>local<span class=\"token operator\">\/<\/span>tomcat<span class=\"token operator\">\/<\/span>bin<span class=\"token operator\">\/<\/span>catalina<span class=\"token punctuation\">.<\/span>sh<br \/>\n<span class=\"token number\">119<\/span>\u884c\u6dfb\u52a0<\/p>\n<p>JAVA_OPTS<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;$JAVA_OPTS -server -Xms2048m -Xmx2048m -Xmn768m -XX:ParallelGCThreads&#061;2 -XX:MetaspaceSize&#061;128m -XX:MaxMetaspaceSize&#061;512m -Djava.awt.headless&#061;true -XX:&#043;DisableExplicitGC&#034;<\/span><\/p>\n<p>$AVA_OPTS <span class=\"token operator\">&#8211;<\/span>server jvm\u670d\u52a1\u7aef\u7684\u4f18\u5316<br \/>\n<span class=\"token operator\">&#8211;<\/span>Xms2048m<br \/>\nXmx&#xff1a;jvm\u5206\u914d\u7684\u6700\u5927\u5185\u5b58<br \/>\n<span class=\"token number\">2<\/span>\u68384G<span class=\"token punctuation\">:<\/span><br \/>\n\u8bbe\u7f6e\u6210\u7684\u5185\u5b58\u7684<br \/>\n\u5b98\u65b9\u5efa\u8bae&#xff0c;\u521d\u59cb\u5927\u5c0f\u548c\u6700\u5927\u503c\u8bbe\u7f6e\u6210\u4e00\u6837\u7684\u503c\u3002<br \/>\n\u4e00\u822c\u662f\u7269\u7406\u5185\u5b58\u5927\u5c0f\u7684\u4e00\u822c\u3002<\/p>\n<p><span class=\"token operator\">&#8211;<\/span>Xmn768m&#xff1a;\u8bbe\u7f6e\u65b0\u751f\u4ee3\u7684\u5185\u5b58\u5927\u5c0f&#xff0c;\u5efa\u8bae\u8bbe\u7f6e\u6210\u6574\u4e2a\u5806\u5185\u5b58\u5927\u5c0f\u7684<span class=\"token number\">3<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">8<\/span><\/p>\n<p><span class=\"token operator\">&#8211;<\/span>XX<span class=\"token punctuation\">:<\/span>ParallelGCThreads<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span>&#xff1a;\u8bbe\u7f6e\u8d44\u6e90\u56de\u6536\u5668\u7684\u7ebf\u7a0b\u6570\u91cf\u662f<span class=\"token number\">2<\/span><span class=\"token punctuation\">.<\/span><\/p>\n<p><span class=\"token operator\">&#8211;<\/span>XX<span class=\"token punctuation\">:<\/span>MetaspaceSize<span class=\"token operator\">&#061;<\/span><span class=\"token number\">128m<\/span>&#xff1a;\u5143\u7a7a\u95f4\u7684\u521d\u59cb\u5927\u5c0f<\/p>\n<p><span class=\"token operator\">&#8211;<\/span>XX<span class=\"token punctuation\">:<\/span>MaxMetaspaceSize<span class=\"token operator\">&#061;<\/span><span class=\"token number\">512m<\/span>&#xff1a;\u5143\u7a7a\u95f4\u7684\u6700\u5927\u503c<br \/>\n\u5143&#xff1a;\u90fd\u662f\u4fdd\u5b58\u6570\u636e\u7684\u6838\u5fc3\u4fe1\u606f\u3002<\/p>\n<p><span class=\"token operator\">&#8211;<\/span>Djava<span class=\"token punctuation\">.<\/span>awt<span class=\"token punctuation\">.<\/span>headless<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">true<\/span>&#xff1a;\u542f\u7528\u65e0\u56fe\u5f62\u754c\u9762\u7684\u6a21\u5f0f&#xff0c;\u9632\u6b62\u5728linux\u7cfb\u7edf\u4e0b&#xff0c;web\u9875\u9762\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\u56fe\u7247<br \/>\n<span class=\"token operator\">&#8211;<\/span>XX<span class=\"token punctuation\">:<\/span><span class=\"token operator\">&#043;<\/span>DisableExplicitGC&#xff1a;\u5783\u573e\u56de\u6536\u673a\u5236\u7684\u4fe1\u606f\u5728\u540e\u53f0\u663e\u793a\u3002<\/p>\n<h4>tomcat\u9875\u9762\u4ecb\u7ecd<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170344-680285f0b4f62.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h5>\u201cajp-nio-8009\u201d<\/h5>\n<ul>\n<li>AJP&#xff1a;AJP\u662f\u5df2\u79cd\u534f\u8bae\u3002AJP\u534f\u8bae(\u5185\u90e8\u901a\u8baf) tomcat\u670d\u52a1\u7aef\u548c\u524d\u7aef\u7684\u670d\u52a1\u5668\u8fdb\u884c\u8fde\u63a5\u7684\u534f\u8bae&#xff0c;\u63d0\u4f9b\u8d1f\u8f7d\u5747\u8861\u548c\u9ad8\u6548\u8bf7\u6c42\u7684\u8f6c\u53d1\u3002 tomcat nginx<\/li>\n<li>NIO&#xff1a;NIO\u6280\u672f \u5f02\u6b65\u975e\u963b\u585e\u901a\u4fe1<\/li>\n<li>\u548c\u524d\u7aef\u670d\u52a1\u5668\u901a\u4fe1\u7684\u7aef\u53e3\u662f 8009<\/li>\n<\/ul>\n<h2>\u56db. tomcat\u52a8\u9759\u5206\u79bb<\/h2>\n<p>\u5ba2\u6237\u7aef:\u6d4f\u89c8\u5668 192.168.246.6\/(\u8bbf\u95ee\u9759\u6001) 192.168.246.6\/index.php(\u8bbf\u95ee\u52a8\u6001) nginx1:\u8c03\u5ea6\u5668192.168.246.6 nginx2\u9759\u6001\u9875\u9762192.168.246.9 nginx3 \u9759\u6001\u9875\u9762192.168.246.10 tomcat1:\u540e\u7aef\u670d\u52a1\u56681 \u52a8\u6001192.168.246.7 tomcat2:\u540e\u7aef\u670d\u52a1\u56682 \u52a8\u6001192.168.246.8 Nginx&#043;Tomcat\u8d1f\u8f7d\u5747\u8861\u3001\u52a8\u9759\u5206\u79bb\u914d\u5236\u5982\u56fe\u7684\u4e09\u5c42&#xff0c;\u663e\u793a\u4ee3\u7406\u670d\u52a1\u5668\u4e0enginx\u9759\u6001\u670d\u52a1\u5668\u4e0etomcat\u52a8\u6001\u670d\u52a1\u5668\u7684\u914d\u7f6e <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170344-680285f0ed176.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>stream <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token return-type class-name\">upstream<\/span> tomcat <span class=\"token punctuation\">{<\/span><br \/>\n        server <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.9<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">80<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        server <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.10<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">8080<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    server <span class=\"token punctuation\">{<\/span><br \/>\n        listen <span class=\"token number\">80<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">proxy_pass<\/span> test<span class=\"token punctuation\">;<\/span><br \/>\n   <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token preprocessor property\">#\u6e90server\u7684\u7aef\u53e3\u6539\u4e3a81<\/span><\/p>\n<p>nginx2\u9759\u6001\u9875\u9762<\/p>\n<p><span class=\"token return-type class-name\">upstream<\/span> tomcat <span class=\"token punctuation\">{<\/span><br \/>\n        server <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.7<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">8080<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        server <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.8<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">8080<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token preprocessor property\">#server\u4e2d\u6dfb\u52a0<\/span><br \/>\n location <span class=\"token operator\">~<\/span><span class=\"token operator\">*<\/span> \\\\<span class=\"token punctuation\">.<\/span>jsp <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token class-name\">proxy_pass<\/span> http<span class=\"token punctuation\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>tomcat<span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header X<span class=\"token operator\">&#8211;<\/span>Real<span class=\"token operator\">&#8211;<\/span>IP $remote_addr<span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header X<span class=\"token operator\">&#8211;<\/span>Forwarded<span class=\"token operator\">&#8211;<\/span>For $proxy_add_x_forwarded_for<span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header HOST $host<span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token punctuation\">}<\/span><\/p>\n<p>nginx3\u9759\u6001\u9875\u9762\u4e00\u6837 tomcat1:\u540e\u7aef\u670d\u52a1\u56681\u4e0etomcat2:\u540e\u7aef\u670d\u52a1\u56682\u6b63\u5e38\u5b89\u88c5tomcat\u52a8\u6001\u9875\u9762\u5373\u53ef<\/p>\n<p>root&#064;u10<span class=\"token punctuation\">:<\/span><span class=\"token operator\">~<\/span># curl <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.6<\/span><br \/>\n\u9759\u6001\u7f51\u9875<span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.10<\/span><br \/>\nroot&#064;u10<span class=\"token punctuation\">:<\/span><span class=\"token operator\">~<\/span># curl <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.6<\/span><br \/>\n\u9759\u6001\u7f51\u9875<span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.9<\/span><br \/>\nroot&#064;u10<span class=\"token punctuation\">:<\/span><span class=\"token operator\">~<\/span># curl <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.6<\/span><span class=\"token operator\">\/<\/span>index<span class=\"token punctuation\">.<\/span>jsp<br \/>\n\u52a8\u6001\u7f51\u9875<span class=\"token number\">1<\/span>&#xff1b;http<span class=\"token punctuation\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>www<span class=\"token punctuation\">.<\/span>test1<span class=\"token punctuation\">.<\/span>com<br \/>\nroot&#064;u10<span class=\"token punctuation\">:<\/span><span class=\"token operator\">~<\/span># curl <span class=\"token number\">192.168<\/span><span class=\"token number\">.246<\/span><span class=\"token number\">.6<\/span><span class=\"token operator\">\/<\/span>index<span class=\"token punctuation\">.<\/span>jsp<br \/>\n\u52a8\u6001\u7f51\u9875<span class=\"token number\">2<\/span>&#xff1b;http<span class=\"token punctuation\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>www<span class=\"token punctuation\">.<\/span>test2<span class=\"token punctuation\">.<\/span>com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf28\u6b21\u3002tomcat\uff1aindex.jsp &#8212;&#8212;&#8212;&#8212;&gt;java\u7f16\u8bd1\u7684\u4ee3\u7801\u4e09\u4e2a\u529f\u80fd\u7ec4\u5408\u800c\u6210java servlet\uff1atomcat\u662f\u4e00\u4e2aservlet\u5bb9\u5668\uff0c\u8d1f\u8d23\u7ba1\u7406\u548c\u6267\u884ciava-servlet\uff0c\u670d\u52a1\u7aef\u7684java\u7a0b\u5e8f\u3002\u5904\u7406\u5ba2\u6237\u7aef\u7684http\u7684\u8bf7\u6c42\u548c\u54cd\u5e94\u3002\uff08\u670d\u52a1\u7aef\u7684\u914d\u7f6e\uff09pages\uff1a\u52a8\u6001\u9875\u9762\u7684\u6280\u672f&#8212;&#8211;&gt;Java\u4ee3\u7801\u5b8c\u6210\u7684tomcat\u65e2\u53ef\u4ee5\u4f5c\u4e3a\u5df2iava\u4ee3\u7801\u4e3a\u57fa\u7840\u7684\u52a8\u6001\u9875\u9762\uff0c\u4e5f\u53ef\u4ee5\u5904\u7406\u548c\u8f6c\u53d1\u52a8\u6001\u8bf7\u6c42\u3002\uff08\u5e76\u53d1\u80fd\u529b\u5f88\u5dee\uff0c\u9002\u5408\u5c0f\u9879\u76ee\u3002AJP\uff1aAJP\u662f\u5df2\u79cd\u534f\u8bae\u3002AJP\u534f\u8bae(\u5185\u90e8\u901a\u8baf)_tomcat web\u670d\u52a1<\/p>\n","protected":false},"author":2,"featured_media":18686,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[223,87,44],"topic":[],"class_list":["post-18690","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-tomcat","tag-87","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/18690.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf28\u6b21\u3002tomcat\uff1aindex.jsp ------------&gt;java\u7f16\u8bd1\u7684\u4ee3\u7801\u4e09\u4e2a\u529f\u80fd\u7ec4\u5408\u800c\u6210java servlet\uff1atomcat\u662f\u4e00\u4e2aservlet\u5bb9\u5668\uff0c\u8d1f\u8d23\u7ba1\u7406\u548c\u6267\u884ciava-servlet\uff0c\u670d\u52a1\u7aef\u7684java\u7a0b\u5e8f\u3002\u5904\u7406\u5ba2\u6237\u7aef\u7684http\u7684\u8bf7\u6c42\u548c\u54cd\u5e94\u3002\uff08\u670d\u52a1\u7aef\u7684\u914d\u7f6e\uff09pages\uff1a\u52a8\u6001\u9875\u9762\u7684\u6280\u672f-----&gt;Java\u4ee3\u7801\u5b8c\u6210\u7684tomcat\u65e2\u53ef\u4ee5\u4f5c\u4e3a\u5df2iava\u4ee3\u7801\u4e3a\u57fa\u7840\u7684\u52a8\u6001\u9875\u9762\uff0c\u4e5f\u53ef\u4ee5\u5904\u7406\u548c\u8f6c\u53d1\u52a8\u6001\u8bf7\u6c42\u3002\uff08\u5e76\u53d1\u80fd\u529b\u5f88\u5dee\uff0c\u9002\u5408\u5c0f\u9879\u76ee\u3002AJP\uff1aAJP\u662f\u5df2\u79cd\u534f\u8bae\u3002AJP\u534f\u8bae(\u5185\u90e8\u901a\u8baf)_tomcat web\u670d\u52a1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/18690.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-18T17:03:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170344-680285f082873.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\/18690.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/18690.html\",\"name\":\"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T17:03:46+00:00\",\"dateModified\":\"2025-04-18T17:03:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/18690.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/18690.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/18690.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/18690.html","og_locale":"zh_CN","og_type":"article","og_title":"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf28\u6b21\u3002tomcat\uff1aindex.jsp ------------&gt;java\u7f16\u8bd1\u7684\u4ee3\u7801\u4e09\u4e2a\u529f\u80fd\u7ec4\u5408\u800c\u6210java servlet\uff1atomcat\u662f\u4e00\u4e2aservlet\u5bb9\u5668\uff0c\u8d1f\u8d23\u7ba1\u7406\u548c\u6267\u884ciava-servlet\uff0c\u670d\u52a1\u7aef\u7684java\u7a0b\u5e8f\u3002\u5904\u7406\u5ba2\u6237\u7aef\u7684http\u7684\u8bf7\u6c42\u548c\u54cd\u5e94\u3002\uff08\u670d\u52a1\u7aef\u7684\u914d\u7f6e\uff09pages\uff1a\u52a8\u6001\u9875\u9762\u7684\u6280\u672f-----&gt;Java\u4ee3\u7801\u5b8c\u6210\u7684tomcat\u65e2\u53ef\u4ee5\u4f5c\u4e3a\u5df2iava\u4ee3\u7801\u4e3a\u57fa\u7840\u7684\u52a8\u6001\u9875\u9762\uff0c\u4e5f\u53ef\u4ee5\u5904\u7406\u548c\u8f6c\u53d1\u52a8\u6001\u8bf7\u6c42\u3002\uff08\u5e76\u53d1\u80fd\u529b\u5f88\u5dee\uff0c\u9002\u5408\u5c0f\u9879\u76ee\u3002AJP\uff1aAJP\u662f\u5df2\u79cd\u534f\u8bae\u3002AJP\u534f\u8bae(\u5185\u90e8\u901a\u8baf)_tomcat web\u670d\u52a1","og_url":"https:\/\/www.wsisp.com\/helps\/18690.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T17:03:46+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170344-680285f082873.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\/18690.html","url":"https:\/\/www.wsisp.com\/helps\/18690.html","name":"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T17:03:46+00:00","dateModified":"2025-04-18T17:03:46+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/18690.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/18690.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/18690.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"tomcat\uff08Web\u5e94\u7528\u670d\u52a1\u5668\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/18690","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=18690"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/18690\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/18686"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=18690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=18690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=18690"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=18690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}