阿里雲掛載ossfs

2021-09-13 03:01:45 字數 869 閱讀 2506

首次,需要安裝ossfs的rpm包,放在了跳板機/home/fleming目錄下,scp拷貝到機器的/目錄下

yum -y localinstall ossfs
設定bucket name 和 accesskeyid/secret資訊,將其存放在/etc/passwd-ossfs 檔案中。注意這個檔案的許可權必須正確設定,建議設為640。

echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs

chmod 640 /etc/passwd-ossfs

將oss bucket 掛載到指定目錄。

ossfs my-bucket my-mount-point -ourl=my-oss-endpoint
示例:

my-bucket這個bucket掛載到/tmp/ossfs目錄下,accesskeyid是faint,accesskeysecret是123,oss endpoint是

echo my-bucket:faint:123 > /etc/passwd-ossfs

chmod 640 /etc/passwd-ossfs

mkdir /tmp/ossfs

ossfs my-bucket /tmp/ossfs -ourl= -o allow_other

解除安裝bucket

fusermount -u /tmp/ossfs
參考:

通過OSSFS掛載阿里雲OSS至本地

安裝ossfs之前安裝相應的依賴庫 sudo yum install automake gcc c git libcurl devel libxml2 devel fuse devel make openssl devel安裝ossfs原始碼,可以從github上獲取 git clone cd os...

阿里雲ECS安裝ossfs

阿里雲ecs安裝ossfs git clone cd ossfs autogen.sh configure make make install 出現如下錯誤 checking for pkg config.usr bin pkg config checking pkg config is at le...

阿里雲 磁碟掛載

參考自阿里雲伺服器使用心得。雲伺服器環境 centos 6.2 64位 客戶端環境 mac osx 遠端連線方式 執行 terminal,輸入命令 ssh username ip 硬碟分割槽及掛載操作步驟 1.檢視未掛載的硬碟 名稱為 dev xvdb fdisk l disk dev xvdb d...