<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>浮山狼de博客 &#187; amazon s3</title>
	<atom:link href="https://www.fushanlang.com/tag/amazon-s3/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fushanlang.com</link>
	<description>next station - 下一站，活在当下，且行且思</description>
	<lastBuildDate>Sat, 29 Nov 2014 15:14:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.5</generator>
	<item>
		<title>Amazon mount s3 to Ec2 with s3fs</title>
		<link>https://www.fushanlang.com/amazon-mount-s3-to-ec2-with-s3fs-2190/</link>
		<comments>https://www.fushanlang.com/amazon-mount-s3-to-ec2-with-s3fs-2190/#comments</comments>
		<pubDate>Wed, 18 Jul 2012 04:22:41 +0000</pubDate>
		<dc:creator><![CDATA[fushanlang]]></dc:creator>
				<category><![CDATA[amazon]]></category>
		<category><![CDATA[colud]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[amazon s3]]></category>

		<guid isPermaLink="false">http://www.fushanlang.com/blog/?p=2190</guid>
		<description><![CDATA[<p>理论上，S3 是一个全球存储区域网络 (SAN)，它表现为一个超大的硬盘，您可以在其中存储和检索数字资产。但是，从技术上讲，Amazon 的架构有一些不同。您通过 S3 存储和检索的资产被称为对象。对象存储在存储段（bucket）中。您可以用硬盘进行类比：对象就像是文件，存储段就像是文件夹（或目录）。与硬盘一样，对象和存储段也可以通过统一资源标识符（Uniform Resource Identifier，URI）查找。(http://aws.amazon.com/s3)</p> <p>创建S3，登录到 https://console.aws.amazon.com/s3/home，点击“create bucket”，可以创建一个s3硬盘。</p> <p>安装包：</p> /*Download: http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz Download SHA1 checksum: 8f6561ce00b41c667b738595fdb7b42196c5eee6 Download size: 154904 */ wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz tar xvzf s3fs-1.61.tar.gz cd s3fs-1.61/ sudo ./configure --prefix=/usr sudo make sudo make install <p>Install prerequisites before compiling:</p> <p>在编译之前，有些辅助库需要安装，ubuntu系统需要确认安装以下软件包： Install prerequisites before compiling:</p> apt-get install gcc apt-get install build-essential apt-get install <span style="color:#777"> . . . &#8594; Read More: <a href="https://www.fushanlang.com/amazon-mount-s3-to-ec2-with-s3fs-2190/">Amazon mount s3 to Ec2 with s3fs</a></span>]]></description>
				<content:encoded><![CDATA[<p>理论上，S3 是一个全球存储区域网络 (SAN)，它表现为一个超大的硬盘，您可以在其中存储和检索数字资产。但是，从技术上讲，Amazon 的架构有一些不同。您通过 S3 存储和检索的资产被称为对象。对象存储在存储段（bucket）中。您可以用硬盘进行类比：对象就像是文件，存储段就像是文件夹（或目录）。与硬盘一样，对象和存储段也可以通过统一资源标识符（Uniform Resource Identifier，URI）查找。(<a href="http://aws.amazon.com/s3">http://aws.amazon.com/s3</a>)</p>
<p><strong>创建S3</strong>，登录到 https://console.aws.amazon.com/s3/home，点击“create bucket”，可以创建一个s3硬盘。</p>
<p>安装包：</p>
<pre class="javascript" name="code">
/*Download: http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz
Download SHA1 checksum: 8f6561ce00b41c667b738595fdb7b42196c5eee6
Download size: 154904
*/
wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz
tar xvzf s3fs-1.61.tar.gz
cd s3fs-1.61/
sudo ./configure --prefix=/usr
sudo make
sudo make install</pre>
<p>Install prerequisites before compiling:</p>
<p>在编译之前，有些辅助库需要安装，ubuntu系统需要确认安装以下软件包：<br />
Install prerequisites before compiling:</p>
<pre class="javascript" name="code">
    apt-get install gcc
    apt-get install build-essential
    apt-get install libfuse-dev
    apt-get install fuse-utils
    apt-get install libcurl4-openssl-dev
    apt-get install libxml2-dev
    apt-get install mime-support 
</pre>
<p>Fedora / CentOS系统需要安装以下软件包:</p>
<pre class="javascript" name="code">
    yum install gcc
    yum install libstdc++-devel
    yum install gcc-c++
    yum install fuse
    yum install fuse-devel
    yum install curl-devel
    yum install libxml2-devel
    yum install openssl-devel
    yum install mailcap 
</pre>
<p>s3fs的编译需要fuse版本在2.8.4以上，如果系统默认安装的fuse版本低于2.8.4,则需要另外编译安装fuse2.8.4.<br />
找到两个source fuse的安装包地址。</p>
<pre class="javascript" name="code">
$ sudo wget https://launchpad.net/ubuntu/+archive/primary/+files/fuse_2.8.4.orig.tar.gz  (source 1)
$ sudo wget http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz/download (source 2)
$ cd fuse-2.8.4/
$ tar xzf fuse_2.8.4.orig.tar.gz 
$ sudo ./configure 
$ sudo make
$ sudo make install
$ sudo export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
$ sudo   ldconfig
$ sudo   modprobe fuse
$ sudo   pkg-config --modversion fuse (confirm that 2.8.4 is the version displayed)
  
</pre>
<p>一切准备好之后，再回到s3fs-1.61目录继续：</p>
<pre class="javascript" name="code">
cd s3fs-1.61/
sudo ./configure --prefix=/usr
sudo make
sudo make install
</pre>
<p>之后输入命令s3fs 有option提示说明s3fs安装成功。</p>
<p>如何使用s3fs mount s3?</p>
<pre class="javascript" name="code">
$ sudo vim /etc/passwd-s3fs
</pre>
<p>输入[accessKeyId]:[secretAccessKey]键值对,访问<a href="https://portal.aws.amazon.com/gp/aws/securityCredentials">Amazon securityCredentials</a>里面有.</p>
<pre class="javascript" name="code">
sudo chmod 640 /etc/passwd-s3fs
sudo mkdir  /mnt/s3
sudo s3fs [your-s3-bucket-name] /mnt/s3 -ouse_cache=/tmp -o allow_other
</pre>
<p>以上可以将s3 mount到ec2上的/mnt/里面， 如果卸掉可以用umount：</p>
<pre class="javascript" name="code">
sudo umount /mnt/s3
</pre>
<p>from<br />
<blockquote>http://code.google.com/p/s3fs/wiki/InstallationNotes</p></blockquote>
<blockquote><p>http://www.redmine.org/projects/redmine/wiki/HowToInstallRedmineOnUbuntuServer</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>https://www.fushanlang.com/amazon-mount-s3-to-ec2-with-s3fs-2190/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.140 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2025-10-27 23:37:19 -->
