1.编写启动脚本,大部分都是相同的,但是有些程序可能略要修改
[Unit]
Description=Seata Server
After=network.target
[Service]
User=root
Type=forking
WorkingDirectory=/path/to/seata
ExecStart=/path/to/seata/bin/seata-server.sh -h your_host_ip -p your_host_port
ExecStop=/path/to/seata/bin/seata-server.sh stop
Restart=always
[Install]
WantedBy=multi-user.target
2.将其放在lib/systemd/system目录下
3.systemctl daemon-reload刷新开机自启配置
4.systemctl start seata启动服务
5.systemctl enable seata设为开机自启
6.systemctl status seata查看开机自启的服务状态