在centos 7下部署service一般涉及到jar包部署, service脚本. 数据存贮路径, log存贮路径
jar包部署
/usr/local/app/app1/app1.jar
service 启动文件
/usr/lib/systemd/system/app1.service
[Unit]
Description=my app1 Service
[Service]
User=appuser
# The configuration file application.properties should be here:
WorkingDirectory=/usr/local/app/app1
ExecStart=/usr/local/java/jdk1.7.0_80/bin/java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8787,suspend=n
-jar /usr/local/app/app1/app1.jar
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
数据存贮
/var/lib/app/app1
log
/var/log/app/app1.log