更新 Syncthing文件同步搭建
@@ -68,6 +68,40 @@ WantedBy=multi-user.target
|
|||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable stdiscosrv
|
systemctl enable stdiscosrv
|
||||||
systemctl start stdiscosrv
|
systemctl start stdiscosrv
|
||||||
#查看状态,可查看中继URL
|
#查看状态,可查看设备ID
|
||||||
systemctl status stdiscosrv
|
systemctl status stdiscosrv
|
||||||
|
```
|
||||||
|
|
||||||
|
# 二、客户端部署
|
||||||
|
|
||||||
|
- Linux
|
||||||
|
```
|
||||||
|
#下载安装包并解压
|
||||||
|
tar -zxvf tar -zxvf syncthing-linux-amd64-v1.29.6.tar.gz -C /opt
|
||||||
|
mv /opt/syncthing-linux-amd64-v1.29.6 /opt/syncthing
|
||||||
|
|
||||||
|
#创建启动文件:vim /etc/systemd/system/syncthing.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Syncthing Client
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
ExecStart=/opt/syncthing/syncthing serve
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
#启动服务并设置开机自启动
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable syncthing
|
||||||
|
systemctl start syncthing
|
||||||
|
#查看状态
|
||||||
|
systemctl status syncthing
|
||||||
|
|
||||||
```
|
```
|
Reference in New Issue
Block a user