Debian10 安装ossfs


1.
sudo apt-get install automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config
2.
git clone https://github.com/aliyun/ossfs.git
cd ossfs/
./autogen.sh
./configure
Sudo make
Sudo make install
3.配置bucket信息和accessKey信息:
echo Bucket名称:要是用的AccessKeyId:对应的AccessKeySecret > /etc/passwd-ossfs
示例:
mkdir -p /data/ossfs
cosfs examplebucket-1250000000 /data/ossfs -ourl=http://cos.ap-guangzhou.myqcloud.com

ossfs ts-1121-patch-oss /data/ossfs/ -ourl=https://oss-cn-hangzhou-internal.aliyuncs.com -oallow_other

其中:
为本地挂载目录(例如/mnt)。
为地域简称, 例如 ap-guangzhou 、 eu-frankfurt 等。更多地域简称信息,请参见 可用地域。
-odbglevel 指定日志级别,默认为crit,可选值为crit、error、warn、info、debug。
-oallow_other 允许非挂载用户访问挂载文件夹。

创建启动脚本:
Vim /etc/init.d/ossfs
ossfs demo-patch-oss /data/ossfs/ -ourl=oss-cn-hangzhou-internal.aliyuncs.com -oallow_other
Chmod u+x /etc/init.dossfs

Centos:
chkncondif ossf on
Debian;
update-rc.d ossfs defaults


文章作者: 云上的小雨滴
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 云上的小雨滴 !
评论
  目录