1.服务配置文件
1 2 |
cd /etc/systemd/system touch your_service_name.service |
1 2 3 4 5 6 |
[Unit] Description=zaomianbao [Service] ExecStart= /your_java_path/bin/java -jar /your_app_path/your_app_name.jar [Install] WantedBy=multi-user.target |
2.启动服务
1 |
systemctl start your_service_name.service |
参考:
https://blog.csdn.net/weixin_37490221/article/details/80758276