美文网首页
systemd tomcat8 服务

systemd tomcat8 服务

作者: 答春竹 | 来源:发表于2020-11-11 09:52 被阅读0次
    vim /usr/lib/systemd/system/tomcat8.service 
    
    [Unit]
    Description=tomcat8
    After=syslog.target network.target remote-fs.target nss-lookup.target
    
    [Service]
    Type=forking
    Environment='JAVA_HOME=/usr/java/jdk1.8.0_261-amd64'
    Environment='CATALINA_PID=/usr/local/tomcat8/tomcat8.pid'
    Environment='CATALINA_HOME=/usr/local/tomcat8'
    Environment='CATALINA_BASE=/usr/local/tomcat8'
    Environment='CATALINA_OPTS=-Xms8048m -Xmx8048m -Xss64m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=522m -XX:PermSize=256M -XX:MaxPermSize=512M -server -XX:+UseParallelGC'
    
    WorkingDirectory=/usr/local/tomcat8
    
    PIDFile=/usr/local/tomcat8/tomcat8.pid
    ExecStart=/usr/local/tomcat8/bin/startup.sh
    ExecReload=/usr/local/tomcat8/bin/catalina.sh restart
    ExecStop=/usr/local/tomcat8/bin/shutdown.sh
    PrivateTmp=true
    User=root
    Group=root
    
    [Install]
    WantedBy=multi-user.target
    

    相关文章

      网友评论

          本文标题:systemd tomcat8 服务

          本文链接:https://www.haomeiwen.com/subject/ffcebktx.html