CentOS 安装BitTorrent Sync 6.10更新64位(已失效,请查看最新Resilio Sync教程)

官方介绍:

https://www.getsync.com/intl/zh_cn/features

btsync就是一个新型的P2P的同步软件,相比于其他类软件更加私人一些

废话不说了,下面介绍安装方法和配置

1.首先要下载应用程序解压 这个是官方32位最新的版本 下面是64位

wget --no-check-certificate https://download-cdn.getsyncapp.com/stable/linux-i386/BitTorrent-Sync_i386.tar.gz

wget --no-check-certificate https://download-cdn.getsyncapp.com/stable/linux-x64/BitTorrent-Sync_x64.tar.gz

捕获

解压

tar zxvf BitTorrent-Sync_i386.tar.gz
tar zxvf BitTorrent-Sync_x64.tar.gz

捕获2

2.运行程序输出配置模板文件

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

3.编辑上一步输出的btsync.conf

可以利用ftp打开该文件编辑,也可以使用 vi btsync.conf 在ssh中编辑

将下面的标记部分改为你自己的服务器的信息。

{

//-----------------------------------------------------
"device_name": "My Sync Device",

//-----------------------------------------------------

"listening_port" : 0, // 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/user/.sync",

/* set location of pid file */
// "pid_file" : "/var/run/btsync/btsync.pid",

/* use UPnP for port mapping */
"use_upnp" : true,

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

/* proxy configuration */
// "proxy_type" : "socks4", // Valid types: "socks4", "socks5", "http_connect". Any other value means no proxy
// "proxy_addr" : "192.168.1.2", // IP address of proxy server.
// "proxy_port" : 1080,
// "proxy_auth" : false, // Use authentication for proxy. Note: only username/password for socks5 (RFC 1929) is supported, and it is not really secure
// "proxy_username" : "user",
// "proxy_password" : "password",

//-----------------------------------------------------

"webui" :
{
"listen" : "0.0.0.0:8888", // remove field to disable WebUI 端口不要设置成常用的,比如80、443、21等
"login" : "login",
"password" : "password"

//-----------------------------------------------------

/* preset credentials. Use password or password_hash */
// ,"login" : "admin"
// ,"password" : "password"
// ,"password_hash" : "some_hash" // password hash in crypt(3) format
// ,"allow_empty_password" : false // Defaults to true
/* ssl configuration */
// ,"force_https" : true // disable http
// ,"ssl_certificate" : "/path/to/cert.pem"
// ,"ssl_private_key" : "/path/to/private.key"

/* directory_root path defines where the WebUI Folder browser starts (linux only). Default value is / */
// ,"directory_root" : "/home/user/MySharedFolders/"

/* directory_root_policy defines how directory_root is used (linux only).
Valid values are:
"all" - accepts directory_root and its subdirectories for 'getdir' and 'adddir' actions
"belowroot" - accepts directory_root's subdirectories for 'getdir' and 'adddir' actions,
but denies attempts to use 'adddir' to create directories directly within directory_root
Default value is "all". */
// ,"directory_root_policy" : "all"

/* dir_whitelist defines which directories can be shown to user or have folders added (linux only)
relative paths are relative to directory_root setting */
// ,"dir_whitelist" : [ "/home/user/MySharedFolders/personal", "work" ]
}

/* !!! 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" :
[
{
"secret" : "MY_SECRET_1", // required field - use --generate-secret in command line to create new secret
"dir" : "/home/user/bittorrent/sync_test", // * required field
"use_relay_server" : true, // use relay server when direct connection fails
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : true, // enable SyncArchive to store files deleted on remote devices
"overwrite_changes" : false, // restore modified files to original version, ONLY for Read-Only folders
"known_hosts" : // specify hosts to attempt connection without additional search
[
"192.168.1.2:44444"
]
}
]
*/

/* Advanced preferences can be added to config file. Info is available at http://sync-help.bittorrent.com */

}

 

4.运行BT sync,此时系统会新增一个btsync进程

./btsync --config btsync.conf

捕获3

关闭BT sync

killall btsync

5.把BT sync加入开机启动

vi /etc/rc.local

在exit 0之前加入

cd /root
./btsync --config btsync.conf

6.浏览器中打开

http://ip:8888

输入用户名密码之后就可以进行配置了

如果出现客户端无法同步或无法连接的问题,请参照

http://www.v2ex.com/t/90480

—————-待修改

 

本文转载修改自http://www.ldisp.com/a/linux/2013/CentOS-BitTorrent-Sync.shtml 感谢原作者

发表回复