zoukankan      html  css  js  c++  java
  • Windows系统下面同时起两个服务

    有个需求需要同时在一个机子上面起两个服务。操作如下:

    (1)  需要把页面中涉及的端口改成和另一个Server不一致的服务,这样就可以了。

    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8085" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
      <Listener className="org.apache.catalina.core.JasperListener" />
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

      <GlobalNamingResources>
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
      </GlobalNamingResources>

      <Service name="Catalina">
        <Connector port="8099" protocol="HTTP/1.1"
                   connectionTimeout="20000"  maxPostSize="16777216"
                   redirectPort="8483" />
        <Connector port="8089" protocol="AJP/1.3" redirectPort="8483" />

        <Engine name="Catalina" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase"/>

          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
            
          </Host>
        </Engine>
      </Service>
    </Server>

    (2)

    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8086" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
      <Listener className="org.apache.catalina.core.JasperListener" />
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

      <GlobalNamingResources>
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
      </GlobalNamingResources>

      <Service name="Catalina">
        <Connector port="9001" protocol="HTTP/1.1"
                   connectionTimeout="20000"  maxPostSize="16777216"
                   redirectPort="8484" />
        <Connector port="9002" protocol="AJP/1.3" redirectPort="8484" />

        <Engine name="Catalina" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase"/>

          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
            
          </Host>
        </Engine>
      </Service>
    </Server>

  • 相关阅读:
    系统组件:动作条ActionBar
    Android Studio 常用快捷键汇总
    Android第三方服务(1):语音识别(1)
    Android数据存储(4):SQLite Database
    Android数据存储(3):External Storage
    Android数据存储(2):Internal Storage
    Android数据存储(1):SharedPreferences
    Android网络通信框架Volley总结
    LeetCode刷题记录
    【hard】282. Expression Add Operators
  • 原文地址:https://www.cnblogs.com/zhangzhifeng/p/2279378.html
Copyright © 2011-2022 走看看