下载ossfs安装包,以下载CentOS 7.0 (x64)版本为例,具体命令为:
wget http://gosspublic.alicdn.com/ossfs/ossfs_1.80.6_centos7.0_x86_64.rpm
sudo yum localinstall ossfs_1.80.6_centos7.0_x86_64.rpm
验证身份
echo bucket-b:xxxxxx:xxxxxx >> /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
挂载与卸载命令
ossfs bucket-b /data/ossfs/b -ourl=http://oss-cn-shenzhen-internal.aliyuncs.com
umount /data/ossfs/a
bash: ossfs: command not found
解决:
#rpm -ql ossfs
#ln -sf /usr/local/bin/ossfs /usr/bin/ossfs
如遇到 ossfs: /lib64/libcrypto.so.10: version libcrypto.so.10' not found (required by ossfs)
执行install compat-openssl10
即可解决