systemd启动nexus

# cat /etc/systemd/system/nexus.service 
[Unit]
Description=nexus
After=network.target 

[Service]
Type=forking
ExecStart=/srv/app/nexus/bin/nexus start
ExecStop=/srv/app/nexus/bin/nexus stop
User=nexus
Restart=on-failure

[Install]
WantedBy=multi-user.target
原文地址:https://www.cnblogs.com/DevOpsTechLab/p/13747175.html