-
fuse安装的情况下,需要使用root进行启动配置,如果需要使用其他账号挂载目录:
echo user_allow_other >> /etc/fuse.conf chmod +rx /bin/fusermount 然后在使用fusemount的命令加上一些选择,数字是用户id和组id -d -o uid=2001 -o gid=2001
-
下载fuse安装包到指定补录:
#wget http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz/download?use_mirror=jaist&r=&use_mirror=jaist -P /usr/local
-
解压fuse-2.8.4.tar.gz:
#tar -zxvf fuse-2.8.4.tar.gz
-
安装配置fuse:
#cd fuse-2.8.4 #./configure #make #make install #modprobe fuse
注意,当make时可能会提示:无法找到makefile错误而导致无法编译,可能是gcc没有安装,检查后是否安装了gcc,如果没有安装则执行如下命令: centos#yum-y install gcc
安装完毕后 执行make & make install 以及modprobe fuse命令vim /etc/sysconfig/modules/my.modules #!/bin/sh modprobe fuse >/dev/null 2>&1 chmod +x /etc/sysconfig/modules/my.modules
-
编译hadoop的libhdfs组件,编译此工具组件需要ant工具编译build java的源码文件,接下来则安装ant工具:
[root@localhost hadoop]#cd /usr/local/ [root@localhost hadoop]#wget http://www.meisei-u.ac.jp/mirror/apache/dist/ant/binaries/apache-ant-1.7.1-bin.tar.gz [root@localhost hadoop]#tar zxvf apache-ant-1.7.1-bin.tar.gz [root@localhost hadoop]#mv apache-ant-1.7.1-bin ant
- 将ant加入到系统环境变量 略过
-
正式编译 libhdfs工具组件:
#cd $HADOOP_HOME/ #ant compile-c++-libhdfs -Dlibhdfs=1 -Dcompile.c++=1 #ln -s c++/Linux-$OS_ARCH-$OS_BIT/lib build/libhdfs
此编译过程需要耐心等待,其中$OS_ARCH-$OS_BIT 是linux的系统位数,请运行:#file /bin/ls
命令查询本机的系统配置,并替换上述ln中的相应参数 -
编译fuse-hdfs:
#cd $HADOOP_HOME #ant compile-contrib -Dlibhdfs=1 -Dfusedfs=1
过程中可能会出现错误:create-native-configure: BUILD FAILED /usr/local/hadoop/build.xml:634: Execute failed: java.io.IOException: Cannot run program "autoreconf" (in directory "/usr/local/hadoop/src/native"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442) at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628) at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669) at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1248) at org.apache.tools.ant.Main.runBuild(Main.java:851) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 23 more
请注意红色错误标记,则系统需要安装autoreconf 工具,安装命令如下:[root@localhost hadoop]# yum -y install automake autoconf
接下来继续运行ant编译:[root@localhost hadoop]# ant compile-contrib -Dlibhdfs=1 -Dfusedfs=1
请查看编译过程日志,可能出现错误:[javac] Compiling 2 source files to /usr/local/hadoop/build/classes compile-mapred-classes: Trying to override old definition of task jsp-compile [javac] /usr/local/hadoop/build.xml:549: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds create-native-configure: [exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS [exec] ../../lib/autoconf/specific.m4:386: AC_USE_SYSTEM_EXTENSIONS is expanded from... [exec] ../../lib/autoconf/specific.m4:332: AC_GNU_SOURCE is expanded from... [exec] configure.ac:42: the top level [exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS [exec] ../../lib/autoconf/specific.m4:386: AC_USE_SYSTEM_EXTENSIONS is expanded from... [exec] ../../lib/autoconf/specific.m4:332: AC_GNU_SOURCE is expanded from... [exec] configure.ac:42: the top level [exec] configure.ac:42: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS [exec] ../../lib/autoconf/specific.m4:386: AC_USE_SYSTEM_EXTENSIONS is expanded from... [exec] ../../lib/autoconf/specific.m4:332: AC_GNU_SOURCE is expanded from... [exec] configure.ac:42: the top level [exec] configure.ac:48: error: possibly undefined macro: AC_PROG_LIBTOOL [exec] If this token and others are legitimate, please use m4_pattern_allow. [exec] See the Autoconf documentation. [exec] autoreconf: /usr/bin/autoconf failed with exit status: 1 BUILD FAILED /usr/local/hadoop/build.xml:634: exec returned: 1 Total time: 18 seconds
注意红色的错误标记,接下来检查系统中工具m4是否安装,保险起见,直接运行安装命令:[root@localhost hadoop]# yum -y install m4
没有此错误则继续,运行ant编译命令,错误依旧,则执行安装libtool系统工具组件命令:[root@localhost hadoop]# yum -y install libtool
安装成功后继续执行ant安装命令,问题解决。 -
修改fuse配置文件:
[root@localhost fuse-dfs]# vim $HADOOP_HOME/build/contrib/fuse-dfs/fuse_dfs_wrapper.sh
文件内容如下:# # Copyright 2005 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # if [ "$HADOOP_HOME" = "" ]; then export HADOOP_HOME=/usr/local/hadoop fi export PATH=$HADOOP_HOME/contrib/fuse_dfs:$PATH for f in ls $HADOOP_HOME/lib/*.jar $HADOOP_HOME/*.jar ; do export CLASSPATH=$CLASSPATH:$f done if [ "$OS_ARCH" = "" ]; then export OS_ARCH=amd64 fi if [ "$JAVA_HOME" = "" ]; then export JAVA_HOME=/usr/local/jdk6 fi if [ "$LD_LIBRARY_PATH" = "" ]; then export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$OS_ARCH/server:/usr/local/hadoop/build/libhdfs:/usr/local/lib fi ./fuse_dfs $@ ~
将红色标记处修改为自己的路径即可,保存退出 -
设置权限:
chmod +x /data/soft/hadoop-2.20.1/build/contrib/fuse-dfs/fuse_dfs_wrapper.sh chmod +x /data/soft/hadoop-2.20.1/build/contrib/fuse-dfs/fuse_dfs #建立软连接,方便操作 ln -s /data/soft/hadoop-2.20.1/build/contrib/fuse-dfs/fuse_dfs_wrapper.sh /usr/local/bin ln -s /data/soft/hadoop-2.20.1/build/contrib/fuse-dfs/fuse_dfs /usr/local/bin/ #创建mount目录 mkdir /mnt/dfs
-
手动挂载hdfs系统到本地的/mnt/dfs:
[root@localhost fuse-dfs]# ./fuse_dfs_wrapper.sh dfs://192.168.170.248:9000 /mnt/dfs port=9000,server=192.168.170.248 fuse-dfs didn't recognize /mnt/dfs,-2
出现错误 fuse-dfs didn't recognize /dfs,-2 不影响使用 -
加入到开机启动项:
vi /etc/fstab fuse_dfs_wrapper.sh dfs://192.168.1.11:54310 /mnt/dfs fuse rw,auto 0 0
-
上传文件到hdfs系统:
[hadoop@localhost ~]$ hadoop fs -mkdir test [hadoop@localhost data]$ hadoop fs -put /usr/local/hadoop/data/input* test
-
查看本地挂载目录内容:
[root@localhost fuse-dfs]# ll /mnt/dfs/
后语:本次安装fuse还算顺利,本文编写文章按照安装次序编排,根据个人系统环境,个别系统插件工具安装可以跳过
- 浏览: 458332 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (111)
- 数据库 (8)
- java (24)
- BI (1)
- tomcat (3)
- javascript/css (8)
- 服务架构 (1)
- mule (6)
- cas (4)
- mondrian (4)
- webservice (1)
- SOA (3)
- Lucene/HibernateSearch (2)
- Linux (15)
- 操作系统 (3)
- hibernate (2)
- jbpm (1)
- apache (1)
- phpstudy (1)
- hadoop (27)
- hive (7)
- hbase (8)
- svn (1)
- eclipse (3)
- mahout (1)
- mail (1)
- oracle (1)
- mysql (4)
- axis2 (1)
- python (2)
- kafka (1)
- lucene (1)
- nutch (1)
- spark (2)
- idea (2)
- flume (0)
- ubuntu (1)
- pheonix (2)
- drill (2)
- tez (4)
- pig (1)
- tensorflow (1)
最新评论
-
zhangyou1010:
zhangyou1010 写道请教,我执行mount -t n ...
NFS挂载hdfs到本地 -
zhangyou1010:
请教,我执行mount -t nfs -o vers=3,pr ...
NFS挂载hdfs到本地 -
hengfengyiyingdong:
为什么我查出来的hbase数据都是base64编码的? 我保存 ...
apache drill 0.8.0 单机/分布式安装测试 -
107x:
不错,谢谢!
Hive metastore三种存储方式 -
duguyiren3476:
确实不怎么快,httpfs的上传你可以理解为普通的httpup ...
hadoop2.5.2配置httpfs服务
评论
2 楼
duguyiren3476
2014-12-12
用的是hadoop 1.2.X
1 楼
kkgoing
2014-11-12
请问你的是hadoop什么版本啊?我总是在编译hadoop的libhdfs组件的时候报错,编译不成功!还有,现在的hadoop版本比如1.2.1版,是不已经有libhdfs.so,不用自己编译了
发表评论
-
spark运行在yarn上的一个异常
2017-05-03 18:08 9647主机配置内存不足,导致在yarn上运行job异常,下面是s ... -
drill1.0配置hive storage plugin及测试
2015-08-06 10:18 3105drill1.0配置hive storage plugin ... -
tez ui 安装测试
2015-08-04 17:03 3917tez ui 安装测试 标签(空格分隔): 未分类 环 ... -
编译tez 0.7
2015-07-29 16:30 2431tez自己编译0.7 版本,为了测试hadoop2.7.1 ... -
pig on tez测试
2015-06-02 14:16 1475pig on tez测试 pig tez had ... -
hive 小记
2015-06-02 11:41 1025hive 小记 hive hadoop hdf ... -
ambari 安装配置
2015-06-02 11:28 3138测试环境 centos6.5 64bit amb ... -
hive on tez hive运行在tez之上 安装测试
2015-05-26 18:53 15726hive on tez详细配置和运行测试 ... -
hadoop2.5.2配置httpfs服务
2015-05-08 12:58 7850hadoop2.5.2配置httpfs服务 h ... -
NFS挂载hdfs到本地
2015-05-07 18:34 16298NFS挂载hdfs到本地 nfs hdfs n ... -
apache drill 0.8.0 单机/分布式安装测试
2015-04-16 16:57 4454apache drill 0.8.0 安装测试 ... -
测试hbase预设分区
2015-04-07 20:06 1002测试hbase预设分区 phonex-4.3 ... -
Phoenix设置时间戳
2015-04-07 19:13 9355Phoenix设置时间戳 phonex-4.3 ... -
eclipse远程连接hadoop进行开发测试
2015-03-27 18:17 8502eclipse远程连接hadoop进行开发测试 马克 ... -
hadoop2.x jobhistoryserver 配置
2015-02-11 10:28 5317hadoop2.x jobhistoryserve ... -
hadoop balancer
2015-01-14 15:38 2599hadoop balancer 设置同步带宽 ... -
hadoop second namenode异常 Inconsistent checkpoint fields
2015-01-14 15:25 2445hadoop second namenode异常 Inc ... -
Hadoop2本地库和系统库版本不一致 解决方案
2014-12-21 19:29 0Hadoop2本地库和系统库版本不一致 解决方案 在 ... -
基于hadoop源码开发环境搭建
2013-04-23 13:42 1915基于hadoop源码开发环境搭建 在开发hadoo ... -
hadoop 在win系统中的eclipse开发测试问题及解决
2013-04-07 17:22 5095hadoop 在win系统中的eclipse开发测试问题及解 ...
相关推荐
使用协议缓冲区直接为FUSE和HDFS连接Linux内核(不需要JavaVM) 针对吞吐量密集型工作负载进行了设计和优化(在可能的情况下,将吞吐量交换为延迟) 完整的流媒体和自动预读支持 并发操作 内存中元数据缓存(非常...
go-mtpfs, 通过FUSE挂载MTP设备 简介go mtpfs是一个简单的FUSE 文件系统,用于将Android设备作为MTP设备安装。它将在挂载中公开设备的所有存储区域,并且只根据需要读取文件元数据,使它的快速挂载。 它使用Android...
本文仅针对Fuse(熔断器)选型,PPTC&CPTC及其他过流保护装置或电路不在其列。针对Fuse设计选型相关基础知识介绍及选型参考标准、选型方法介绍等内容。
centos 挂载ntfs所需要的步骤 我就是在挂载2TB的时候发现的 linux挂载NTFS分区移动硬盘2010-09-23 16:35CentOS 挂载NTFS分区移动硬盘 1.uname -r 查看当前的linux内核版本. [root@localhost Desktop]# uname -r ...
将新浪云存储的资源通过fuse挂载到本地的文件夹中 安装 yum install fuse.x86_64 fuse-devel.x86_64 pip install fuse-python scs-sdk 修改 online.py中的 scs_accesskey = '你的新浪云存储ak' scs_secretkey = '你...
CDH hadoop-fuse-dfs的安装指导,是我在工作过程中安装步鄹的总结。
linux 下挂载硬盘 fuse 自己找的
##安装curlwwwfs需要Fuse模块,您可以通过以下方式获得openSUSE和SLE的模块: OneClickInstallUI ... 您可以添加&并将其发送到后台。 当您不再需要挂载时,可以使用以下命令将其卸载 fusermount -u mnt
介绍Go-mtpfs是一个简单的FUSE文件系统,用于将Android设备安装为MTP设备。 它将公开安装中设备的所有存储区域,并且仅根据需要读取文件元数据,从而使其快速安装。 它使用Android扩展程序来读取/写入部分数据,因此...
官方的linuxkernel版本到2.6.14才添加了FUSE模块,因此2.4的内核模块下,用户如果要在FUSE中创建一个文件系统,需要先安装一个FUSE内核模块,然后使用FUSE库和API来创建。 FUSE具有的特点如下: 库文件简单 ...
安装脚本:./configure;make; make install 挂载:modprobe fuse 验证:lsmod|grep fuse
Plexdrive允许你将Google Drive账号挂载成fuse文件系统
Linux挂载U盘,安装FUSE,安装NTFS-3G
适用于macOS的Fuse的备用安装方法 如果已点击则可以通过安装用于macOS的保险丝。 要点击“自制酒桶” : brew tap homebrew/cask 要验证上述水龙头是否是brew的一部分: brew tap 在输出中寻找homebrew/cask 。...
硬盘设置成exfat格式,可同时在windows和linux上面同时使用
remoteStorage-fuse-在用户空间中将remoteStorage作为文件系统挂载 这是remoteStorage协议的一种实现,可用于通过常规文件系统访问与remoteStorage兼容的存储服务器上存储的数据。 这项工作仍在进行中,预计以下...
使困惑基于FUSE的文件系统配置器。 指定的“伪造”树下的文件将优先通过FUSE挂载出现在真实树中。用法pip install -r requirements.txt./confused.py /real/path /mount/point /fake/path将文件复制到/ fake / path...
hadoop与fuse集成使用的编译方式。
fuse, 用于实现FUSE文件系统的goto包 这个包允许用户从Go写入和安装用户空间文件系统。 按如下方式安装:go get -u github.com/jacobsa/fuse之后,请参阅以下三个软件包的文档:包 fuse插件提供了对挂载新文件系统
linux下挂载ntfs硬盘所需软件fuse-2.7.4.tar.gz及ntfs-3g-2009.4.4.gz