CENTOS 7搭建Resilio-sync 官方指导步骤
Installing Sync Package On Linux
This guide implies understanding of how Linux package manager, running processes and startup work.
If you DO NOT have btsync package installed, ignore the note above and proceed to installing resilio-sync package. Installing resilio-sync package on Raspberry Pi devices follow the same installation steps (with one extra step for RPI1 - see below).
To install Sync from Resilio repository, you need to complete 3 steps:
- Add repository
- Add PGP public key for package verification
- Install the package
Before installing Resilio Sync package, stop btsync service.
For Debian-based Linux (Debian, Ubuntu, Zorin, Elementary)
Create file /etc/apt/sources.list.d/resilio-sync.list with the following content to register Resilio repository:
echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | sudo tee /etc/apt/sources.list.d/resilio-sync.list
Add public key with the following command:
wget -qO - https://linux-packages.resilio.com/resilio-sync/key.asc | sudo apt-key add -
Also you can use the following command to add public key:
curl -LO https://linux-packages.resilio.com/resilio-sync/key.asc && sudo apt-key add ./key.asc
| For arm64 architecture | For Raspberry Pi 1 |
sudo dpkg --add-architecture armhfsudo apt-get update
In /etc/apt/sources.list change the line as follows:
deb [arch=armhf] http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free | sudo dpkg --add-architecture armel |
Install Sync
sudo apt-get update
sudo apt-get install resilio-sync
For RPM-based Linux (Red Hat, Fedora, CentOS, OpenSUSE)
Only arm and x64 arch are available.
Create file /etc/yum.repos.d/resilio-sync.repo with the following content to register Resilio repository:
Create file /etc/yum.repos.d/resilio-sync.repo with the following content to register Resilio repository:
[resilio-sync] name=Resilio Sync baseurl=http://linux-packages.resilio.com/resilio-sync/rpm/$basearch enabled=1 gpgcheck=1
Add public key:
rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc
Install Sync:
yum update
yum install resilio-sync
Managing Sync
systemd
Enable sync service automatic startup as user rslsync:
sudo systemctl enableresilio-sync
Enable sync service as current user:
edit file /usr/lib/systemd/user/resilio-sync.service and change "WantedBy=multi-user.target" to "WantedBy=default.target". Save. Then enable the service:
systemctl --user enableresilio-sync ////如果这一步失败,则重启机器,直接可以使用服务。实际上已经在运行了。
Systemctl can be also run with the following arguments:
start, stop, enable, disable, status
For example:
systemctl --user startresilio-sync
sysvinit, upstart
Run as rslsync user:
sudo serviceresilio-syncstart
Service can also be run with the following arguments:
start, stop, restart
Guide on how to use Sync on linux is here.
After successful migration and verifying that setup is preserved, you can remove btsync package:
After successful migration and verifying that setup is preserved, you can remove btsync package:
For Debian-based Linux:
sudo apt-get purge btsyncFor RPM-based Linux
sudo yum remove btsync
Guide To Linux, And Sync Peculiarities
The Linux version of Sync has no integration with the operating system, which leads to certain limitations/peculiarities as well as the need for a user to configure most of the parameters manually.
Minor peculiarities:
- no tray icon
- notifications do not appear outside Sync UI:

Major peculiarities:
1) if you're using Sync 2.2 or older, Selective Sync is unavailable (fully supported in ver. 2.3), that is, all the folders can be shared in either of the two modes:
- disconnected (folder names are visible in Sync, however, no actual data is transferred)
- synced (folders are fully synchronized, 100% of data is transferred)
2) any links shared with a Linux, either a link to a shared folder or a license seat, as well as activating licenses are to be done via Manual Connection box which can be accessed through Options:

Sync 2.2 doesn't have a GUI for Linux, so it should be configured manually through a web interface: once the program is started, open a web browser and enter the following URL: http://localhost:8888/gui/
On Linux one can start multiple instances of Sync, however, for the second and all the subsequent instances, user should manually assign and configure ports for data transmission/reception.

On Linux one can start multiple instances of Sync, however, for the second and all the subsequent instances, user should manually assign and configure ports for data transmission/reception.
Sync on Linux will prompt for login and password to protect unauthorized access to Sync UI. Note, that password is optional, and later you will be able to change login options.

By default, web UI listens only on 127.0.0.1 interface for security reasons. This can be changed with the following command: --webui.listen <Interface_IP>:<number_of_port>, for example
./rslsync --webui.listen 0.0.0.0:8888 |
You can use "0.0.0.0" IP to force Sync to listen on all available interfaces.
For more information regarding activation of Sync Pro on Linux, click here.
Some useful options (available with ./rslsync --help) :
| --config <path to configuration file> Run Sync in config mode. Also used to run Sync in API mode - if API key is specified in config. --storage <path> Storage path for identity and license. --identity <user name> Creates user identity. --license <path> Apply owner license. --dump-sample-config Print an example configuration file. --log <file> Set log file. --generate-secret Generate a read/write key. --get-ro-secret <r/w key> Get the read-only key associated to a read/write key. --webui.listen <IP:port> Listen to a network interface at a given port Example : --webui.listen 0.0.0.0:8888 would listen to any interface on the LAN at port 8888 --nodaemon Does not fork Sync to a separate process, leaving all debug output to current terminal. --help Show available options. |
评论
发表评论