Ansible contd…
Tomcat installation
- Refer Here for the changes done to
- download tomcat if it is required
- change shell file permissions
- Now lets create tomcat.service file
- location:
/etc/systemd/system/tomcat.service
- location:
- content
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
[Install]
WantedBy=multi-user.target
- Refer Here for the changes done to create a service
