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

linux中安装tomcat
#安装tomcat
$ tar xvfz apache-tomcat-7.0.32.tar.gz
$ mkdir /usr/local/tomcat7
$ cp -r apache-tomcat-7.0.32/* /usr/local/tomcat7
$ cd /usr/local/tomcat7/bin
$ vi catalina.sh
 # 设置jvm内存,在cygwin=false加上下面这句话	
 JAVA_OPTS="-Xms256m -Xmx512m -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"
               redirectPort="8443" URIEncoding="UTF-8"/>
$ cd ../bin
# 启动tomcat
$ ./startup.sh