centos安装多个tomcat
作者:互联网
1.参考前文安装jdk、第一个tomcat
2.安装第二个tomcat后,修改/etc/profile
vi /etc/profile
#tomcat1
export CATALINA_BASE=/opt/tomcat1
export CATALINA_HOME=/opt/tomcat1
export TOMCAT_HOME=/opt/tomcat1
#tomcat2
export CATALINA_BASE2=/opt/tomcat2
export CATALINA_HOME2=/opt/tomcat2
export TOMCAT_HOME2=/opt/tomcat2
source /etc/profile
3.修改server.xml文件
<Server port="8006" shutdown="SHUTDOWN">
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
4.修改catalina.sh
在 # OS specific support. $var _must_ be set to either true or false. 后添加下列两行代码
export CATALINA_BASE=$CATALINA_BASE2
export CATALINA_HOME=$CATALINA_HOME2
5.启动tomcat
6.多台tomcat以此类推
标签:opt,CATALINA,tomcat,centos,export,tomcat2,tomcat1,安装 来源: https://www.cnblogs.com/tarencez/p/10688072.html