日期:2014-05-16 浏览次数:20854 次
1、软件下载
hdfs-webdav.war
http://code.google.com/p/hdfs-webdav/downloads/list
把war包放到tomcat下面,启动tomcat会自动解压该war包,在/usr/tomcat6/webapps/hdfs-webdav/linux_mount_lib/目录下有fuse-2.7.4.tar.gz和neon-0.28.3.tar.gz,所以下面的包也可以不用下载
?
neon
http://www.webdav.org/neon/neon-0.29.6.tar.gz
fuse
http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.7/
2、软件安装
yum install gcc
yum install libxml*
tar -zxvf neon-0.28.3.tar.gz
cd /usr/tomcat6/webapps/hdfs-webdav/linux_mount_lib/neon-0.28.3
./configure
make
make install
?
cd ..
tar zxvf davfs2-1.3.3.tar.gz
cd davfs2-1.3.3
./configure
make
make install
?
cd ..
tar zxvf fuse-2.7.4.tar.gz
cd fuse-2.7.4
./configure
make
make install
vim /usr/tomcat6/webapps/hdfs-webdav/WEB-INF/classes/hadoop-site.xml
?<property>
?? <name>fs.default.name</name>
?? <value>hdfs://10.0.30.235:9000/</value>
?? <description>namenode</description>
?</property>
?
scp 10.0.30.151:/download/hadoop-0.20.203.0/hadoop-core-0.20.203.0.jar /usr/tomcat6/webapps/hdfs-webdav/WEB-INF/lib/
并删除掉lib目录下旧的hadoop jar包
?
scp 10.0.30.151:/download/hadoop-0.20.203.0/lib/commons-configuration-1.6.jar /usr/tomcat6/webapps/hdfs-webdav/WEB-INF/lib
?
启动hadoop集群
?
启动tomcat
访问http://113.105.131.240/hdfs-webdav
?
在tomcat服务器上创建一下信息
mkdir /download/hdfs
groupadd davfs2
useradd -g davfs2 davfs2
mount -t davfs http://10.0.30.151/hdfs-webdav /download/hdfs
cd /download/hdfs
ls
?
至此,扩展hadoop hdfs,实现WebDav协议,并将hdfs mount为linux本地文件系统成功!