服务器部署-以cms_api_8098为例

2018-08-08  本文已影响0人  superxcp

假设你已经在linux环境下安装了tomcat
0.先把war包解压成我们配置文件中的工程名,与xml文件中docBase配置的文件名一致

1.在tomcat/bin下克隆cms_api.sh --->cms_api_8098.sh
vim cms_api_8098.sh

下面就要开始配properties文件和xml文件,在tomcat的conf里面
2.cp cms_api.properties --->cms_api_8098.properties,不用改动
3.cp cms_api.xml --->cms_api_8098.xml,

<?xml version="1.0" encoding="utf-8"?>
<Server port="9058" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="off" />
  <!--Listener className="org.apache.catalina.core.JasperListener" /-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <Service name="Catalina">
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="1000" minSpareThreads="1"/>
    <Connector executor="tomcatThreadPool" port="8098" protocol="org.apache.coyote.http11.Http11AprProtocol"  maxHttpHeaderSize="8192" useBodyEncodingForURI="true" acceptCount="1000" enableLookups="false" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
    <Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost"  appBase="webapps" unpackWARs="false" autoDeploy="false">
      <Context path="/" docBase="/data/wwwroot/nubia_cms_api_8098" reloadable="false" crossContext="false" privileged="true" workDir="work/nubia_cms_api_8098"/>
            <!--Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="10\..*" /-->
      </Host>
    </Engine>
  </Service>
</Server>

4.把jmeter拷贝进去(linux和window可能不同,也可能受版本影响)
然后把脚本考进去,比如一点资讯.jmx,运行jmeter下的bin下的jmeter
./jmeter -n -t 一点资讯.jmx
就OK了!

上一篇下一篇

猜你喜欢

热点阅读