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