Tomcat Linux Installation

Source: Internet
Author: User

Tomcat relies on the JDK package, so the JDK is configured first.

After the configuration is complete, unzip the downloaded Tomcat to/usr/local


TAR-XVF apache-tomcat-7.0.70.tar.gz-c/usr/local

Configuring Environment variables

Edit vim/etc/profile.d/tomcat.sh

Add two lines:

Export Catalina_home=/usr/local/apache-tomcat-7.0.70export path= $PATH: $CATALINA _home/bin

Let the system read the configuration file

source/etc/profile.d/tomcat.sh

Then test to see if the installation was successful:

catalina.sh version

The Start command is:
catalina.sh start

Can be used after startup
JPs

command to view


###################################################################################################

Note that in the/etc/hosts file, there is a problem with the 127.0.0.1 line, otherwise the startup fails, such as the following error in the log

Finally causes the process to close
Java.net.BindException:Cannot Assign requested Address
At Java.net.PlainSocketImpl.socketBind (Native Method)
At Java.net.PlainSocketImpl.bind (plainsocketimpl.java:383)
At Java.net.ServerSocket.bind (serversocket.java:328)
At Java.net.serversocket.<init> (serversocket.java:194)
At Org.apache.catalina.core.StandardServer.await (standardserver.java:444)
At Org.apache.catalina.startup.Catalina.await (catalina.java:781)
At Org.apache.catalina.startup.Catalina.start (catalina.java:727)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.apache.catalina.startup.Bootstrap.start (bootstrap.java:294)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:428)
2:43:08 AM Org.apache.coyote.AbstractProtocol Pause
Info:pausing Protocolhandler ["http-bio-8080"]
2:43:10 AM Org.apache.coyote.AbstractProtocol Pause
Info:pausing Protocolhandler ["ajp-bio-8009"]
2:43:12 AM Org.apache.catalina.core.StandardService stopinternal
Info:stopping Service Catalina
2:43:12 AM Org.apache.coyote.AbstractProtocol Stop
Info:stopping Protocolhandler ["http-bio-8080"]
2:43:14 AM Org.apache.coyote.AbstractProtocol Stop
Info:stopping Protocolhandler ["ajp-bio-8009"]
2:43:16 AM Org.apache.coyote.AbstractProtocol Destroy
Info:destroying Protocolhandler ["http-bio-8080"]

Tomcat Linux Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.