Linux 常用工具之 Resilio Sync

CentOS 安装 Resilio Sync

使用 repo 方式安装,参考 Installing Sync package on Linux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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

安装过程记录如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[huzhifeng@CentOS72 ~]$ sudo vim /etc/yum.repos.d/resilio-sync.repo
[huzhifeng@CentOS72 ~]$ cat /etc/yum.repos.d/resilio-sync.repo
[resilio-sync]
name=Resilio Sync $basearch
baseurl=http://linux-packages.resilio.com/resilio-sync/rpm/$basearch
enabled=1
gpgcheck=1
[huzhifeng@CentOS72 ~]$ sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc
[huzhifeng@CentOS72 ~]$ sudo yum install -y resilio-sync
Created symlink from /etc/systemd/system/multi-user.target.wants/resilio-sync.service to /usr/lib/systemd/system/resilio-sync.service.
[huzhifeng@CentOS72 ~]$ rpm -ql resilio-sync
/etc/init.d/resilio-sync
/etc/resilio-sync/config.json
/etc/resilio-sync/init_user_config.sh
/etc/resilio-sync/user_config.json
/lib/systemd/system/resilio-sync.service
/lib/systemd/user/resilio-sync.service
/usr/bin/rslsync
/usr/share/doc/resilio-sync-2.4.2
/usr/share/doc/resilio-sync-2.4.2/LICENSE.TXT
/var/lib/resilio-sync
[huzhifeng@CentOS72 ~]$ ls -l /etc/resilio-sync/
total 12
-rw-r--r--. 1 root root 174 Nov 16 00:01 config.json
-rwxrwxr-x. 1 root root 496 Nov 16 00:01 init_user_config.sh
-rw-r--r--. 1 root root 193 Nov 16 00:01 user_config.json
[huzhifeng@CentOS72 ~]$ cat /etc/resilio-sync/config.json
{
"storage_path" : "/var/lib/resilio-sync/",
"pid_file" : "/var/run/resilio-sync/sync.pid",
"webui" :
{
"listen" : "127.0.0.1:8888"
}
}
[huzhifeng@CentOS72 ~]$ sudo systemctl start resilio-sync
[huzhifeng@CentOS72 ~]$ ps -ef | grep sync
rslsync 20362 1 0 18:14 ? 00:00:00 /usr/bin/rslsync --config /etc/resilio-sync/config.json
huzhife+ 20384 18071 0 18:14 pts/0 00:00:00 grep --color=auto sync
[huzhifeng@CentOS72 ~]$ netstat -nlp | grep 8888
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 24710/rslsync
[huzhifeng@CentOS72 ~]$ sudo systemctl enable resilio-sync

Ubuntu 安装 Resilio Sync

使用 repo 方式安装,参考 Installing Sync package on Linux

1
2
3
4
5
6
7
8
9
10
11
12
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
Install Sync
sudo apt-get update
sudo apt-get install resilio-sync

安装过程记录如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
huzhifeng@Ubuntu16041:~$ echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | sudo tee /etc/apt/sources.list.d/resilio-sync.list
deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free
huzhifeng@Ubuntu16041:~$ cat /etc/apt/sources.list.d/resilio-sync.list
deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free
huzhifeng@Ubuntu16041:~$ wget -qO - https://linux-packages.resilio.com/resilio-sync/key.asc | sudo apt-key add -
OK
huzhifeng@Ubuntu16041:~$ sudo apt-get update
huzhifeng@Ubuntu16041:~$ sudo apt-get install resilio-sync
huzhifeng@Ubuntu16041:~$ dpkg --listfiles resilio-sync
/.
/etc
/etc/init.d
/etc/init.d/resilio-sync
/etc/resilio-sync
/etc/resilio-sync/config.json
/etc/resilio-sync/init_user_config.sh
/etc/resilio-sync/user_config.json
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/resilio-sync.service
/usr
/usr/bin
/usr/bin/rslsync
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/user
/usr/lib/systemd/user/resilio-sync.service
/usr/share
/usr/share/doc
/usr/share/doc/resilio-sync
/usr/share/doc/resilio-sync/LICENSE.TXT
/usr/share/doc/resilio-sync/changelog.Debian.gz
/usr/share/doc/resilio-sync/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/resilio-sync
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/resilio-sync.1.gz
/var
/var/lib
/var/lib/resilio-sync
huzhifeng@Ubuntu16041:~$ sudo systemctl start resilio-sync
huzhifeng@Ubuntu16041:~$ ps -ef | grep sync
systemd+ 683 1 0 14:44 ? 00:00:00 /lib/systemd/systemd-timesyncd
rslsync 11822 1 0 17:06 ? 00:00:00 /usr/bin/rslsync --config /etc/resilio-sync/config.json
huzhifeng@Ubuntu16041:~$ netstat -nlp | grep 8888
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN -
huzhifeng@Ubuntu16041:~$ sudo systemctl enable resilio-sync
Synchronizing state of resilio-sync.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable resilio-sync
huzhifeng@Ubuntu16041:~$

参考

Downloads
resilio-sync_x64.tar.gz

EOF