Skip to content

华为云 obsfs 用法

华为云 obsfs 用法

1. 获取源码

1
git clone https://github.com/huaweicloud/huaweicloud-obs-obsfs

2. 安装依赖

1
2
apt-get install -y build-essential git libfuse-dev libcurl4-openssl-dev libxml2-dev media-types automake libtool
apt-get install -y pkg-config libssl-dev

3. 构建与安装

1
2
3
cd huaweicloud-obs-obsfs
bash build.sh
bash install_obsfs.sh

4. 写入 AK/SK 凭证

把 AK/SK 写进凭证文件 /etc/passwd-obsfs

1
2
<AK>:<SK>
# 如果有临时凭证,用这个格式:<AK>:<SK>:<TOKEN>
1
chmod 600 /etc/passwd-obsfs

5. 创建挂载点并挂载

1
2
3
4
5
6
mkdir -p /mnt/obs

obsfs {并行文件系统名} /mnt/obs \
-o passwd_file=/etc/passwd-obsfs \
-o url=https://obs.{区域}.myhuaweicloud.com \
-o endpoint={区域}

About this Post

This post is written by KaranocaVe.

#华为云 #OBS #obsfs #对象存储