Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.93 KB | None | 0 0
  1. JAVA_HOME=/usr/lib/jvm/java-8-oracle
  2. JAVA_ENDORSED_DIRS=/usr/local/share/tomcat-endorsed
  3.  
  4. CATALINA_HOME="/usr/local/tomcat"
  5. CATALINA_BASE="/opt/cms/tomcat"
  6. CATALINA_PID="${CATALINA_BASE}/work/catalina.pid"
  7.  
  8. CLUSTER_ID="$(whoami)-$(hostname -f)"
  9.  
  10. MAX_HEAP=512
  11. MIN_HEAP=256
  12.  
  13. REP_OPTS="-Drepo.bootstrap=true -Drepo.path=/opt/cms/repository -Drepo.config=file:${CATALINA_BASE}/conf/repository.xml"
  14. JVM_OPTS="-server -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:+UseG1GC -Djava.util.Arrays.useLegacyMergeSort=true"
  15. DMP_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/cms/heapdumps"
  16. RMI_OPTS="-Djava.rmi.server.hostname=127.0.0.1"
  17. JRC_OPTS="-Dorg.apache.jackrabbit.core.cluster.node_id=${CLUSTER_ID}"
  18. L4J_OPTS="-Dlog4j.configuration=file:${CATALINA_BASE}/conf/log4j.xml"
  19.  
  20. CATALINA_OPTS="${JVM_OPTS} ${REP_OPTS} ${DMP_OPTS} ${RMI_OPTS} ${L4J_OPTS} ${JRC_OPTS}"
  21.  
  22. export JAVA_HOME CATALINA_HOME CATALINA_BASE
  23.  
  24. <?xml version="1.0" encoding="UTF-8"?>
  25.  
  26. <!DOCTYPE Repository
  27.           PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.6//EN"
  28.           "http://jackrabbit.apache.org/dtd/repository-2.6.dtd">
  29.  
  30. <Repository>
  31.  
  32.   <DataSources>
  33.     <DataSource name="repositoryDS">
  34.       <param name="driver" value="javax.naming.InitialContext"/>
  35.       <param name="url" value="java:comp/env/jdbc/repositoryDS"/>
  36.       <param name="databaseType" value="mysql"/>
  37.     </DataSource>
  38.   </DataSources>
  39.  
  40.   <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
  41.     <param name="dataSourceName" value="repositoryDS"/>
  42.     <param name="schemaObjectPrefix" value="repository_"/>
  43.   </FileSystem>
  44.  
  45.   <Security appName="Jackrabbit">
  46.     <SecurityManager class="org.hippoecm.repository.security.SecurityManager"/>
  47.     <AccessManager class="org.hippoecm.repository.security.HippoAccessManager"/>
  48.     <LoginModule class="org.hippoecm.repository.security.HippoLoginModule"/>
  49.   </Security>
  50.  
  51.   <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
  52.  
  53.   <Workspace name="${wsp.name}">
  54.     <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
  55.       <param name="dataSourceName" value="repositoryDS"/>
  56.       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
  57.     </FileSystem>
  58.  
  59.     <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
  60.       <param name="dataSourceName" value="repositoryDS"/>
  61.       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
  62.       <param name="externalBLOBs" value="true"/>
  63.       <param name="consistencyCheck" value="false"/>
  64.       <param name="consistencyFix" value="false"/>
  65.       <param name="bundleCacheSize" value="64"/>
  66.     </PersistenceManager>
  67.  
  68.     <SearchIndex class="org.hippoecm.repository.FacetedNavigationEngineImpl">
  69.       <param name="indexingConfiguration" value="indexing_configuration.xml"/>
  70.       <param name="indexingConfigurationClass" value="org.hippoecm.repository.query.lucene.ServicingIndexingConfigurationImpl"/>
  71.       <param name="path" value="${wsp.home}/index"/>
  72.       <param name="useSimpleFSDirectory" value="true"/>
  73.       <param name="useCompoundFile" value="true"/>
  74.       <param name="minMergeDocs" value="100"/>
  75.       <param name="volatileIdleTime" value="10"/>
  76.       <param name="maxMergeDocs" value="100000"/>
  77.       <param name="mergeFactor" value="5"/>
  78.       <param name="maxFieldLength" value="10000"/>
  79.       <param name="bufferSize" value="1000"/>
  80.       <param name="cacheSize" value="1000"/>
  81.       <param name="onWorkspaceInconsistency" value="log"/>
  82.       <param name="forceConsistencyCheck" value="false"/>
  83.       <param name="enableConsistencyCheck" value="false"/>
  84.       <param name="autoRepair" value="true"/>
  85.       <param name="analyzer" value="org.hippoecm.repository.query.lucene.StandardHippoAnalyzer"/>
  86.       <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl"/>
  87.       <param name="respectDocumentOrder" value="false"/>
  88.       <param name="resultFetchSize" value="1000"/>
  89.       <param name="extractorTimeout" value="100"/>
  90.       <param name="extractorBackLogSize" value="100"/>
  91.       <param name="excerptProviderClass" value="org.apache.jackrabbit.core.query.lucene.DefaultHTMLExcerpt"/>
  92.       <param name="supportSimilarityOnStrings" value="true"/>
  93.       <param name="supportSimilarityOnBinaries" value="false"/>
  94.     </SearchIndex>
  95.  
  96.     <ISMLocking class="org.apache.jackrabbit.core.state.FineGrainedISMLocking"/>
  97.   </Workspace>
  98.  
  99.   <Versioning rootPath="${rep.home}/version">
  100.     <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
  101.       <param name="dataSourceName" value="repositoryDS"/>
  102.       <param name="schemaObjectPrefix" value="version_"/>
  103.     </FileSystem>
  104.  
  105.     <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
  106.       <param name="dataSourceName" value="repositoryDS"/>
  107.       <param name="schemaObjectPrefix" value="version_"/>
  108.       <param name="externalBLOBs" value="true"/>
  109.       <param name="consistencyCheck" value="false"/>
  110.       <param name="consistencyFix" value="false"/>
  111.     </PersistenceManager>
  112.  
  113.     <ISMLocking class="org.apache.jackrabbit.core.state.FineGrainedISMLocking"/>
  114.   </Versioning>
  115.  
  116.   <Cluster>
  117.     <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
  118.       <param name="dataSourceName" value="repositoryDS"/>
  119.       <param name="databaseType" value="mysql"/>
  120.       <param name="schemaObjectPrefix" value="repository_"/>
  121.       <param name="revision" value="${rep.home}/revision.log"/>
  122.     </Journal>
  123.   </Cluster>
  124.  
  125.   <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
  126.     <param name="dataSourceName" value="repositoryDS"/>
  127.     <param name="minRecordLength" value="1024"/>
  128.     <param name="maxConnections" value="5"/>
  129.     <param name="copyWhenReading" value="true"/>
  130.   </DataStore>
  131.  
  132. </Repository>
  133.  
  134. <?xml version='1.0' encoding='utf-8'?>
  135. <!--
  136. Licensed to the Apache Software Foundation (ASF) under one or more
  137. contributor license agreements. See the NOTICE file distributed with
  138. this work for additional information regarding copyright ownership.
  139. The ASF licenses this file to You under the Apache License, Version 2.0
  140. (the "License"); you may not use this file except in compliance with
  141. the License. You may obtain a copy of the License at
  142.  
  143. http://www.apache.org/licenses/LICENSE-2.0
  144.  
  145. Unless required by applicable law or agreed to in writing, software
  146. distributed under the License is distributed on an "AS IS" BASIS,
  147. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  148. See the License for the specific language governing permissions and
  149. limitations under the License.
  150. -->
  151. <!-- Note: A "Server" is not itself a "Container", so you may not
  152. define subcomponents such as "Valves" at this level.
  153. Documentation at /docs/config/server.html
  154. -->
  155. <Server port="8005" shutdown="SHUTDOWN">
  156. <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  157. <!-- Security listener. Documentation at /docs/config/listeners.html
  158. <Listener className="org.apache.catalina.security.SecurityListener" />
  159. -->
  160. <!--APR library loader. Documentation at /docs/apr.html -->
  161. <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  162. <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  163. <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  164. <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  165. <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  166.  
  167. <!-- Global JNDI resources
  168. Documentation at /docs/jndi-resources-howto.html
  169. -->
  170. <GlobalNamingResources>
  171. <!-- Editable user database that can also be used by
  172. UserDatabaseRealm to authenticate users
  173. -->
  174. <Resource name="UserDatabase" auth="Container"
  175. type="org.apache.catalina.UserDatabase"
  176. description="User database that can be updated and saved"
  177. factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
  178. pathname="conf/tomcat-users.xml" />
  179.  
  180. <Resource
  181. name="jdbc/repositoryDS" auth="Container" type="javax.sql.DataSource"
  182. maxTotal="20" maxIdle="10" initialSize="2" maxWaitMillis="10000"
  183. testWhileIdle="true" testOnBorrow="false" validationQuery="SELECT 1"
  184. timeBetweenEvictionRunsMillis="10000"
  185. minEvictableIdleTimeMillis="60000"
  186. username="root" password="mysql"
  187. driverClassName="com.mysql.jdbc.Driver"
  188. url="jdbc:mysql://localhost:3306/examotive?characterEncoding=utf8"/>
  189.  
  190. </GlobalNamingResources>
  191.  
  192. <!-- A "Service" is a collection of one or more "Connectors" that share
  193. a single "Container" Note: A "Service" is not itself a "Container",
  194. so you may not define subcomponents such as "Valves" at this level.
  195. Documentation at /docs/config/service.html
  196. -->
  197. <Service name="Catalina">
  198.  
  199. <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  200. <!--
  201. <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  202. maxThreads="150" minSpareThreads="4"/>
  203. -->
  204.  
  205.  
  206. <!-- A "Connector" represents an endpoint by which requests are received
  207. and responses are returned. Documentation at :
  208. Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
  209. Java AJP Connector: /docs/config/ajp.html
  210. APR (HTTP/AJP) Connector: /docs/apr.html
  211. Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
  212. -->
  213. <Connector port="8080" protocol="HTTP/1.1"
  214. connectionTimeout="20000"
  215. redirectPort="8443" />
  216. <!-- A "Connector" using the shared thread pool-->
  217. <!--
  218. <Connector executor="tomcatThreadPool"
  219. port="8080" protocol="HTTP/1.1"
  220. connectionTimeout="20000"
  221. redirectPort="8443" />
  222. -->
  223. <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
  224. This connector uses the NIO implementation that requires the JSSE
  225. style configuration. When using the APR/native implementation, the
  226. OpenSSL style configuration is required as described in the APR/native
  227. documentation -->
  228. <!--
  229. <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
  230. maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
  231. clientAuth="false" sslProtocol="TLS" />
  232. -->
  233.  
  234. <!-- Define an AJP 1.3 Connector on port 8009 -->
  235. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  236.  
  237.  
  238. <!-- An Engine represents the entry point (within Catalina) that processes
  239. every request. The Engine implementation for Tomcat stand alone
  240. analyzes the HTTP headers included with the request, and passes them
  241. on to the appropriate Host (virtual host).
  242. Documentation at /docs/config/engine.html -->
  243.  
  244. <!-- You should set jvmRoute to support load-balancing via AJP ie :
  245. <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
  246. -->
  247. <Engine name="Catalina" defaultHost="localhost">
  248.  
  249. <!--For clustering, please take a look at documentation at:
  250. /docs/cluster-howto.html (simple how to)
  251. /docs/config/cluster.html (reference documentation) -->
  252. <!--
  253. <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  254. -->
  255.  
  256. <!-- Use the LockOutRealm to prevent attempts to guess user passwords
  257. via a brute-force attack -->
  258. <Realm className="org.apache.catalina.realm.LockOutRealm">
  259. <!-- This Realm uses the UserDatabase configured in the global JNDI
  260. resources under the key "UserDatabase". Any edits
  261. that are performed against this UserDatabase are immediately
  262. available for use by the Realm. -->
  263. <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
  264. resourceName="UserDatabase"/>
  265. </Realm>
  266.  
  267. <Host name="localhost" appBase="webapps"
  268. unpackWARs="true" autoDeploy="true">
  269.  
  270. <!-- SingleSignOn valve, share authentication between web applications
  271. Documentation at: /docs/config/valve.html -->
  272. <!--
  273. <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  274. -->
  275.  
  276. <!-- Access log processes all example.
  277. Documentation at: /docs/config/valve.html
  278. Note: The pattern used is equivalent to using pattern="common" -->
  279. <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
  280. prefix="localhost_access_log" suffix=".txt"
  281. pattern="%h %l %u %t "%r" %s %b" />
  282.  
  283. </Host>
  284. </Engine>
  285. </Service>
  286. </Server>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement