Alibaba Cloud mounts oss
Steps:
# 安装软件
wget http://gosspublic.alicdn.com/ossfs/ossfs_1.80.5_centos7.0_x86_64.rpm
sudo yum localinstall ossfs_1.80.5_centos7.0_x86_64.rpm
# 写入信息
echo bucket名称:子账号AccessKeyID:子账号AccessKeySecret > /etc/passwd-ossfs
# 创建目录
mkdir /mnt/ossfs
# 进行挂载
ossfs bucket名称 /mnt/ossfs -ourl=http://oss-cn-hangzhou.aliyuncs.com -o allow_other
The -ourl parameter during mounting corresponds to the EndPoint of oss, which is determined according to the selected region when creating the bucket
The -a allow_other parameter must be filled in, otherwise other users cannot operate this directory
Assuming that the next step is to upload pictures through the web, the directory path for uploading pictures is:, /home/wwwroot/test/public/upload
you need to create a soft chain:
ln -s /mnt/ossfs /home/wwwroot/test/public/upload
oss-browser authorization
If there is no sub-account, create a sub-account first
Download the oss-browser client, log in with an account with all permissions, and select the bucket to be authorized
Authorize to the corresponding sub-account
The sub-account must choose the corresponding oss path when logging in, namelyoss://bucket名称
Source: https://www.jianshu.com/p/c79d2616bd3e