日期:2014-05-16  浏览次数:20635 次

linux上安装tomcat
#安装tomcat
$ tar xzf apache-tomcat-7.0.35.tar.gz
$ mkdir /usr/local/tomcat7
$ cp -r apache-tomcat-7.0.35/* /usr/local/tomcat7
$ cd /usr/local/tomcat7/bin
$ vi catalina.sh
 # 设置jvm内存,在cygwin=false加上下面这句话	
 JAVA_OPTS="-Xms512m -Xmx1024m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m" 
$ cd ../conf
$ vi server.xml
	#设置服务端口号和编码方式,端口号改成了80,增加URIEncoding="UTF-8",以支持中文 
	<Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000" maxThreads="1000" minSpareThreads="25" 
               redirectPort="8443" URIEncoding="UTF-8"/>
$ cd ../bin
# 启动tomcat
$ ./startup.sh
?

?