この記事では、Alibaba Cloud OSS 北京リージョンのブラック「TEST-OSS-BLUCK」を centos サーバーの「/OSS-BLUCKNAME」ディレクトリにマウントする例を使用します。
1.ossfsをインストールする
wget http://gosspublic.alicdn.com/ossfs/ossfs_1.80.6_centos7.0_x86_64.rpm
yum install ossfs_1.80.6_centos7.0_x86_64.rpm
echo BucketName:yourAccessKeyId:yourAccessKeySecret > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
2. マウント先のディレクトリを作成する
mkdir /OSS-BLUCKNAME
3. 権限を設定してマウントする
ossfs TEST-OSS-BLUCK /OSS-BLUCKNAME -ourl=oss-cn-beijing-internal.aliyuncs.com -oallow_other