tomcat配置systemctl

vim /usr/lib/systemd/system/tomcat1.service
----------
[Unit]
Description=Tomcat1
After=network.target
[Service]
Type=forking
#PIDFile=/usr/local/tomcat/pid
ExecStart=/lazy/tomcat1/bin/catalina.sh start
ExecStop=/lazy/tomcat1/bin/catalina.sh stop
[Install]
WantedBy=multi-user.target
----------
systemctl daemon-reload
#重新载入
遇到的坑

java解压安装时,用systemctl 管理tomcat会报错找不到JAVA_HOME

posted @ 2019-09-24 11:49  左岸丶  阅读(884)  评论(0编辑  收藏  举报