Installing Tomcat under the Centos/linux

Source: Internet
Author: User

1. JDK dependency required when launching Tomcat

If not installed, please go to the JDK installation under the link Centos/linux

2. Download the Tomcat Compression pack from the official website

  

Wget-c http://apache.fayea.com/tomcat/tomcat-7/v7.0.79/bin/apache-tomcat-7.0.79.tar.gz

3. Unzip the Tomcat compression pack

TAR-ZXVF apache-tomcat-7.0.79.tar.gz

To see if the decompression was successful

4. Configure Catalina_home

Behind the

Export catalina_home=/root/dev/apache-tomcat-7.0.79
The Tomcat path after you unzip
vim/etc/profile# last line Insert export catalina_home=/root/dev/apache-tomcat-7.0.79

Then save press ESC and then: WQ

Subsequent execution let the file take effect

Source/etc/profile

5. Configure Tomcat character encoding to UTF-8, solve Chinese garbled problem

Modify the Server.xml file under the Conf folder in the Tomcat installation directory

Add uriencoding= "UTF-8"

Vim $CATALINA _home/conf/server.xml

6. Start Tomcat

Start as startup.sh

Close for stop.sh

CD $CATALINA _home/bin./startup.sh./shutdown.sh

Startup success

Shut down

Appendix:

Configure aliases to quickly start and close Tomcat

Vim/etc/profile

On the last side, add

Alias tomcat_start= $CATALINA _home/bin/startup.shalias tomcat_stop= $CATALINA _home/bin/shutdown.sh

Save after input

Source/etc/profile

command to start: Tomcat_start

Closed command: Tomcat_stop

Installing Tomcat under the Centos/linux

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.