Jump to content

12.安裝rclone、掛載第2台VPS


Jack

Recommended Posts

安裝rclone
curl https://rclone.org/install.sh | sudo bash

 

開始配置
rclone config


New remote
輸入 n


name 命名為 vps2
vps2

 

Choose a number from below, or type in your own value.
33 / SSH/SFTP Connection
要用第2台VPS的SFTP,輸入33


SSH host to connect to.
E.g. "example.com".
host 輸入第2台VPS的IP


Option user.
SSH username, leave blank for current username, root.
user 輸入第2台VPS的用戶名 root


Option port.
SSH port, leave blank to use default (22).
port 輸入 22


SSH password, leave blank to use ssh-agent.
Choose an alternative below. Press Enter for the default (n).
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
輸入y

 

Enter the password:
password 輸入第2台VPS的root密碼

 

Option key_pem.
Raw PEM-encoded private key.
If specified, will override key_file parameter.
key_pem
保留空白


Option key_file.
Path to PEM-encoded private key file.
Leave blank or set key-use-agent to use ssh-agent.
key_file
保留空白

 

Choose an alternative below. Press Enter for the default (n).
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> 
輸入 y


Enter the password:
password 輸入第2台VPS的root密碼


pubkey_file
保留空白


key_use_agent
保留空白


Choose a number from below, or type in your own value.
 1 / Use default Cipher list.
   \ "false"
 2 / Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.
   \ "true"
輸入1

 

disable_hashcheck
按下Enter

 


Edit advanced config?
y) Yes
n) No (default)
輸入 n

 


y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
輸入 y

 

Name                 Type
====                 ====
vps2                 sftp

 

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
輸入 q

 

--------------------------------------------------------------
掛載將遇到fusermount問題
--------------------------------------------------------------

下載 fuse-common 3.2.1
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/fuse-common-3.2.1-12.el8.x86_64.rpm


安裝
sudo rpm --install fuse-common-3.2.1-12.el8.x86_64.rpm


命令
sudo systemctl daemon-reload

 

下載fuse
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/fuse-2.9.7-12.el8.x86_64.rpm

 

安裝
sudo rpm --install fuse-2.9.7-12.el8.x86_64.rpm


命令
sudo systemctl daemon-reload


重啟
sudo reboot

 


----------------------------------------------------------------
在 /mnt/ 創建一個 vps2 目錄,要掛載第2台VPS
----------------------------------------------------------------

命令
mkdir -p /mnt/vps2

 


-----------------
掛載
-----------------

掛載命令
/usr/bin/screen -d -m -S rcmount /usr/bin/rclone mount vps2:/home/wwwroot/ /mnt/vps2

 

查看掛載
df -h

 

已掛載
Filesystem           Size  Used Avail Use% Mounted on
vps2:/home/wwwroot/  151G   21G  130G  14% /mnt/vps2


注意,reboot重啟將需要重新掛載,開機不會自動掛載

Edited by Jack
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...