ソースを参照

Match tomcat version to solr

The package solr installs and uses tomcat7.  Installing tomcat8 appears
to be a mistake for Debian Jessie.
Mike Ashley 8年前
コミット
ae6d97a4b6

roles/mailserver/files/etc_tomcat8_server.xml → roles/mailserver/files/etc_tomcat7_server.xml ファイルの表示

@@ -20,7 +20,9 @@
20 20
      Documentation at /docs/config/server.html
21 21
  -->
22 22
 <Server port="8005" shutdown="SHUTDOWN">
23
-
23
+  <!-- Security listener. Documentation at /docs/config/listeners.html
24
+  <Listener className="org.apache.catalina.security.SecurityListener" />
25
+  -->
24 26
   <!--APR library loader. Documentation at /docs/apr.html -->
25 27
   <!--
26 28
   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
@@ -29,9 +31,8 @@
29 31
   <Listener className="org.apache.catalina.core.JasperListener" />
30 32
   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
31 33
   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
32
-  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
33
-  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
34 34
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
35
+  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
35 36
 
36 37
   <!-- Global JNDI resources
37 38
        Documentation at /docs/jndi-resources-howto.html
@@ -68,7 +69,7 @@
68 69
          APR (HTTP/AJP) Connector: /docs/apr.html
69 70
          Define a non-SSL HTTP/1.1 Connector on port 8080
70 71
     -->
71
-    <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"
72
+    <Connector port="8080" protocol="HTTP/1.1"
72 73
                connectionTimeout="20000"
73 74
                URIEncoding="UTF-8"
74 75
                redirectPort="8443" />
@@ -80,12 +81,13 @@
80 81
                redirectPort="8443" />
81 82
     -->
82 83
     <!-- Define a SSL HTTP/1.1 Connector on port 8443
83
-         This connector uses the JSSE configuration, when using APR, the
84
-         connector should be using the OpenSSL style configuration
85
-         described in the APR documentation -->
84
+         This connector uses the BIO implementation that requires the JSSE
85
+         style configuration. When using the APR/native implementation, the
86
+         OpenSSL style configuration is required as described in the APR/native
87
+         documentation -->
86 88
     <!--
87
-    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
88
-               maxThreads="150" scheme="https" secure="true"
89
+    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
90
+               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
89 91
                clientAuth="false" sslProtocol="TLS" />
90 92
     -->
91 93
 
@@ -113,26 +115,19 @@
113 115
       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
114 116
       -->
115 117
 
116
-      <!-- The request dumper valve dumps useful debugging information about
117
-           the request and response data received and sent by Tomcat.
118
-           Documentation at: /docs/config/valve.html -->
119
-      <!--
120
-      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
121
-      -->
122
-
123
-      <!-- This Realm uses the UserDatabase configured in the global JNDI
124
-           resources under the key "UserDatabase".  Any edits
125
-           that are performed against this UserDatabase are immediately
126
-           available for use by the Realm.  -->
127
-      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
128
-             resourceName="UserDatabase"/>
118
+      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
119
+           via a brute-force attack -->
120
+      <Realm className="org.apache.catalina.realm.LockOutRealm">
121
+        <!-- This Realm uses the UserDatabase configured in the global JNDI
122
+             resources under the key "UserDatabase".  Any edits
123
+             that are performed against this UserDatabase are immediately
124
+             available for use by the Realm.  -->
125
+        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
126
+               resourceName="UserDatabase"/>
127
+      </Realm>
129 128
 
130
-      <!-- Define the default virtual host
131
-           Note: XML Schema validation will not work with Xerces 2.2.
132
-       -->
133 129
       <Host name="localhost"  appBase="webapps"
134
-            unpackWARs="true" autoDeploy="true"
135
-            xmlValidation="false" xmlNamespaceAware="false">
130
+            unpackWARs="true" autoDeploy="true">
136 131
 
137 132
         <!-- SingleSignOn valve, share authentication between web applications
138 133
              Documentation at: /docs/config/valve.html -->
@@ -141,11 +136,11 @@
141 136
         -->
142 137
 
143 138
         <!-- Access log processes all example.
144
-             Documentation at: /docs/config/valve.html -->
145
-        <!--
139
+             Documentation at: /docs/config/valve.html
140
+             Note: The pattern used is equivalent to using pattern="common" -->
146 141
         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
147
-               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
148
-        -->
142
+               prefix="localhost_access_log." suffix=".txt"
143
+               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
149 144
 
150 145
       </Host>
151 146
     </Engine>

+ 1
- 1
roles/mailserver/handlers/main.yml ファイルの表示

@@ -8,7 +8,7 @@
8 8
   service: name=opendkim state=restarted
9 9
 
10 10
 - name: restart solr
11
-  service: name=tomcat8 state=restarted
11
+  service: name=tomcat7 state=restarted
12 12
 
13 13
 - name: import sql postfix
14 14
   action: shell PGPASSWORD='{{ mail_db_password }}' psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1

+ 2
- 3
roles/mailserver/tasks/solr.yml ファイルの表示

@@ -2,7 +2,6 @@
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4 4
     - dovecot-solr
5
-    - tomcat8
6 5
     - solr-tomcat
7 6
   tags:
8 7
     - dependencies
@@ -11,7 +10,7 @@
11 10
   copy: src=solr-schema.xml dest=/etc/solr/conf/schema.xml group=root owner=root
12 11
 
13 12
 - name: Copy tweaked Tomcat config file into place
14
-  copy: src=etc_tomcat8_server.xml dest=/etc/tomcat8/server.xml group=tomcat8 owner=root
13
+  copy: src=etc_tomcat7_server.xml dest=/etc/tomcat7/server.xml group=tomcat7 owner=root
15 14
   notify: restart solr
16 15
 
17 16
 - name: Copy tweaked Solr config file into place
@@ -19,5 +18,5 @@
19 18
   notify: restart solr
20 19
 
21 20
 - name: Create Solr index directory
22
-  file: state=directory path=/decrypted/solr group=tomcat8 owner=tomcat8
21
+  file: state=directory path=/decrypted/solr group=tomcat7 owner=tomcat7
23 22
   notify: restart solr

+ 3
- 3
roles/monitoring/files/etc_monit_conf.d_tomcat ファイルの表示

@@ -1,6 +1,6 @@
1
-check process tomcat with pidfile "/var/run/tomcat8.pid"
1
+check process tomcat with pidfile "/var/run/tomcat7.pid"
2 2
   group mail
3
-  start program = "systemctl start tomcat8"
4
-  stop program = "systemctl stop tomcat8"
3
+  start program = "systemctl start tomcat7"
4
+  stop program = "systemctl stop tomcat7"
5 5
   if failed port 8080 then alert
6 6
   if failed port 8080 for 5 cycles then restart

読み込み中…
キャンセル
保存