日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Tomcat怎么安裝
Tomcat的安裝步驟如下:首先確認(rèn)自己是否已經(jīng)安裝JDK,然后下載安裝Tomcat,接著Tomcat配置環(huán)境變量,最后驗(yàn)證Tomcat配置是否成功 。

Tomcat簡介

Tomcat(Apache Tomcat,簡稱TC)是一個(gè)開源的Web應(yīng)用服務(wù)器,它是Java Servlet和JavaServer Pages(JSP)技術(shù)的實(shí)現(xiàn)者,實(shí)現(xiàn)了對(duì)Servlet和JSP的支持,并提供了作為Web服務(wù)器的一些特性,如處理HTML文件,Tomcat采用MVC設(shè)計(jì)模式,可以處理動(dòng)態(tài)網(wǎng)頁,是一種非常流行的Web服務(wù)器軟件。

成都創(chuàng)新互聯(lián)是一家專業(yè)提供防城港企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站H5技術(shù)、小程序制作等業(yè)務(wù)。10年已為防城港眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站建設(shè)公司優(yōu)惠進(jìn)行中。

安裝前的準(zhǔn)備工作

在安裝Tomcat之前,需要確保已經(jīng)安裝了以下軟件:

1、Java Development Kit(JDK):Tomcat是基于Java開發(fā)的,因此需要先安裝JDK,建議安裝JDK 8或更高版本。

2、Apache Maven:Maven是一個(gè)項(xiàng)目管理工具,可以幫助我們管理項(xiàng)目的依賴和構(gòu)建過程,雖然不是必須的,但建議安裝。

3、MySQL數(shù)據(jù)庫:Tomcat需要一個(gè)數(shù)據(jù)庫來存儲(chǔ)配置信息和會(huì)話數(shù)據(jù),推薦使用MySQL數(shù)據(jù)庫。

安裝步驟

以Windows系統(tǒng)為例,介紹如何安裝Tomcat。

1、下載Tomcat安裝包

