标签:安装 after 开机启动 system hup shutdown desc bin ant
1、安装jdk 4、tomcat 开机启动
在/usr/lib/systemd/system目录下增加tomcat9文件,内容如下:
[Unit]
Description=Tomcat
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=oneshot
ExecStart=/usr/local/tomcat/tomcat9/bin/startup.sh
ExecStop=/usr/local/tomcat/tomcat9/bin/shutdown.sh
ExecReload=/bin/kill -s HUP $MAINPID
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
标签:安装 after 开机启动 system hup shutdown desc bin ant
原文地址:https://blog.51cto.com/hzcto/2382034