centos 7 下的 service部署

在centos 7下部署service通常涉及到jar包部署, service腳本. 數據存貯路徑, log存貯路徑java

jar包部署centos

/usr/local/app/app1/app1.jarapp

service 啓動文件socket

/usr/lib/systemd/system/app1.servicedebug

[Unit]
Description=my app1 Serviceserver

[Service]
User=appuserip

# 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.targetget

數據存貯it

/var/lib/app/app1

log

/var/log/app/app1.log

相關文章
相關標籤/搜索