1、创建用户tomcat
useradd tomcat passwd tomcat
2、安装opensdk
yum install -y java-1.7.0-openjdk
3、部署tomcat
mkdir /usr/local/tomcat1 mkdir /usr/local/tomcat2 tar xvf apache-tomcat-7.0.65.tar.gz -C /usr/local/ cp -R /usr/locat/apache-tomcat-7.0.65/* /usr/local/tomcat1 cp -R /usr/locat/apache-tomcat-7.0.65/* /usr/local/tomcat2 chown -R tomcat.tomcat /usr/local/tomcat1 chown -R tomcat.tomcat /usr/local/tomcat2
4、修改tomcat2端口号
su tomcat vim /usr/local/tomcat2/conf/server.xml <Server port="8015" shutdown="SHUTDOWN"> <Connector port="8090" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <Connector port="8019" protocol="AJP/1.3" redirectPort="8443" />
5、启动tomcat
/usr/local/tomcat1/bin/catalina.sh start /usr/local/tomcat2/bin/catalina.sh start
原文地址:http://huhaiqing.blog.51cto.com/6338282/1832499