{"id":63704,"date":"2025-04-29T13:57:30","date_gmt":"2025-04-29T05:57:30","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63704\/"},"modified":"2025-04-29T13:57:30","modified_gmt":"2025-04-29T05:57:30","slug":"linux-tomcat%e7%ab%af%e5%8f%a3%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63704\/","title":{"rendered":"linux tomcat\u7aef\u53e3\u600e\u4e48\u8bbe\u7f6e"},"content":{"rendered":"<blockquote><p>\n  \u8981\u5728 linux \u4e2d\u66f4\u6539 tomcat \u7684\u7aef\u53e3\uff0c\u8bf7\u4fee\u6539\u914d\u7f6e\u6587\u4ef6 server.xml \u4e2d\u7684 port \u5c5e\u6027\uff0c\u4f8b\u5982\u5c06 8080 \u66f4\u6539\u4e3a 8090\u3002\u4fdd\u5b58\u66f4\u6539\uff0c\u7136\u540e\u4f7f\u7528 sudo systemctl restart tomcat \u547d\u4ee4\u91cd\u542f tomcat\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/04\/2024060413031797730.jpg\" class=\"aligncenter\" title=\"linux tomcat\u7aef\u53e3\u600e\u4e48\u8bbe\u7f6e\u63d2\u56fe\" alt=\"linux tomcat\u7aef\u53e3\u600e\u4e48\u8bbe\u7f6e\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u8bbe\u7f6e Linux \u4e2d Tomcat \u7aef\u53e3<\/strong><\/p>\n<p>\u8981\u66f4\u6539 Linux \u4e2d Tomcat \u7684\u7aef\u53e3\uff0c\u9700\u8981\u4fee\u6539 Tomcat \u7684\u914d\u7f6e\u6587\u4ef6\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p><strong>1. \u627e\u5230\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n<p>Tomcat \u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e \/usr\/local\/\/conf \u76ee\u5f55\u4e0b\uff0c\u540d\u4e3a server.xml\u3002<\/p>\n<p><strong>2. \u66f4\u6539\u7aef\u53e3\u53f7<\/strong><\/p>\n<p>\u5728 server.xml \u6587\u4ef6\u4e2d\uff0c\u627e\u5230\u4ee5\u4e0b\u4ee3\u7801\u5757\uff1a<\/p>\n<pre>&lt;Connector port=\"8080\" protocol=\"HTTP\/1.1\" connectionTimeout=\"20000\" redirectPort=\"8443\" \/&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06 port=&#8221;8080&#8243; \u4e2d\u7684\u7aef\u53e3\u53f7\u66f4\u6539\u4e3a\u60a8\u6240\u9700\u7684\u7aef\u53e3\u53f7\u3002\u4f8b\u5982\uff0c\u8981\u5c06\u5176\u66f4\u6539\u4e3a 8090\uff0c\u8bf7\u5c06\u5176\u66ff\u6362\u4e3a\uff1a<\/p>\n<pre>&lt;Connector port=\"8090\" protocol=\"HTTP\/1.1\" connectionTimeout=\"20000\" redirectPort=\"8443\" \/&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>3. \u4fdd\u5b58\u66f4\u6539<\/strong><\/p>\n<p>\u4fdd\u5b58 server.xml \u6587\u4ef6\u3002<\/p>\n<p><strong>4. \u91cd\u542f Tomcat<\/strong><\/p>\n<p>\u66f4\u6539\u5b8c\u6210\u540e\uff0c\u9700\u8981\u91cd\u542f Tomcat \u4ee5\u4f7f\u65b0\u914d\u7f6e\u751f\u6548\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u542f\uff1a<\/p>\n<pre>sudo systemctl restart tomcat<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 sudo \u547d\u4ee4\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u3002<\/li>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cTomcat \u76d1\u542c\u7aef\u53e3 8080\u3002<\/li>\n<li>\u53ef\u4ee5\u540c\u65f6\u6307\u5b9a HTTP \u548c HTTPS \u7aef\u53e3\u3002<\/li>\n<li>\u5982\u679c\u60a8\u5728\u9632\u706b\u5899\u4e2d\u542f\u7528\u4e86\u7aef\u53e3\uff0c\u5219\u9700\u8981\u5141\u8bb8\u65b0\u7aef\u53e3\u53f7\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f \u7aef\u53e3\u600e\u4e48\u8bbe\u7f6e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u5728 linux \u4e2d\u66f4\u6539 tomcat \u7684\u7aef\u53e3\uff0c\u8bf7\u4fee\u6539\u914d\u7f6e\u6587\u4ef6 server.xml \u4e2d\u7684 port \u5c5e\u6027\uff0c\u4f8b\u5982\u5c06 8080 \u66f4\u6539\u4e3a 8090\u3002\u4fdd\u5b58\u66f4\u6539\uff0c\u7136\u540e\u4f7f\u7528 sudo systemctl restart tomcat \u547d\u4ee4\u91cd\u542f tomcat\u3002 \u5982\u4f55\u8bbe\u7f6e Linux \u4e2d Tomcat \u7aef\u53e3 \u8981\u66f4\u6539 Linux \u4e2d Tomcat \u7684\u7aef\u53e3\uff0c\u9700\u8981\u4fee\u6539 Tomcat \u7684\u914d\u7f6e\u6587\u4ef6\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a 1. \u627e\u5230\u914d\u7f6e\u6587\u4ef6 Tomcat \u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e \/usr\/local\/\/conf \u76ee\u5f55\u4e0b\uff0c\u540d\u4e3a server.xml\u3002 2. \u66f4\u6539\u7aef\u53e3\u53f7 \u5728 server.xml \u6587\u4ef6\u4e2d\uff0c\u627e\u5230\u4ee5\u4e0b\u4ee3\u7801\u5757\uff1a &lt;Connector port=&#8221;8080&#8243; protocol=&#8221;HTTP\/1.1&#8243; connectionTimeout=&#8221;20000&#8243; redirectPort=&#8221;8443&#8243; \/&gt; \u767b\u5f55\u540e\u590d\u5236 \u5c06 port=&#8221;8080&#8243; \u4e2d\u7684\u7aef\u53e3\u53f7\u66f4\u6539\u4e3a\u60a8\u6240\u9700\u7684\u7aef\u53e3\u53f7\u3002\u4f8b\u5982\uff0c\u8981\u5c06\u5176\u66f4\u6539\u4e3a 8090\uff0c\u8bf7\u5c06\u5176\u66ff\u6362\u4e3a\uff1a &lt;Connector port=&#8221;8090&#8243; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63704","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=63704"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63704\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}