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)