阿里云ecs服务器挂载oss

           

一、

wget http://gosspublic.alicdn.com/ossfs/ossfs_1.80.7_ubuntu20.04_amd64.deb

sudo gdebi ossfs_1.80.7_ubuntu20.04_amd64.deb

二、

echo BucketName:yourAccessKeyId:yourAccessKeySecret > /etc/passwd-ossfs

三、

chmod 640 /etc/passwd-ossfs

四、

mkdir /mnt/oss

#mkdir /www/wwwroot/pack 空目录

五、

ossfs xtao /www/wwwroot/pack/apk -o url=http://oss-cn-shenzhen-internal.aliyuncs.com

#ossfs xtao /www/wwwroot/pack/apk -o url=http://oss-cn-shenzhen-internal.aliyuncs.com

六、开机自启动

cd /etc/init.d/

vim ossfs

#! /bin/bash
chkconfig: 2345 10 90
description: Auto mount ossfs
ossfs xtao /www/wwwroot/pack/apk -o url=http://oss-cn-shenzhen-internal.aliyuncs.com -o allow_other

chkconfig ossfs on 可能

#sudo sysv-rc-conf xxxx on

ps aux | grep ossfs

资料查阅:

如何安装ossfs_对象存储-阿里云帮助中心

Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-90-generic x86_64)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值