User Tools

Site Tools


tomcat_letsencrypt


Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tomcat_letsencrypt [2023/01/12 17:46] – [Install and configure authbind] millerjstomcat_letsencrypt [2024/11/14 02:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Install and Configure Tomcat 9.0.19 ======+===== Install and Configure Tomcat 9.0.19 =====
 https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-10-on-ubuntu-20-04 https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-10-on-ubuntu-20-04
  
Line 9: Line 9:
  
 Install JDK (CentOS/RHEL) Install JDK (CentOS/RHEL)
-<code>sudo yum install java-11-openjdk-devel</code>+<code>sudo dnf install java-latest-openjdk-headless</code>
  
-Download Tomcat (9.0.19+Download Tomcat (9.0.76
-<code>wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.19/bin/apache-tomcat-9.0.19.tar.gz</code>+<code>wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.76/bin/apache-tomcat-9.0.76.tar.gz</code>
      
 Decompress Decompress
Line 19: Line 19:
 Give tomcat user ownership Give tomcat user ownership
 <code>sudo chown -R tomcat:tomcat /opt/tomcat/ && sudo chmod -R u+x /opt/tomcat/bin</code> <code>sudo chown -R tomcat:tomcat /opt/tomcat/ && sudo chmod -R u+x /opt/tomcat/bin</code>
-====== Notes for RHEL/CentOS/Oracle Linux ====== 
  
  
-====== Install and configure authbind ======+===== Install and configure authbind =====
  
 === Ubuntu === === Ubuntu ===
Line 49: Line 48:
  
  
-====== Using A Local CA with Tomcat9 ====== +===== Using Lets Encrypt with Tomcat9 (single) =====
-===== Generate CA in xca(?) ====== +
- +
-====== Using Lets Encrypt with Tomcat9 (wildcard) ====== +
-Generate Cert: +
-<code>sudo certbot certonly --manual --preferred-challenges dns -d \*.synergeticlaboratories.net</code> +
- +
- +
- +
-====== Using Lets Encrypt with Tomcat9 (single) ======+
 This is the manual way. I'm sure there's an automated way but I haven't bothered to do that yet. This is the manual way. I'm sure there's an automated way but I haven't bothered to do that yet.
  
Line 238: Line 228:
   </Service>   </Service>
 </Server> </Server>
 +</code>
 +
 +===== tomcat systemd service file =====
 +<code>
 +[Unit]
 +Description=Apache Tomcat Web Application Container
 +After=network.target
 +
 +[Service]
 +Type=forking
 +
 +Environment="JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64"
 +Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
 +Environment="CATALINA_HOME=/opt/tomcat/"
 +Environment="CATALINA_BASE=/opt/tomcat/"
 +Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
 +Environment="JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom"
 +
 +ExecStart=/opt/tomcat/bin/startup.sh
 +ExecStop=/opt/tomcat/bin/shutdown.sh
 +
 +User=root
 +Group=root
 +UMask=0007
 +RestartSec=10
 +Restart=always
 +
 +[Install]
 +WantedBy=multi-user.target
 </code> </code>
tomcat_letsencrypt.1673545592.txt.gz · Last modified: 2024/11/14 02:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki