in theLinuxunder DeploymentJavadeveloped byWebapplications, generally usingTomact+jreEnvironment (You do not needApache), inRHELand theCentOS, you can useYumOnline Automatic installation method installation, the specific operation is as follows:
1 , Basic Environment installation configuration
such as operating system (I use Centos6.3), Network and host basic configuration, etc.
2 , Yum installation Tomcat :
yum-y Install Tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat6-docs-webapp tomcat6-javadoc |
Yum install tomcat automatically installs related software, such as jre environment, etc., so do not need to install separately jre .
3 , Yum Post-Installation Tomcat Catalogue Description:
configuration file directory: /etc/tomcat6
Setup Home directory: /var/lib/tomcat6/
in theCentosUseYumafter installation,Tomcatthe relevant directories have been linked to/usr/share/tomcat6directory that containsWebAppsWait, this is convenient. Configuration Management
[Email protected] tomcat6]# LL/USR/SHARE/TOMCAT6
Total Dosage4
Drwxr-xr-x. 2 root root 4096Month00:44 Bin
lrwxrwxrwx. 1 root TomcatMonth00:44 conf->/etc/tomcat6
lrwxrwxrwx. 1 root rootMonth00:44 Lib->/usr/share/java/tomcat6
lrwxrwxrwx. 1 root rootMonth00:44 Logs->/var/log/tomcat6
lrwxrwxrwx. 1 root rootMonth00:44 Temp->/var/cache/tomcat6/temp
lrwxrwxrwx. 1 root rootMonth00:44 WebApps->/var/lib/tomcat6/webapps
lrwxrwxrwx. 1 root rootMonth00:44 Work->/var/cache/tomcat6/work
4, modify Port8080to be the:
need thePort is not occupied, you can useNetstat-natView thewhether the port is in use.
a)ModifyVi/etc/tomcat6/server.xmlin the following fields of the file8080to be the
<connector port= " 8080 " protocol=" http/1.1 "
connectiontimeout= "20000"
redirectport= "8443"/>
b ) because in centos6 tomcat The user uses 1024 vi /etc/tomcat6/ tomcat6.conf
Find connector_port= "8080" and comment out, add the following two lines:
Tomcat_user= "Root"
connector_port= "80"
Note: This security remains to be verified
c) Restart the Tomcat service using the command service tomcat6 restart. Later access to the page can only need to enter the IP or host name, and no longer need to add port number.
This article is from "Liu June Linux" blog, please be sure to keep this source http://bluefei.blog.51cto.com/3921428/1768780
Yum installs Tomcat 6 in CentOS