View | Details | Raw Unified | Return to bug 61971
Collapse All | Expand All

(-)bin/tomcat-example.service (+25 lines)
Line 0 Link Here
1
[Unit]
2
Description=Apache Tomcat Web Application Container
3
After=syslog.target network.target
4
5
[Service]
6
Type=forking
7
8
Environment=JAVA_HOME=/usr/lib/jvm/java-8-oracle/
9
Environment=CATALINA_PID=/opt/apache/apache-tomcat/temp/tomcat.pid
10
Environment=CATALINA_HOME=/opt/apache/apache-tomcat
11
Environment=CATALINA_BASE=/opt/apache/apache-tomcat
12
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
13
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
14
15
ExecStart=/opt/apache/apache-tomcat/bin/startup.sh
16
ExecStop=/bin/kill -15 $MAINPID
17
18
User=tomcat
19
Group=tomcat
20
UMask=0007
21
RestartSec=10
22
Restart=always
23
24
[Install]
25
WantedBy=multi-user.target
(-)webapps/docs/setup.xml (+12 lines)
Lines 109-114 Link Here
109
109
110
  </section>
110
  </section>
111
111
112
  <section name="Unix daemon with systemd">
113
114
    <p>On systems that use systemd to manage it's daemons you can use that to run tomcat. </p>
115
116
    <p>In the copy the file <code>bin/tomcat-example.service</code> to <code>/etc/systemd/system/tomcat.service</code>
117
       and modify the paths in it to reflect your java and tomcat installation paths.</p>
118
119
    <p>Then do <code>systemctl daemon-reload</code> to load the config file and then you can start
120
       tomcat with <code>systemctl start tomcat.service</code> and stop it with <code>systemctl stop tomcat.service</code></p>
121
122
  </section>
123
112
  <section name="Unix daemon">
124
  <section name="Unix daemon">
113
125
114
    <p>Tomcat can be run as a daemon using the jsvc tool from the
126
    <p>Tomcat can be run as a daemon using the jsvc tool from the

Return to bug 61971