配置 Systemd (Linux)
sudo mkdir -p /etc/gorse/
sudo mkdir -p /var/log/gorse/
sudo mkdir -p /var/lib/gorse/
sudo mv config.toml /etc/gorse/
- 在/etc/systemd/system/gorse.service创建 systemd 配置文件:
[Unit]
Description=Gorse, an open source recommender system service written in Go.
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/gorse-in-one -c /etc/gorse/config.toml \
--log-path /var/log/gorse/gorse.log \
--cache-path /var/lib/gorse/gorse.data
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable gorse
sudo systemctl start gorse
- 检查 gorse-in-one 的运行状态和日志:
systemctl status gorse
网友评论