4lqedz 发表于 2024-7-27 17:13:02

大型网站架构的技术细节:后端的工作原理,搭建Web应用服务器


    <h1 style="color: black; text-align: left; margin-bottom: 10px;">搭建Web应用服务器</h1>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">后端应用程序的服务器<span style="color: black;">叫作</span>为Web应用服务器,Web应用服务器<span style="color: black;">按照</span><span style="color: black;">区别</span>的<span style="color: black;">研发</span>语言是有所区别的。<span style="color: black;">这儿</span>以Java<span style="color: black;">研发</span>的后端应用程序为例,对应的Web应用服务器软件有Tomcat、Jetty和Weblogic。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;">Web应用服务器和第3章<span style="color: black;">说到</span>的Web服务器是有所区别的。Web服务器<span style="color: black;">通常</span>处理的是静态网页资源,如网页<span style="color: black;">关联</span>文件和<span style="color: black;">照片</span>等资源文件,而Web应用服务器除了能处理静态文件之外,还<span style="color: black;">能够</span>执行应用程序。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Tomcat:在架构方面其采用了整体架构,<span style="color: black;">很难</span>扩展并且配置<span style="color: black;">繁杂</span>,<span style="color: black;">然则</span>功能全面;在文档方面其功能比较全面,网上能查到<span style="color: black;">非常多</span>在<span style="color: black;">运用</span>过程中遇到的问题;在应用场景方面,其适用于频繁且生命周期较短的请求。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Jetty:在架构方面基于一个可扩展的架构,扩展<span style="color: black;">更易</span>且配置简单,可<span style="color: black;">按照</span>需要增减组件,内存开销相对更少;在文档方面,其文档比较零散,网上能查到的在<span style="color: black;">运用</span>过程中遇到问题较少<span style="color: black;">有些</span>;在应用场景方面,其适用于<span style="color: black;">海量</span>连接且<span style="color: black;">长期</span>的请求,如Web聊天应用。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Weblogic是一款不开源且<span style="color: black;">难免</span>费的<span style="color: black;">商场</span>软件,功能完善<span style="color: black;">况且</span>版本稳定。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Web应用服务器软件的<span style="color: black;">选取</span>可<span style="color: black;">按照</span><span style="color: black;">详细</span>的业务场景而<span style="color: black;">选择</span>。当然,一个大型网站系统里可能会有多种Web应用服务器软件,<span style="color: black;">由于</span><span style="color: black;">区别</span>的后端应用程序会有<span style="color: black;">区别</span>的业务场景和性能<span style="color: black;">需求</span>,<span style="color: black;">因此</span>Web应用服务器软件需要<span style="color: black;">按照</span><span style="color: black;">实质</span><span style="color: black;">状况</span>来<span style="color: black;">选择</span>。但<span style="color: black;">通常</span><span style="color: black;">状况</span>下,大<span style="color: black;">都数</span>的业务请求都是频繁的<span style="color: black;">况且</span>生命周期较短,在流行性方面Tomcat<span style="color: black;">亦</span>是比较占优的,<span style="color: black;">因此呢</span><span style="color: black;">这儿</span><span style="color: black;">选择</span>Tomcat<span style="color: black;">做为</span>本书的Web应用服务器软件。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">因为</span>Tomcat本身是用Java语言编写的,其运行的后端应用程序<span style="color: black;">亦</span>是用Java编写的,而运行Java编写的程序需要JDK环境,<span style="color: black;">因此</span>Tomcat的安装<span style="color: black;">过程</span>大体上分成两部分,即JDK安装和Tomcat安装。<span style="color: black;">这儿</span>需要<span style="color: black;">重视</span>的是,<span style="color: black;">区别</span>的Tomcat版本对JDK版本是有<span style="color: black;">需求</span>的,如表4.1所示,详情见Tomcat官方文档(</span><span style="color: black;"><span style="color: black;">http://tomcat.apache.org/whichversion.html</span></span><span style="color: black;">)。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">表4.1 <span style="color: black;">区别</span>的Tomcat版本对JDK版本的<span style="color: black;">需求</span></span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/823152ca69fe45818f5bfe541782f697~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=gAc0d1j43Rqleel6cUR1sEQDy8s%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/c68238f2e7b2407c90cd517bffe8c4a0~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=PfZhH%2FN6BeqPuXx%2FaudSCryZnmQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面分别在Windows系统和CentOS系统中安装Tomcat。<span style="color: black;">选取</span>这两个系统是<span style="color: black;">由于</span>Windows<span style="color: black;">通常</span>是<span style="color: black;">研发</span>人员在<span style="color: black;">研发</span>时<span style="color: black;">运用</span>的操作系统,而CentOS<span style="color: black;">通常</span>是网站服务器的操作系统。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">说明:</span><span style="color: black;">JDK(Java Development Kit)是Java软件<span style="color: black;">研发</span>工具包,其<span style="color: black;">包括</span>Java的运行环境和工具。JDK的原理会在4.1.4小节“后端应用程序的工作原理”中<span style="color: black;">详细</span>介绍,<span style="color: black;">这儿</span>只需要关注安装<span style="color: black;">过程</span><span style="color: black;">就可</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1.在Windows系统中安装Tomcat</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在Windows系统中安装Tomcat的操作<span style="color: black;">过程</span>如下:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)从Oracle JDK官网</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(</span><span style="color: black;"><span style="color: black;">https://www.oracle.com/java/technologies/javase-downloads.html</span></span><span style="color: black;">)上下载JDK,<span style="color: black;">通常</span><span style="color: black;">选取</span>最新的LTS(Long Time Support,<span style="color: black;">长时间</span>支持)版本。官网上的版本划分如图4.1所示,<span style="color: black;">这儿</span><span style="color: black;">选取</span>JDK 11(图4.1中的Java SE 11)<span style="color: black;">做为</span>安装版本,打开下载链接后<span style="color: black;">选取</span>Windows版本的JDK安装包下载<span style="color: black;">就可</span>。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/8a4a1336ba2945bf922c87587275512b~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=sqMMOpmdMHM7ggcrBQqJneIfQgk%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.1 官网上的版本划分</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;"><span style="color: black;">有些</span>项目出于JDK升级成本或稳定性的<span style="color: black;">思虑</span>,会<span style="color: black;">选择</span>旧版本的JDK,如JDK 8。<span style="color: black;">倘若</span>项目的JDK版本<span style="color: black;">已然</span>选定了,<span style="color: black;">那样</span>即使是<span style="color: black;">研发</span>环境,<span style="color: black;">亦</span>应该<span style="color: black;">选择</span>对应的版本。<span style="color: black;">另一</span>,JDK<span style="color: black;">通常</span>指的是Oracle的JDK。除此之外还有其他的JDK,如Open JDK等。2019年后发布的Oracle JDK版本<span style="color: black;">起始</span>收费(<span style="color: black;">商场</span>用途),而Open JDK是完全免费的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)双击下载的JDK安装文件安装JDK。安装完毕后需要配置环境变量<span style="color: black;">才可</span>让JDK生效。打开“系统属性”对话框,单击“环境变量”按钮弹出“环境变量”对话框,如图4.2所示。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/ee90c8808e4d4a398c7165871d723e32~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=201%2B8EZraF1N%2F5H3wL%2BYMWG1Z7k%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.2 “环境变量”对话框</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">打开“环境变量”对话框后,在“系统变量”栏中添加JAVA_HOME变量,如图4.3所示。其中,变量的值为JDK的安装目录,JAVA_HOME这个变量名是固定的,<span style="color: black;">非常多</span>第三方软件都会<span style="color: black;">按照</span>JAVA_HOME寻找JDK的路径。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/24ca14757924475a857647dc5d3713b2~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=H3nWyUvHo3ReZ7xVBwVy4Hu4RjQ%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.3 设置JAVA_HOME环境变量</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">添加完JAVA_HOME变量后编辑Path变量,把%JAVA_HOME%\bin添加进去,如图4.4所示。值得一提的是,Path变量的设置是为了让Windows系统找到JDK的位置,设置Path环境变量后,就<span style="color: black;">能够</span>在任何目录下执行javac/java等命令了。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而JAVA_HOME的设置不仅是为了在Path变量设置时<span style="color: black;">显出</span>简洁,更重要的是让<span style="color: black;">有些</span>软件找到JDK的位置,如Tomcat便是<span style="color: black;">经过</span>JAVA_HOME环境变量找到JDK位置的(默认<span style="color: black;">状况</span>)。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/69c6c07c69e84d17b3fb91c6296239d4~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=PlEw25I%2BfKxnHCntHMVAW86Kat4%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.4 在Path变量中添加JAVA_HOME</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">配置完环境变量之后,就<span style="color: black;">能够</span>检验JDK<span style="color: black;">是不是</span>安装完<span style="color: black;">成为了</span>。打开一个新的CMD窗口(旧的CMD窗口不识别新设置的环境变量),执行java-version命令,<span style="color: black;">倘若</span>命令执行后<span style="color: black;">表示</span>当前的JDK版本的话,即说明JDK安装成功,如图4.5所示。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/b3883e432b124d92ac5ce715a96b03c5~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=dk2QlBHJWYsXBgSD896EHFRmy0o%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.5 检验JDK<span style="color: black;">是不是</span>安装成功</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;"><span style="color: black;">倘若</span>之前安装了其他版本的JDK,需要先卸载原有的JDK再安装新的JDK,卸载JDK需要在“应用和功能”中卸载,<span style="color: black;">这般</span><span style="color: black;">才可</span>把原有的JDK卸载干净。<span style="color: black;">另一</span>,<span style="color: black;">这儿</span>的环境变量配置是以JDK 11为例的,其他版本的JDK在环境变量配置时可能会有所区别。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)从Tomcat官网(</span><span style="color: black;"><span style="color: black;">https://tomcat.apache.org/</span></span><span style="color: black;">)上下载Tomcat,<span style="color: black;">这儿</span><span style="color: black;">选取</span>最新的稳定版本。官网上的版本划分如图4.6所示,<span style="color: black;">这儿</span>下载适用于Windows系统的Tomcat 9。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p6-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/52fde700d6a24b12bf1f8b697d549713~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=9KaotosdnGuXpYYCx0tH6tMRcfA%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.6 官网上的版本划分</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;"><span style="color: black;">非常多</span>项目都<span style="color: black;">选择</span>Tomcat的旧版本(如稳定性较好的8.5),这是<span style="color: black;">由于</span>Web应用服务器最重要的<span style="color: black;">便是</span>稳定性,旧版本的稳定性<span style="color: black;">已然</span>经过了<span style="color: black;">长期</span>的验证,而新版本虽然带来<span style="color: black;">非常多</span>新的功能,<span style="color: black;">然则</span>新功能<span style="color: black;">亦</span>可能会给Tomcat带来不稳定的<span style="color: black;">状况</span>,况且这些新功能<span style="color: black;">非常多</span><span style="color: black;">状况</span>下都是不必要的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)下载完Tomcat压缩包后,将其解压,目录结构如图4.7所示。其中,webapps/ROOT文件夹默认存放后端应用程序,conf文件夹存放的是Tomcat<span style="color: black;">关联</span>的配置文件,logs文件夹存放的是Tomcat运行日志。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/9acc73134dab4825a18c48606d706240~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=iVJVJzgrHOT2bZmTwFj7%2FN4pLSM%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.7 解压后的Tomcat目录结构</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)修改Tomcat配置。Tomcat的配置文件是conf/server.xml,默认的配置文件如代码4.1所示。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.1 默认的Tomcat配置</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&lt;Connector port="8080" protocol="HTTP/1.1" &lt;!-- 8080为HTTP请求端口 --&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">connectionTimeout="20000" &lt;!-- 连接超时时间 --&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">redirectPort="8443" /&gt; &lt;!-- 8443为HTTPS重定向端口 --&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&lt;Host</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">name="localhost"</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">appBase="webapps"</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">unpackWARs="true"</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">autoDeploy="true"&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&lt;/Host&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">...</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)添加Tomcat环境变量。打开“环境变量”对话框,在“系统变量”栏中添加CATALINA_HOME变量,如图4.8所示,其中,变量的值为Tomcat的安装目录,CATALINA_HOME这个变量名是固定的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">说明:</span><span style="color: black;">Tomcat<span style="color: black;">实质</span>上是Apache的扩展,其<span style="color: black;">重点</span>由3个部分<span style="color: black;">构成</span>,即Web容器、Catalina和JSP容器。Web容器用于处理<span style="color: black;">有些</span>静态网页资源;Catalina用于运行Java程序;JSP容器用于处理JSP动态网页。值得一提的是,Tomcat虽然能处理静态网页资源,<span style="color: black;">然则</span>其处理能力<span style="color: black;">无</span>Web服务器软件(如Apache和Nginx)<span style="color: black;">有效</span>,<span style="color: black;">因此</span>Tomcat<span style="color: black;">通常</span>只<span style="color: black;">做为</span>Java后端应用程序或JSP的运行环境。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/31c46ef0f43043cfb347019e593e207c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=hpBvFmbzYl306q3n%2B8CIF%2Fv%2FFW0%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.8 设置Tomcat环境变量</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(7)<span style="color: black;">起步</span>Tomcat。进入图4.7所示的bin文件夹,双击startup.bat文件,正常<span style="color: black;">状况</span>下会<span style="color: black;">显现</span>如图4.9所示的窗口,此窗口无须关闭,关闭窗口即为关闭Tomcat。<span style="color: black;">倘若</span>窗口一闪而过,则<span style="color: black;">暗示</span>Tomcat<span style="color: black;">起步</span>失败,<span style="color: black;">能够</span>查看图4.7所示的logs文件夹中的catalina.log日志。<span style="color: black;">倘若</span>保持默认Tomcat配置的话,在浏览器的<span style="color: black;">位置</span>栏中输入http://localhost:8080会打开Tomcat的默认网页,如图4.10所示。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;">Tomcat除了<span style="color: black;">以上</span><span style="color: black;">起步</span>方式以外,还<span style="color: black;">能够</span><span style="color: black;">经过</span>“Windows服务”的形式<span style="color: black;">起步</span>,即Tomcat的<span style="color: black;">起步</span>无须人工执行,计算机会自动在后台进程中执行Tomcat程序,并且<span style="color: black;">无</span>如图4.9所示的窗口。这种<span style="color: black;">起步</span>方式<span style="color: black;">通常</span>是在Windows<span style="color: black;">做为</span>服务器系统的<span style="color: black;">状况</span>下,而在<span style="color: black;">做为</span><span style="color: black;">研发</span>时<span style="color: black;">运用</span>的Windows系统中,不<span style="color: black;">意见</span>以Windows服务的形式<span style="color: black;">起步</span>Tomcat,<span style="color: black;">这般</span>会与IDE(IDE指的是<span style="color: black;">研发</span>工具,如Eclipse、VS Code等)调试后端应用程序时产生冲突。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/3dc13a33a1da4442968434b56870a585~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=gfUBa6Tg0xmKwU5UWZf64VDN%2FtA%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.9 Tomcat<span style="color: black;">起步</span>窗口</p>
    </div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/2dc6748faf0d4602aec45a3ba37741e2~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=J2MO3J%2BFmnFj%2FpDDxgrN9LNah00%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.10 Tomcat默认网页</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(8)<span style="color: black;">倘若</span>非本机的浏览器想要<span style="color: black;">拜访</span>Tomcat服务,则需要设置防火墙开启端口权限。<span style="color: black;">针对</span>大型网站而言,服务器系统<span style="color: black;">通常</span>为Linux系统,Windows的Tomcat<span style="color: black;">通常</span>只是为了本地<span style="color: black;">研发</span><span style="color: black;">运用</span>,非本机浏览器<span style="color: black;">拜访</span>的场景比较少,<span style="color: black;">因此呢</span>防火墙的设置不是必要的操作。<span style="color: black;">倘若</span><span style="color: black;">研发</span>时有非本机<span style="color: black;">拜访</span>的<span style="color: black;">状况</span>,<span style="color: black;">能够</span>暂时关闭Windows防火墙。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2.在CentOS系统中安装Tomcat</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在CentOS系统中安装Tomcat时,<span style="color: black;">举荐</span><span style="color: black;">经过</span>下载指定版本的方式进行安装。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">需要<span style="color: black;">重视</span>的是,<span style="color: black;">研发</span>环境和生产环境的Tomcat版本最好保持一致,<span style="color: black;">这般</span>能避免<span style="color: black;">有些</span><span style="color: black;">因为</span>Tomcat版本差异而<span style="color: black;">诱发</span>的问题。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;"><span style="color: black;">这儿</span>有别于3.1.1小节中<span style="color: black;">举荐</span>的yum安装,这是<span style="color: black;">由于</span>Web服务器(Apache、Nginx等)只是负责静态资源处理,版本差异对稳定性不会产生太大的影响,而Web应用服务器软件(Tomcat等)是<span style="color: black;">做为</span>后端应用程序的容器,版本差异对后端应用程序的稳定性影响<span style="color: black;">很强</span>,<span style="color: black;">因此呢</span>Web应用服务器软件需要指定版本进行安装。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面是CentOS系统中安装Tomcat的<span style="color: black;">详细</span>操作<span style="color: black;">过程</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)从Oracle JDK官网</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(</span><span style="color: black;"><span style="color: black;">https://www.oracle.com/java/technologies/javase-downloads.html</span></span><span style="color: black;">)上下载JDK,<span style="color: black;">通常</span><span style="color: black;">选取</span>最新的LTS(Long Time Support,<span style="color: black;">长时间</span>支持)版本。官网上的版本划分如图4.1所示,<span style="color: black;">这儿</span><span style="color: black;">选取</span>JDK 11(图4.1中的Java SE 11)<span style="color: black;">做为</span>安装版本。单击下载链接后会进入<span style="color: black;">仔细</span>的下载页面,如图4.11所示。<span style="color: black;">选取</span>对应系统的安装包安装起来会方便<span style="color: black;">有些</span>,<span style="color: black;">然则</span>为了安装<span style="color: black;">过程</span>的通用性,<span style="color: black;">咱们</span><span style="color: black;">选取</span>通用的Linux压缩包<span style="color: black;">做为</span>下载对象。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/6c0c8ed896874eebaec8879cdc83e05e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=ydJ7MRsBGMJ4UordJb2VCP2pq6w%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.11 <span style="color: black;">仔细</span>的下载页面</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(2)安装JDK。下载完通用的Linux系统压缩包后,把JDK压缩包解压到任意目录下(<span style="color: black;">这儿</span><span style="color: black;">举荐</span>/usr/local目录),解压命令如代码4.2所示,其中,</p>jdk-11.0.6_linux-x64_bin.tar.gz是压缩包名,/usr/local/是解压的<span style="color: black;">目的</span>路径。解压后的目录结构如图4.12所示。

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.2 解压缩JDK压缩包</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo tar -xvf jdk-11.0.6_linux-x64_bin.tar.gz -C /usr/local/</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/7ddf450209c340268086d14bfc4315ba~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=B%2BiO4tjtHX3pDngQkXPLKpsbzaw%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.12 JDK解压后的目录结构</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">解压完毕后,需要配置环境变量<span style="color: black;">才可</span>让JDK生效,配置命令如代码4.3所示。其中,/usr/local/jdk-11.0.6为JDK的路径。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.3 配置JDK环境变量</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo echo export JAVA_HOME=/usr/local/jdk-11.0.6 &gt;&gt; /etc/profile</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo echo export PATH=$PATH:$JAVA_HOME/bin &gt;&gt; /etc/profile</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo source /etc/profile</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">配置完JDK的环境变量后,输入java-version检验JDK<span style="color: black;">是不是</span>安装成功,正常<span style="color: black;">状况</span>下会<span style="color: black;">表示</span>当前的JDK版本,如图4.13所示。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/d609daf3b01a4921ada9ac7a0123bd5a~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=gZHpaBls5YqimsSc5%2Bkdf%2FZJOb8%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.13 检验JDK<span style="color: black;">是不是</span>安装成功</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)从Tomcat官网(</span><span style="color: black;"><span style="color: black;">https://tomcat.apache.org/</span></span><span style="color: black;">)上下载Tomcat,<span style="color: black;">这儿</span><span style="color: black;">选取</span>最新的稳定版本。官网上的版本划分如图4.14所示,<span style="color: black;">这儿</span>下载适用于Linux系统的Tomcat 9。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/beb6417f1abb4a30ae0dcc593f46892d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=vOtFJfBSYqHF6yxUjWlj6EFp2VY%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.14 官网上的版本划分</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">重视</span>:</span><span style="color: black;">前面在Windows系统中安装Tomcat时<span style="color: black;">说到</span>,Tomcat的版本不<span style="color: black;">必定</span>要<span style="color: black;">选择</span>最新的稳定版本,<span style="color: black;">由于</span>Web应用服务器软件最重要的是稳定性,而旧版本<span style="color: black;">因为</span><span style="color: black;">拥有</span>更长的稳定性检验时间,<span style="color: black;">因此</span><span style="color: black;">此刻</span><span style="color: black;">非常多</span><span style="color: black;">机构</span>都在继续<span style="color: black;">运用</span>稳定的Tomcat 8.5或Tomcat 7,而放弃<span style="color: black;">运用</span>新的Tomcat 9或Tomcat 10。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(4)下载完Tomcat压缩包后,把Tomcat压缩包解压到任意目录下(<span style="color: black;">这儿</span><span style="color: black;">举荐</span>/usr/local目录),解压命令如代码4.4所示。其中,</p>apache-tomcat-9.0.33.tar.gz是压缩包名,/usr/local/是解压的<span style="color: black;">目的</span>路径。解压后的目录结构如图4.15所示,其中,webapps文件夹默认用来存放后端应用程序,conf文件夹存放的是Tomcat<span style="color: black;">关联</span>配置文件,logs文件夹存放的是Tomcat运行日志。
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.4 解压缩Tomcat压缩包</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo tar -xvf apache-tomcat-9.0.33.tar.gz -C /usr/local/</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/2df051a4926844989bcd51bd117ce51e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=ytxJEL0cTseribkEe9oBQckiDSU%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.15 解压后的Tomcat目录结构</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)修改Tomcat配置。Tomcat的配置文件是conf/server.xml,默认的配置文件代码如代码4.5所示。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.5 默认的Tomcat配置</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&lt;Connector port="8080" protocol="HTTP/1.1" &lt;!-- 8080为HTTP请求端口 --&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">connectionTimeout="20000" &lt;!-- 连接超时时间 --&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">redirectPort="8443" /&gt; &lt;!-- 8443为HTTPS重定向端口 --&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&lt;Host</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">name="localhost"</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">appBase="webapps"</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">unpackWARs="true"</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">autoDeploy="true"&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&lt;/Host&gt;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(6)添加Tomcat环境变量,配置命令如代码4.6所示,其中,CATALINA_HOME变量名是固定的,</p>/usr/local/apache-tomcat-9.0.33是Tomcat的路径。

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.6 配置Tomcat环境变量</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo echo export CATALINA_HOME=/usr/local/apache-tomcat-9.0.33 &gt;&gt; /etc/</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">profile</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo echo export PATH=$PATH:$CATALINA_HOME/bin &gt;&gt; /etc/profile</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">sudo source /etc/profile</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(7)配置自动<span style="color: black;">起步</span>Tomcat服务。新建</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">/usr/lib/systemd/system/tomcat.service文件,在文件内写入如代码4.7所示的内容,其中,</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">/usr/local/apache-tomcat-9.0.33/bin/startup.sh和</p>/usr/local/apache-tomcat-9.0.33/bin/shutdown.sh需要<span style="color: black;">按照</span><span style="color: black;">实质</span>的目录路径而定。
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.7 配置自动<span style="color: black;">起步</span>Tomcat服务</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Description=Tomcat</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">After=syslog.target network.target remote-fs.target nss-lookup.target</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Type=oneshot</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ExecStart=/usr/local/apache-tomcat-9.0.33/bin/startup.sh</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ExecStop=/usr/local/apache-tomcat-9.0.33/bin/shutdown.sh</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ExecReload=/bin/kill -s HUP $MAINPID</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">RemainAfterExit=yes</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">WantedBy=multi-user.target</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">创建完文件后,设置开机<span style="color: black;">起步</span>命令、<span style="color: black;">起步</span>服务命令和停止服务命令,如代码4.8所示。其中,tomcat.service为刚创建的文件名。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.8 配置开机<span style="color: black;">起步</span>命令等</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">sudo systemctl enable tomcat.service #设置开机<span style="color: black;">起步</span>命令</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">sudo systemctl start tomcat.service #<span style="color: black;">起步</span>服务命令</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">sudo systemctl stop tomcat.service #停止服务命令</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(8)配置防火墙。<span style="color: black;">通常</span>完成<span style="color: black;">过程</span>(4)就能<span style="color: black;">起步</span>Tomcat了,<span style="color: black;">倘若</span>防火墙是开启状态的话,则非本机的浏览器是<span style="color: black;">不可</span><span style="color: black;">拜访</span>Tomcat的,<span style="color: black;">因此呢</span><span style="color: black;">这儿</span>需要配置防火墙。配置防火墙的命令如代码4.9所示,并且命令需要<span style="color: black;">次序</span>执行。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">代码4.9 配置防火墙的命令</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">#打开端口,8080为Tomcat端口</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">sudo firewall-cmd --add-port=8080/tcp –permanent</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">sudo firewall-cmd --reload #重启防火墙</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">防火墙配置成功后,非本机浏览器便<span style="color: black;">能够</span><span style="color: black;">拜访</span>Tomcat默认网页了,如图4.16所示。其中,192.168.3.54为服务器的IP<span style="color: black;">位置</span>,8080为Tomcat的端口。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/d412a640a5a540eab2dd8320f4e8a0bc~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722653740&amp;x-signature=S07MIBuD8YyrSfmwkD4Vn5%2BHbUo%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">图4.16 非本机浏览器<span style="color: black;">拜访</span>Tomcat默认网页</p>
    </div>
    <h1 style="color: black; text-align: left; margin-bottom: 10px;">本文给<span style="color: black;">大众</span>讲解的内容是大型网站架构的技术细节:后端架构,后端的工作原理,搭建Web应用服务器</h1><strong style="color: blue;">下篇<span style="color: black;">文案</span>给<span style="color: black;">大众</span>讲解的内容是大型网站架构的技术细节:后端架构,后端的工作原理, 构造一个简单的后端应用程序</strong><strong style="color: blue;">觉得<span style="color: black;">文案</span>不错的<span style="color: black;">伴侣</span><span style="color: black;">能够</span>转发此文关注<span style="color: black;">博主</span>;</strong><strong style="color: blue;">感谢<span style="color: black;">大众</span>的支持</strong>




wrjc1hod 发表于 2024-10-8 08:26:12

论坛的成果是显著的,但我们不能因为成绩而沾沾自喜。

nqkk58 发表于 2024-10-9 04:00:35

回顾历史,我们不难发现:无数先辈用鲜血和生命铺就了中华民族复兴的康庄大道。

nykek5i 发表于 2024-11-3 17:52:27

你的见解真是独到,让我受益匪浅。
页: [1]
查看完整版本: 大型网站架构的技术细节:后端的工作原理,搭建Web应用服务器