如何安装BTSync on Centos 6.3 64bit

去中心化的同步软件,相对于最近被封的Dropbox和OneDrive,以及一直被封的Google Drive,它无法被封锁,因为它不需要服务器。ITGeeker使用之后,认为特别适合局域网同步文件,特别是家里有好几台电脑,可以用来同步多而大的文件。
BTSync
软件下载地址(可能需要翻墙):http://www.bittorrent.com/sync/downloads
1. 下载BTSync到/tmp
cd /tmp && wget http://download-lb.utorrent.com/endpoint/btsync/os/linux-x64/track/stable -O /tmp/btsync_x64.tar.gz
2. 建立目录并解压缩BTSync到目录。ITGeeker这里选择的Home目录。
mkdir /home/btsync && cd /home/btsync && tar -xzf /tmp/btsync_x64.tar.gz

3.  Root权限运行BTSync,就这么简单!

/home/btsync/btsync

4. 在浏览器输入你的地址和端口号,进入图形界面进行设置。

https://www.itgeeker.net:8888

BTSync配置

如果你想自定义配置,请按照以下步骤设置:
1. 切换到BTSync安装目录
cd /home/btsync

2. 运行命令

 ./btsync --dump-sample-config > sync.conf

3. 修改sync.conf文件

vi /home/btsync/sync.conf

根据自己的实际情况,修改参数。可以设置BTSync的端口

{ 
 "device_name": "GeekerLocal",
 "listening_port" : 8788, // 0 - randomize port
 
/* storage_path dir contains auxilliary app files
 if no storage_path field: .sync dir created in the directory 
 where binary is located.
 otherwise user-defined directory will be used 
*/
 "storage_path" : "/home/btsync/",

// uncomment next line if you want to set location of pid file
// "pid_file" : "/var/run/btsync/btsync.pid",


 "check_for_updates" : false, 
 "use_upnp" : true, // use UPnP for port mapping


/* limits in kB/s
 0 - no limit
*/
 "download_limit" : 0, 
 "upload_limit" : 0, 

/* remove "listen" field to disable WebUI
 remove "login" and "password" fields to disable credentials check
*/
 "webui" :
 {
/* directory_root path defines where the WebUI Folder browser starts
 (linux only)
*/
// "directory_root" : "/home/user/MySharedFolders/",

 "listen" : "0.0.0.0:8888",
 "login" : "itgeeker",
 "password" : "888888"
 }

/* !!! if you set shared folders in config file WebUI will be DISABLED !!!
 shared directories specified in config file
 override the folders previously added from WebUI.
*/
/*
 ,
 "shared_folders" :
 [
 {
// use --generate-secret in command line to create new secret
 "secret" : "MY_SECRET_1", // * required field
 "dir" : "/home/user/bittorrent/sync_test", // * required field

// use relay server when direct connection fails
 "use_relay_server" : true,
 "use_tracker" : true, 
 "use_dht" : false,
 "search_lan" : true,
// enable SyncArchive to store files deleted on remote devices
 "use_sync_trash" : true,
// restore modified files to original version, ONLY for Read-Only folders
// "overwrite_changes" : false, 
// specify hosts to attempt connection without additional search 
 "known_hosts" :
 [
 "192.168.1.2:44444"
 ]
 }
 ]
*/

// Advanced preferences can be added to config file.
// Info is available in BitTorrent Sync User Guide.

}

修改完之后,需要重启BTSync服务。

可以用以下命令查询进程PID
netstat -lnp|grep 8788

然后kill

kill -9 19111

创建服务及启动脚本(待续)

vim /etc/init.d/btsync
chmod +x /etc/init.d/btsync
 /etc/init.d/btsync start

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

奇客罗方公众号 奇客罗方小程序 奇客罗方客服 ITGeeker Telegram

网站由ITGeeker技术奇客开发并管理;隶属于GeekerCloud奇客罗方智能科技
Site designed and developed by ITGeekerwhich is a sub-website of GeekerCloud
网站地图 | 沪ICP备2021031434号-4