创建多个Tomcat

tomcat管理界面

链接地址

xxxxx//manager/status 运行状态监控

/manager/html Manger APP

/host-manager/html host-manager (进不去,看资料说得时在webapps下面得contex.xml 中限制了IP得访问)

please examine the file conf/tomcat-users.xml in your installation
For example, to add the manager-gui role to a user named tomcat with a password of s3cret

<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>

重新启动tomcat

安装

先解压安装包

tar xzvf apache-tomcat-9.0.0.M13.tar.gz
mv  xxxx  new name // 修改新名字

tomcat1占用得四个端口

6667 6666 6665 6664

修改端口

%TOMCAT_HOME%/conf/server.xml 是tomcat服务配置文件,里面有很多配置项


<Server port="8005" shutdown="SHUTDOWN">
接受服务器关闭指令的端口号,我们叫关闭指令端口.
<Connector port="8080" protocol="HTTP/1.1" 
              connectionTimeout="20000" 
              redirectPort="8443" />
http请求处理端口,我们在网页上输入的普通url地址包含的端口就是他 .这个端口叫http端口.
 <Connector port="8080" protocol="HTTP/1.1" 
              connectionTimeout="20000" 
               redirectPort="8443" />
https请求的处理端口.这个端口叫https端口.
 
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
接收AJP协议的处理端口.这个端口叫ajp端口.
 <Connector  port="8009" protocol="AJP/1.3" redirectPort="8443" />
https请求的处理端口.

修改全局变量

在/etc/profile.d/新加一个脚本tomcat9_payserver.sh

增加export CATALINA_HOME1=/opt/tomcat9_payserver

然后进入复制的那一份tomcat/bin,打开catalina.sh

在最上面注释下面加入

export CATALINA_HOME=$CATALINA_HOME1

达到替换效果,然后启动即可

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容