Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:adm:czechidm_installation_win [2021/12/03 16:18]
urbanl [Change Tomat logging properties]
tutorial:adm:czechidm_installation_win [2021/12/14 08:53] (current)
fiserp [Configure environment properties. Select application profile]
Line 30: Line 30:
  
    * Add ''C:\CzechIdM\etc;C:\CzechIdM\lib;C:\CzechIdM\lib<nowiki>\*</nowiki>;''  to the **beginning of the**''CLASSPATH''. If you followed the [[.:server_preparation_win|]] guide, this should already be in place.    * Add ''C:\CzechIdM\etc;C:\CzechIdM\lib;C:\CzechIdM\lib<nowiki>\*</nowiki>;''  to the **beginning of the**''CLASSPATH''. If you followed the [[.:server_preparation_win|]] guide, this should already be in place.
-  * Add ''-Dspring.profiles.active=production''  to the ''Java options''.+  * Add ''-Dspring.profiles.active=production'' and ''-Dlog4j2.formatMsgNoLookups=true''  to the ''Java options''.
   * Add ''-Djava.security.egd=file:/dev/urandom''  to the ''Java options''.   * Add ''-Djava.security.egd=file:/dev/urandom''  to the ''Java options''.
- 
-===== Change Tomat logging properties ===== 
- 
-In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . 
- 
-Make these changes in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties'': Comment out console handler. We don't want tomcat to log to stdout or stderr. 
-<code> 
-handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler 
-#handlers =  java.util.logging.ConsoleHandler 
- 
-.handlers = 1catalina.org.apache.juli.AsyncFileHandler 
-#.handlers = java.util.logging.ConsoleHandler, 
- 
-#java.util.logging.ConsoleHandler.level = FINE 
-#java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter 
- 
-</code> 
- 
-In 1catalina file handler change log level to "INFO" and prefix from "catalina" to "tomcat". Also set property rotable to "false". Tomcat write to this file only when starting or shutting down. 
- 
-<code> 
-#1catalina.org.apache.juli.AsyncFileHandler.level = FINE 
-#1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. 
-1catalina.org.apache.juli.AsyncFileHandler.level = INFO 
-1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 
-1catalina.org.apache.juli.AsyncFileHandler.prefix = tomcat 
-1catalina.org.apache.juli.AsyncFileHandler.rotatable = false 
-1catalina.org.apache.juli.AsyncFileHandler.suffix = .log 
- 
-</code> 
- 
-====   ==== 
  
  
Line 112: Line 80:
 ==== Create CzechIdM configuration ==== ==== Create CzechIdM configuration ====
  
-Now we will create configuration files the CzechIdM will use. <note>Code snippets in this chapter can be **mostly**  copy-pasted or (but please read through whole chapter to be aware of setting you have to adjust). Configuring the CzechIdM is about altering four or five lines altogether.</note>+Now we will create configuration files the CzechIdM will use. <note>Code snippets in this chapter can be **mostly** copy-pasted or (but please read through whole chapter to be aware of setting you have to adjust). Configuring the CzechIdM is about altering four or five lines altogether.</note>
  
-  * The **C:\CzechIdM\etc\secret.key**  is a file with confidential storage secret key. This key has to have 128 bit (= 16 bytes). Creation of the **secret.key**  is a bit tricky (because Windows). Open the Git Bash, run the **vim**  editor and type the key into the file. Then check its format.+   * The **C:\CzechIdM\etc\secret.key**  is a file with confidential storage secret key. This key has to have 128 bit (= 16 bytes). Creation of the **secret.key**  is a bit tricky (because Windows). Open the Git Bash, run the **vim**  editor and type the key into the file. Then check its format.
  
 <code> <code>
Line 147: Line 115:
 org.quartz.jobStore.misfireThreshold=60000 org.quartz.jobStore.misfireThreshold=60000
 org.quartz.jobStore.tablePrefix=qrtz_ org.quartz.jobStore.tablePrefix=qrtz_
 +
  
 </file> </file>
Line 204: Line 173:
                                 </pattern>                                 </pattern>
                         </encoder>                         </encoder>
-                        <file>logs/catalina.log +                        <file> 
-</file>+                                logs/catalina.log 
 +                        </file>
                         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">                         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
                                 <fileNamePattern>logs/catalina.%d{yyyy-MM-dd}.log</fileNamePattern>                                 <fileNamePattern>logs/catalina.%d{yyyy-MM-dd}.log</fileNamePattern>
Line 216: Line 186:
         </springProfile>         </springProfile>
 </configuration> </configuration>
 +
  
 </code> </code>
Line 282: Line 253:
 spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
 spring.servlet.multipart.max-request-size=100MB spring.servlet.multipart.max-request-size=100MB
 +
  
 </file> </file>
Line 296: Line 268:
 spring.datasource.validationQuery=SELECT 1 spring.datasource.validationQuery=SELECT 1
 spring.datasource.test-on-borrow=true spring.datasource.test-on-borrow=true
 +
  
 </code> </code>
Line 307: Line 280:
 # We recommend the VALUE to be at least 25. # We recommend the VALUE to be at least 25.
 idm.sec.security.jwt.secret.token=********** TODO ********* idm.sec.security.jwt.secret.token=********** TODO *********
 +
  
 </code> </code>
Line 334: Line 308:
 # System.getProperty("user.home")/idm_data will be used if no path is given # System.getProperty("user.home")/idm_data will be used if no path is given
 idm.sec.core.attachment.storagePath=c:/czechidm/data idm.sec.core.attachment.storagePath=c:/czechidm/data
 +
  
 </code> </code>
Line 344: Line 319:
 # Application stage (development, test, production (default)) # Application stage (development, test, production (default))
 idm.pub.app.stage=production idm.pub.app.stage=production
 +
  
 </code> </code>
 +
  
 ==== Deploy the CzechIdM ==== ==== Deploy the CzechIdM ====
  • by urbanl