Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
tutorial:adm:server_preparation_win [2021/12/10 17:04] urbanl [Change Tomat logging properties] |
tutorial:adm:server_preparation_win [2024/01/10 10:38] (current) koulaj [Java] |
<note>If you install the database onto a server distinct from the one on which the CzechIdM application itself (Tomcat etc.) is deployed, don't forget to configure PostgreSQL to allow remote SSL connection from that server.</note> | <note>If you install the database onto a server distinct from the one on which the CzechIdM application itself (Tomcat etc.) is deployed, don't forget to configure PostgreSQL to allow remote SSL connection from that server.</note> |
===== Java ===== | ===== Java ===== |
Install the openjdk (preferred version is 11.0.2). You can download it from [[https://jdk.java.net/archive/|here]]. Be sure to download the **JDK**, and not only **JRE**. | |
| |
| Install the openjdk (preferred version is 11.0.2, for CzechIdm 13.1.0+ Java 21 is needed). You can download it from [[https://jdk.java.net/archive/|here]]. Be sure to download the **JDK**, and not only **JRE**. |
=== OpenJDK Installation === | === OpenJDK Installation === |
| |
Crete directory ''C:\Program Files\Java\'' and extract there downloaded zip. | Crete directory ''C:\Program Files\Java\'' and extract there downloaded zip. Then set path and JAVA HOME: |
Then set path and JAVA HOME: | |
* Open the **sysdm.cpl** (Win+r ant type sysdm.cpl) dialogue and navigate to ''> Advanced > Environment Variables'' | * Open the **sysdm.cpl** (Win+r ant type sysdm.cpl) dialogue and navigate to ''> Advanced > Environment Variables'' |
* Add this line to PATH variable. <code>%JAVA_HOME%\bin</code> | * Add this line to PATH variable. |
* Add new variable ''JAVA_HOME'' with value ''C:\Program Files\Java\jdk-11.0.2'' | <code> |
* Then run ''java -version'' from the windows cmd to check if it is working properly. | |
| %JAVA_HOME%\bin |
| |
| </code> |
| |
| * Add new variable ''JAVA_HOME'' with value ''C:\Program Files\Java\jdk-11.0.2'' |
| * Then run ''java -version'' from the windows cmd to check if it is working properly. |
| |
| |
In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . | In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . |
| |
After change of these tomcat setting and setting-up **logback-spring.xml** in[[.:czechidm_installation_win#create_czechidm_configuration|create_czechidm_configuration]] IdM will log into catalina.out and after day rotate it into catalina.YYYY-MM-DD.log. Tomcat engine will log into tomcat.log and no totate because there are only log of tomat start. Tomcat will log logs of IdM connectors into tomcat-stdout tomcat9-stdout.YYYY-MM-DD.log - it's well knows bug with workaround to make manual log rotation. | After change of these tomcat setting and setting-up **logback-spring.xml** in [[.:czechidm_installation_win#create_czechidm_configuration|create_czechidm_configuration]] IdM will log into catalina.out and after day rotate it into catalina.YYYY-MM-DD.log. Tomcat engine will log into tomcat.log and no totate because there are only log of tomat start. Tomcat will log logs of IdM connectors into tomcat-stdout tomcat9-stdout.YYYY-MM-DD.log - it's well knows bug with workaround to make manual log rotation. |
| |
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 and other unnesesary logs. | 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 and other unnesesary logs. |
</code> | </code> |
| |
Then in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\sever.xml'' remove creation of access logs. Coment out org.apache.catalina.valves.AccessLogValve.'' '' | Then in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\server.xml'' remove creation of access logs. Coment out org.apache.catalina.valves.AccessLogValve.'' '' |
<code> | <code> |
<!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" | <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" |