訪問Tomcat官網(wǎng)(https://tomcat.apache.org/),選擇合適的版本進(jìn)行下載,下載完成后,解壓縮到一個(gè)目錄中,C:tomcat。

2、配置環(huán)境變量

為了方便使用Tomcat命令行工具,需要配置環(huán)境變量,按照以下步驟操作:

在“計(jì)算機(jī)”->“屬性”->“高級(jí)系統(tǒng)設(shè)置”->“環(huán)境變量”中,新建一個(gè)名為“CATALINA_HOME”的系統(tǒng)變量,值設(shè)置為Tomcat解壓后的目錄,C:tomcat。

在“計(jì)算機(jī)”->“屬性”->“高級(jí)系統(tǒng)設(shè)置”->“環(huán)境變量”中,找到“Path”變量,點(diǎn)擊“編輯”,在變量值的最后添加“;%CATALINA_HOME%bin”。

3、安裝MySQL數(shù)據(jù)庫

訪問MySQL官網(wǎng)(https://www.mysql.com/),下載合適的版本進(jìn)行安裝,安裝完成后,啟動(dòng)MySQL服務(wù)。

4、修改MySQL配置文件

打開MySQL安裝目錄下的my.ini文件,找到[mysqld]部分,添加以下內(nèi)容:

skip-networking=false
bind-address=127.0.0.1

保存文件并重啟MySQL服務(wù)。

5、創(chuàng)建數(shù)據(jù)庫和用戶

登錄MySQL,執(zhí)行以下命令創(chuàng)建一個(gè)名為“tomcat”的數(shù)據(jù)庫,并授權(quán)給一個(gè)用戶:

CREATE DATABASE tomcat;
GRANT ALL PRIVILEGES ON tomcat.* TO 'root'@'localhost' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES;

6、下載并解壓Tomcat安裝包中的“webapps”文件夾到Tomcat的“webapps”目錄下,這個(gè)文件夾包含了一些示例應(yīng)用程序,可以直接運(yùn)行,如果需要部署自己的應(yīng)用程序,可以將應(yīng)用程序打包成WAR文件,然后將其放到“webapps”目錄下。

7、啟動(dòng)Tomcat

打開命令提示符,切換到Tomcat的“bin”目錄下,執(zhí)行以下命令啟動(dòng)Tomcat:

startup.bat

如果看到類似如下的輸出,表示Tomcat已成功啟動(dòng):

Using CATALINA_BASE: C:tomcat
Using CATALINA_HOME: C:tomcat
Using CATALINA_TMPDIR: C:Usersyour_usernameAppDataLocalTemptomcat9440204002963843286web1144093561099186tmpdir
Using JRE_HOME: C:Program FilesJavajdk1.8.0_281jre
Starting Tomcat v9.0.50 on Windows NT (6.1.7601) version 10.0.1776. SP1 (Build 14393: KB4557265) with patch H28D8A06 for Windows XP Service Pack 3 (http://tomcat.apache.org/whichversion.html). Web application deployed as "/" using DefaultWebApplicationDescriptor provided by Tomcat at "C:tomcatconfweb.xml" with context root "/". Tomcat initialized with base URL '' and dynamic resource manager '' in APR/Native mode. The server default host is "localhost", and the server IP address is "127.0.0.1". The server is running in the UNIX domain [127.0.0.1]. The server was started at 23/03/2022 15:56:58 GMT by "root" with admin privileges via command line interface. Server version: Apache Tomcat/9.0.50 (Win64). Server built: Jun 29 2020 18:54 UTC, 2 months ago. Server number: 1 (based on list of configured servers with server().info()). Undertow HTTP/1.1 server [id=default-server]: Undertow configured for a throughput rate of 2048 requests/second(tps) and a maximum of 512 thread workers. Main buffer size is not configured explicitly;默認(rèn)buffer size is defined dynamically. Using native worker implementation. Access log files are stored in "logs" directory. Default access log formats are "common" and "combined" including date/time information and tracking ID if available. Access log path is "logs" directory under "work" directory (current value is "C:tomcatlogs"). Using custom protocol to listen on port [::]:8080 instead of the default ["http"]. A request received on main thread [id=main, queue=main-event-queue] (http/1.1 [::1]) for first attempt to serve response for [/]. The request sent successfully back to the client browser, fulfilling the request of getting the information on this website. This will be the initial response sent to any GET requests made by the browser after this point in time (if any). The web application loaded within one second was [file:///C:/Users/your_username/Downloads/ROOT-INF/classes/org/apache/catalina/core/StandardContext.__context__], located at URL [http://localhost:8080/ROOT-INF/classes/org/apache/catalina/core/StandardContext.__context__]. Tomcat detected an additional resource blocking configuration '/ROOT-INF' which must be added to the list of resources allowed for protection against Cross Site Scripting attacks (see http://tomcat.apache.org/tomcat-7.0-doc/config/valves.htmlXMLValve). Tomcat encountered an error processing your request while trying to serve static content from the following location(s): [file:///C:/Users/your_username/Downloads/ROOT-INF/classes/org/apache/catalina/core/StandardContext.__context__]. An exception was thrown (Access Denied): org.apache.jasper.JasperException: java.lang.IllegalArgumentException: StandardContext XML declaration missing or malformed at line 36 in file: C:Usersyour_usernameDownloadsROOT-INFclassesorgapachecatalinacoreStandardContext.__context__ Line36 column95 Start tag open seen at column95 but not closed at line36 Unmatched end tag "". Total time taken for initialization is 3 seconds (JVM running for 7 seconds). Time taken for shutdown is 0 seconds (JVM shutting down). Any help would be greatly appreciated! Thank you very much!

分享題目:Tomcat怎么安裝
標(biāo)題URL:http://www.5511xx.com/article/cceciic.html