Tomcat General user Deployment Tutorial (production server)

Source: Internet
Author: User

1. Environmental preparedness JDK InstallationUnzip the tar XF tomcat-xx.tar.gz-c/data/soft
Cd/data/soft
Renaming MV Tomcat-xx Tomcat

Tomcat InstallationUnzip the tar XF jdk-xxx.tar.gz-c/data/soft
Cd/data/soft
Renaming the MV jdk-xxx JDK setting environment variables
Vim/etc/profileexport Tomcat_home=/data/soft/tomcatexport Java_home=/data/soft/jdkexport JRE_HOME=/data/soft/jdk/ Jreexport path=.: $JRE _home/bin: $JAVA _home/bin: $TOMCAT _home/bin: $PATH
#保存退出: Wq
#立即生效 (load) source/etc/profile
2. Set permissions (very important)
The WWW directory, the Tomcat directory set the permissions to start the user, or there will be a variety of strange problems. Chown-r tomcat:tomcat www directory chmod-r 755 www directory chown-r tomcat:tomcat $TOMCAT _homechmod-r 755 $TOMCAT _home
3. Configure Server.xmlvim $TOMCAT _home/conf/server.xml
Modify:<connector port= "8989" protocol= "http/1.1 "connectiontimeout= "20000" maxthreads= "redirectport=" 8443 "/> Port: Access W EB Port, default is 8080. Because a normal user cannot start a port within 1024, it can only be started by the root user.

Add in <Host></Host>
    <context docbase= "www directory" path= "" debug= "0"/>

4. Start#配置了环境变量可直接使用, otherwise the full path needs to be knocked $TOMCAT _home/bin/startup.sh
startup.sh5. Closeshutdown.sh
6. Test the Access interface and JSP page to see if it is correct. View Tomcat under Shell to start a non-root user, default is Port 8989. How can I access it via port 80? Keep an eye on the next blog, "Iptables port redirection"



From for notes (Wiz)

Tomcat General user Deployment Tutorial (production server)

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.