Tomcat安装与配置教程

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Tomcat安装教程如果是压缩包就解压一下,如果是.exe文件那么就直接双击开始安装。出现如上界面——next然后IAgree----next端口一般保持默认即可。用户名与密码,可默认也可自行设置,根据自己情况一般设为用户名:admin密码为空即可。设置好然后——next选择jdk安装路径,我得是上图,自己可根据自己的java配置情况自行设置。设置好了——next设置好了选择Install进行安装。如下……安装完成finish。就可看到托盘图标。右击可选择start或stop。如果托盘图标消失则可如下操作面板如下修改编码用notepad++(或者其他文本编辑器)打开安装目录下conf下的server.xml文件修改默认编码;源代码片段:Connectorport=80protocol=HTTP/1.1connectionTimeout=20000;redirectPort=8443/修改后的代码片段:Connectorport=80URIEncoding=UTF-8protocol=HTTP/1.1connectionTimeout=20000;redirectPort=8443/如图完整代码片段:?xmlversion='1.0'encoding='utf-8'?!--LicensedtotheApacheSoftwareFoundation(ASF)underoneormorecontributorlicenseagreements.SeetheNOTICEfiledistributedwiththisworkforadditionalinformationregardingcopyrightownership.TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0(theLicense);youmaynotusethisfileexceptincompliancewiththeLicense.YoumayobtainacopyoftheLicenseat!--Note:AServerisnotitselfaContainer,soyoumaynotdefinesubcomponentssuchasValvesatthislevel.Documentationat/docs/config/server.html--Serverport=8005shutdown=SHUTDOWN!--Securitylistener.Documentationat/docs/config/listeners.htmlListenerclassName=org.apache.catalina.security.SecurityListener/--!--APRlibraryloader.Documentationat/docs/apr.html--ListenerclassName=org.apache.catalina.core.AprLifecycleListenerSSLEngine=on/!--InitializeJasperpriortowebappsareloaded.Documentationat/docs/jasper-howto.html--ListenerclassName=org.apache.catalina.core.JasperListener/!--Preventmemoryleaksduetouseofparticularjava/javaxAPIs--ListenerclassName=org.apache.catalina.core.JreMemoryLeakPreventionListener/ListenerclassName=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ListenerclassName=org.apache.catalina.core.ThreadLocalLeakPreventionListener/!--GlobalJNDIresourcesDocumentationat/docs/jndi-resources-howto.html--GlobalNamingResources!--EditableuserdatabasethatcanalsobeusedbyUserDatabaseRealmtoauthenticateusers--Resourcename=UserDatabaseauth=Containertype=org.apache.catalina.UserDatabasedescription=Userdatabasethatcanbeupdatedandsavedfactory=org.apache.catalina.users.MemoryUserDatabaseFactorypathname=conf/tomcat-users.xml//GlobalNamingResources!--AServiceisacollectionofoneormoreConnectorsthatshareasingleContainerNote:AServiceisnotitselfaContainer,soyoumaynotdefinesubcomponentssuchasValvesatthislevel.Documentationat/docs/config/service.html--Servicename=Catalina!--Theconnectorscanuseasharedexecutor,youcandefineoneormorenamedthreadpools--!--Executorname=tomcatThreadPoolnamePrefix=catalina-exec-maxThreads=150minSpareThreads=4/--!--AConnectorrepresentsanendpointbywhichrequestsarereceivedandresponsesarereturned.Documentationat:JavaHTTPConnector:/docs/config/http.html(blocking&non-blocking)JavaAJPConnector:/docs/config/ajp.htmlAPR(HTTP/AJP)Connector:/docs/apr.htmlDefineanon-SSLHTTP/1.1Connectoronport8080--Connectorport=80URIEncoding=UTF-8protocol=HTTP/1.1connectionTimeout=20000redirectPort=8443/!--AConnectorusingthesharedthreadpool--!--Connectorexecutor=tomcatThreadPoolport=8080protocol=HTTP/1.1connectionTimeout=20000redirectPort=8443/--!--DefineaSSLHTTP/1.1Connectoronport8443ThisconnectorusestheJSSEconfiguration,whenusingAPR,theconnectorshouldbeusingtheOpenSSLstyleconfigurationdescribedintheAPRdocumentation--!--Connectorport=8443protocol=HTTP/1.1SSLEnabled=truemaxThreads=150scheme=httpssecure=trueclientAuth=falsesslProtocol=TLS/--!--DefineanAJP1.3Connectoronport8009--Connectorport=8009protocol=AJP/1.3redirectPort=8443/!--AnEnginerepresentstheentrypoint(withinCatalina)thatprocesseseveryrequest.TheEngineimplementationforTomcatstandaloneanalyzestheHTTPheadersincludedwiththerequest,andpassesthemontotheappropriateHost(virtualhost).Documentationat/docs/config/engine.html--!--YoushouldsetjvmRoutetosupportload-balancingviaAJPie:Enginename=CatalinadefaultHost=localhostjvmRoute=jvm1--Enginename=CatalinadefaultHost=localhost!--Forclustering,pleasetakealookatdocumentationat:/docs/cluster-howto.html(simplehowto)/docs/config/cluster.html(referencedocumentation)--!--ClusterclassName=org.apache.catalina.ha.tcp.SimpleTcpCluster/--!--UsetheLockOutRealmtopreventattemptstoguessuserpasswordsviaabrute-forceattack--RealmclassName=org.apache.catalina.realm.LockOutRealm!--ThisRealmusestheUserDatabaseconfiguredintheglobalJNDIresourcesunderthekeyUserDatabase.AnyeditsthatareperformedagainstthisUserDatabaseareimmediatelyavailableforusebytheRealm.--RealmclassName=org.apache.catalina.realm.UserDatabaseRealmresourceName=UserDatabase//RealmHostname=localhostappBase=webappsunpackWARs=trueautoDeploy=true!--SingleSignOnvalve,shareauthenticationbetweenwebapplicationsDocumentationat:/docs/config/valve.htm

1 / 10
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功