<p>

<br />

</p>
<h3>

<span style="font-size:18px;font-family:'Microsoft YaHei';">前几天推荐了阿里云的OSS活动:</span> 

</h3>
<p>

<span style="font-size:18px;font-family:'Microsoft YaHei';"><a href="http://www.hivps.cn/292.html" target="_blank">阿里云1月OSS活动推荐:免费获取OSS 40G存储空间一年使用权</a></span> 

</p>
<p>

<br />

</p>
<p>

<br />

</p>
<h3>

<span style="font-size:18px;font-family:'Microsoft YaHei';">那么我们怎么使用OSS呢,下面介绍利用</span><span style="font-size:18px;font-family:'Microsoft YaHei';">ossfs工具将OSS挂载到linux系统目录的使用方法</span> 

</h3>
<p>

<br />

</p>
<p>

<span style="font-size:18px;font-family:'Microsoft YaHei';">详细资料可以通过以下地址查阅</span> 

</p>
<p>

<span style="font-size:18px;font-family:'Microsoft YaHei';">OSSFS发布地址:</span><a href="https://bbs.aliyun.com/read.php?spm=5176.1872553.1003.5.6hD2G3&amp;tid=267052&amp;displayMode=1&amp;page=1&amp;toread=1#tpc" target="_blank"><span style="font-size:18px;font-family:'Microsoft YaHei';">阿里云论坛</span></a> 

</p>
<p>

<span style="font-size:18px;font-family:'Microsoft YaHei';">OSSFS官方FAQ:</span><span style="font-size:18px;font-family:'Microsoft YaHei';"><a href="https://github.com/aliyun/ossfs/wiki/FAQ" target="_blank"><span style="font-size:18px;font-family:'Microsoft YaHei';">gihub</span></a></span> 

</p>
<p>

<br />

</p>
<p>

<span style="color:#E53333;font-size:18px;font-family:'Microsoft YaHei';">最新版本请先查阅这里:</span><span style="font-weight:700;line-height:21.6px;font-family:Arial;font-size:14px;vertical-align:baseline;color:#333333;background-color:#FFFFFF;"><span><a href="https://github.com/aliyun/ossfs/wiki/install" target="_blank"><span style="color:#E53333;font-size:18px;font-family:'Microsoft YaHei';">ossfs安装包下载</span></a></span></span><span style="color:#E53333;font-family:'Microsoft YaHei';font-size:18px;line-height:21.6px;background-color:#FFFFFF;">&nbsp;</span><br />

<span style="color:#333333;font-family:Arial;font-size:14px;line-height:21.6px;background-color:#FFFFFF;"> </span>
</p>
<h3>

<span style="font-size:18px;font-family:'Microsoft YaHei';">下面分享以下centos下安装OSSFS的经验</span> 

</h3>
<p>

<br />

</p>
<p>

<br />

</p>
<p>

<span style="font-size:18px;font-family:'Microsoft YaHei';">下载安装包:</span> 

</p>
<p>

<br />

</p>
<div>

wget http://gosspublic.alicdn.com/ossfs/ossfs_1.7.9.1_centos6.5_x86_64.rpm

</div> <p> <span style="font-size:18px;font-family:'Microsoft YaHei';">运行安装包:</span> </p> <p>
</p> <div>
sudo yum localinstall  ossfs_1.7.9.1_centos6.5_x86_64.rpm

</div> <p> <span style="font-size:18px;font-family:'Microsoft YaHei';">写入你需要挂载的OSS bucket名称,</span><span style="color:#999999;font-family:'Microsoft YaHei';line-height:17.1429px;font-size:18px;background-color:#F5F6FA;">Access Key ID</span><span style="font-size:18px;font-family:'Microsoft YaHei';"> 和 </span><span style="color:#999999;font-family:'Microsoft YaHei';line-height:17.1429px;font-size:18px;background-color:#F5F6FA;">Access Key Secret</span><span style="font-size:18px;font-family:'Microsoft YaHei';">等信息,格式如下</span> </p> <p>
</p> <p>
</p>
echo bucketname:AccesskeyID:Accesskeysecret > ~/.passwd-ossfs
<p>
</p> <div> <span style="font-size:18px;font-family:'Microsoft YaHei';">修改该文件权限</span> </div> <div> <span style="font-size:18px;font-family:'Microsoft YaHei';"></span>
</div> <div>
chmod 600 ~/.passwd-ossfs

</div> <p> <span style="font-size:18px;font-family:'Microsoft YaHei';">挂载到系统目录,已/oss目录为例</span> </p> <p>
</p> <p>
</p>
mkdir /oss
<p>
</p> <p> <span style="line-height:1.5;font-size:18px;font-family:'Microsoft YaHei';">启动挂载,请自行修改参数</span> </p> <p> <span style="line-height:1.5;"> </span> </p>
ossfs bucketname /oss -ourl=OSS节点地址 -o allow_other
<p> <span style="font-size:18px;font-family:'Microsoft YaHei';"> 参数说明 OSS节点地址在OSS后台查询,如杭州内网为</span><span style="font-family:'Microsoft YaHei';font-size:18px;background-color:#FFFFFF;">http://<;span style="color:#333333;font-family:'Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei';line-height:17.1429px;background-color:#FFFFFF;">oss-cn-hangzhou-internal.aliyuncs.com</span></span> </p> <p> <span style="font-family:Arial;background-color:#FFFFFF;"> </span> </p>
-o allow_other
<span style="font-size:18px;font-family:'Microsoft YaHei';">为允许非root账户使用此目录</span>
<p>
</p> <p> <span style="font-family:Arial;background-color:#FFFFFF;">
</span> </p> <p> <span style="font-family:Arial;background-color:#FFFFFF;">
</span> </p> <p>
</p> <p>
</p>
Last modification:December 13th, 2017 at 11:43 pm