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:server_preparation [2021/11/02 13:06]
steinhartm [Tomcat]
tutorial:adm:server_preparation [2024/01/10 10:35] (current)
koulaj [Java - CentOS8]
Line 11: Line 11:
       * It is possible to use Debian (we tested on Stretch) or other distributions, but you have to adjust steps in this guide accordingly.       * It is possible to use Debian (we tested on Stretch) or other distributions, but you have to adjust steps in this guide accordingly.
   * PostgreSQL 12.x - installed from OS packages.   * PostgreSQL 12.x - installed from OS packages.
-  * Java 11 - installed from OS packages. +  * Java 11 (Java 21 for CzechIdM 13.1.0+) - installed from OS packages. 
-  * Apache Tomcat 8.5.x - installed manually into ''/opt/tomcat''.+  * Apache Tomcat 9.0.x - installed manually into ''/opt/tomcat''.
   * Apache HTTPd 2.4.x - installed from OS packages. Can be replaced by nGinx.   * Apache HTTPd 2.4.x - installed from OS packages. Can be replaced by nGinx.
   * All services start via systemd.   * All services start via systemd.
   * Each service runs under dedicated non-privileged user.   * Each service runs under dedicated non-privileged user.
 +
  
 ===== Instalation and software configuration ===== ===== Instalation and software configuration =====
Line 222: Line 223:
  
 </code> </code>
 +
 +For CzechIdM 13.1.0+:
 +
 +<code>
 +dnf install -y java-21-openjdk-headless java-21-openjdk-devel
 +
 +</code>
 +
  
 ===== Tomcat ===== ===== Tomcat =====
Line 396: Line 405:
   <user username="admin" password="*****store it somewhere safe*****" roles="manager-gui,manager-status,admin-gui"/>   <user username="admin" password="*****store it somewhere safe*****" roles="manager-gui,manager-status,admin-gui"/>
 </tomcat-users> </tomcat-users>
 +
  
 </file> </file>
Line 412: Line 422:
          allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1|192\.168.d+.d+" />          allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1|192\.168.d+.d+" />
 </Context> </Context>
 +
  
 </file> </file>
Line 419: Line 430:
 <code bash> <code bash>
 systemctl restart tomcat systemctl restart tomcat
 +
  
 </code> </code>
Line 430: Line 442:
 <code bash> <code bash>
 rm -rf /opt/tomcat/current/webapps/{examples,docs,ROOT,host-manager,manager} rm -rf /opt/tomcat/current/webapps/{examples,docs,ROOT,host-manager,manager}
 +
  
 </code> </code>
Line 438: Line 451:
 <code xml> <code xml>
 <Server port="-1" shutdown="SHUTDOWN"> <Server port="-1" shutdown="SHUTDOWN">
 +
  
 </code> </code>
Line 480: Line 494:
         <load-on-startup>1</load-on-startup>         <load-on-startup>1</load-on-startup>
     </servlet>     </servlet>
 +
  
 </code> </code>
Line 485: Line 500:
 === Rotating Tomcat logs === === Rotating Tomcat logs ===
  
-Default Tomcat logger appneds to the logfile, it is therefore safe to use simple ''logrotate''  configuration. Save following as ''/etc/logrotate.d/tomcat'', adjust log retention (the ''rotate COUNT'') as necessary.+Default Tomcat logger appends to the logfile, it is therefore safe to use simple ''logrotate''  configuration. Save following as ''/etc/logrotate.d/tomcat'', adjust log retention (the ''rotate COUNT'') as necessary.
  
 <file txt tomcat> <file txt tomcat>
Line 497: Line 512:
     compress     compress
 } }
 +
  
 </file> </file>
Line 518: Line 534:
  
 </note> </note>
 +
  
 ====== Apache httpd as a reverse proxy ====== ====== Apache httpd as a reverse proxy ======
  • by steinhartm