<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" /> 【tomcat默认的监听端口是8080,现在改成8081】
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />【apache+tomcat模式时访问tomcat的端口】
现在重启tomcat。访问:8081/moni2/【注意:这时就需要修改端口了,嘿嘿。。。】
七。创建tomcat实例
假如我们现在使用的地址是:192..168.55.229,假如我们想在该机器上面创建tomcat实例,但是我们创建实例的脚本在服务器192.168.55.233上面上线,那么我们需要怎么做呢,请看以下步骤:
[root@~]# mount -t nfs 192.168.55.233:/opt/nfs /nfs【挂载目录】
[root@~]# cd /nfs/
[root@]# ls
tcfile
[root@]# cd tcfile/
[root@]# ls
backupfile deployfile instancefile
[root@]# ls
tomcatTemplate tomcatTemplate.zip
[root@]# cd tomcatTemplate
[root@]# ls
bin conf lib LICENSE logs NOTICE RELEASE-NOTES RUNNING.txt temp webapps work
[root@]# cd bin
[root@]# ls
bootstrap.jar commons-daemon.jar createResource.sh resource.properties startup.bat tool-wrapper.sh
c3p0.template commons-daemon-native.tar.gz digest.bat setclasspath.bat startup.sh version.bat
catalina.bat cpappend.bat digest.sh setclasspath.sh tomcat-juli.jar version.sh
catalina.sh createInstance.sh encrypt.bat shutdown.bat tomcat-native.tar.gz
catalina-tasks.xml createInstance.sh.bak encrypt.sh shutdown.sh tool-wrapper.bat
[root@]# sh createInstance.sh tomcatServer229-1【创建实例】
/nfs/tcfile/instancefile/tomcatTemplate
New instance tomcatServer229-1 has successfully builded, and
shutdown.port=10001
ajp.port=8011
http.port=8081
https.port=8041
jmx.port=6901
[root@]# cd /opt/oracle/tomcat/【可以在这个目录下面进行查看】
[root@]# ls
tomcatServer229-1【命名规则,默认都是tomcat名字+-n表示第几个实例;实际上是脚本中规定有格式】
[root@]#