去官网下载响应的版本 我下载的是BitTorrent-Sync_x64.tar.gz
解压后就3个文件 如下:
[root@www btsync]# ll total 15664 -rwxr-xr-x 1 root root 10096808 May 3 19:07 btsync -rw-r--r-- 1 root root 227 May 3 19:02 LICENSE.TXT -rw-r--r-- 1 root root 1607 May 3 19:02 README [root@www btsync]#
下载地址 :https://www.getsync.com/platforms/desktop
以下是服务端 秘钥用如下秘钥生成
cd /usr/local/btsync ./btsync --generate-secret
#创建如下配置文件或者用 ./btsync --dump-sample-config 命令生成简单配置文件 服务端: [root@www btsync]# cat btsync.conf { "device_name": "0.0.0.0", "listening_port" : 19999, // "storage_path" : "/home/btsync_server/file", "pid_file" : "/var/run/btsync/btsync.pid", "check_for_updates" : true, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "folder_rescan_interval" : 5, "lan_encrypt_data" : false, "lan_use_tcp" : true, "webui" : { }, "shared_folders" : [ { "secret" : "CCBBSS", //秘钥 "dir" : "/usr/local/web/html", "use_relay_server" : false, "use_tracker" : false, "use_dht" : false, "search_lan" : false, "use_sync_trash" : true } ] } [root@www btsync]#
完成后启动
cd /usr/local/btsync ./btsync --config ./btsync.conf --log /var/log/btsync.log
客户端配置如下:
{ "device_name": "192.168.9.9", "listening_port" : 19999, // "storage_path" : "/home/btsync_server/file", "pid_file" : "/var/run/btsync/btsync.pid", "check_for_updates" : true, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "folder_rescan_interval" : 5, "lan_encrypt_data" : false, "lan_use_tcp" : true, "webui" : { }, "shared_folders" : [ { "secret" : "CCBBSS", //服务端秘钥 "dir" : "/usr/local/nginx/html", "use_relay_server" : false, "use_tracker" : false, "use_dht" : false, "search_lan" : false, "use_sync_trash" : true, "known_hosts" : [ "192.168.9.10:19999" ] } ] }
启动同服务端一样 然后测试效果