标签:lin emctl start jar包 systemctl user chm exit success
1.获取jar包权限
chmod 500 your-app.jar
2.新建service文件:/etc/systemd/system/myapp.service
[Unit] Description=myapp After=syslog.target [Service] User=myapp ExecStart=/var/myapp/myapp.jar SuccessExitStatus=143 [Install] WantedBy=multi-user.target
3.启用systemctl enable myapp.service
4.systemctl start myapp.service
标签:lin emctl start jar包 systemctl user chm exit success
原文地址:http://www.cnblogs.com/chengjunhao/p/7771801.html