文章目录
- 1、下载对应版本syncthing安装包
- 2、安装包解压缩
- 3、对应文件移动到配置路径下
- 4、启动服务并修改配置文件
- 5、关闭防火墙或放通对应端口
- 6、登录服务页面
1、下载对应版本syncthing安装包
[root@localhost ~]#wget https://github.com/syncthing/syncthing/releases/download/v1.2.0/syncthing-linux-amd64-v1.2.0.tar.gz
2、安装包解压缩
[root@localhost ~]#tar xzvf syncthing-linux-amd64-v1.2.0.tar.gz
3、对应文件移动到配置路径下
[root@localhost ~]#cp syncthing-linux-amd64-v1.2.0/syncthing /usr/local/bin
4、启动服务并修改配置文件
# 启动服务
[root@localhost ~]#syncthing
# 第一次自定义内网IP是无法登录的,需要中断服务修改登录IP地址,使用ctrl+c中断服务;
[root@localhost ~]# vim /root/.config/syncthing/config.xml
# 将127.0.0.1:8384修改 为0.0.0.0:8384
[root@localhost ~]#syncthing
5、关闭防火墙或放通对应端口
# 关闭防火墙
[root@localhost ~]# systemctl stop firewalld
# 放通端口
[root@localhost ~]# firewall-cmd --permanent --add-port=8384/tcp
success
syncthing服务对应端口
22000 (TCP)
8384 (TCP)
21027 (UDP)
44647 (UDP)
37269 (UDP)
6、登录服务页面
使用浏览器防护http://[ip]:8384
,即可访问对应服务;
设定登录密码;