以创建 Streama 服务项为例
cd /usr/lib/systemd/system
vim streama.service
[Unit]
Description=Streama Server
After=syslog.target
After=network.target
[Service]
User=root
Type=simple
ExecStart=/usr/bin/java -jar /opt/streama/streama.jar
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=Streama
[Install]
WantedBy=multi-user.target
即可使用 systemctl start streama 来启动管理