阿里云ECS安装ossfs
git clone https://github.com/aliyun/ossfs.git
cd ossfs
./autogen.sh
./configure
make
make install
出现如下错误:
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for common_lib_checking... no
configure: error: Package requirements (fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6) were not met:
No package 'fuse' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
解决办法,使用root用户安装
yum -y install libxml2-devel fuse fuse-* glib2 glib2-*
查看安装的fuse
rpm -qa |grep fuse
echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
mkdir /tmp/ossfs
将oss bucket mount到指定目录(ossfs my-bucket my-mount-point -ourl=my-oss-endpoint)
如果使用ossfs的机器是阿里云ECS,可以使用内网域名来避免流量收费和 提高速度:
ossfs my-bucket /tmp/ossfs -ourl=http://oss-cn-hangzhou-internal.aliyuncs.com
如果出现错误使用-f参数
完成后向/tmp/ossfs 拷贝文件测试,然后在阿里云控制台中查看文件是否上传到了指定的bucket中
参考:
本文介绍如何在阿里云ECS上安装ossfs,并解决了安装过程中遇到的依赖包问题。通过使用root权限安装必要的软件包,实现了ossfs的正确配置。文章还介绍了如何将OSS bucket挂载到本地目录,并提供了测试方法。
756

被折叠的 条评论
为什么被折叠?



