Using Apache Tomcat and Hdfs-webdav.war for HDFs and Linux FS interaction

Source: Internet
Author: User

Need to prepare 2 files
Apache-tomcat-5.5.25.zip (recommended to use TOMCAT6)
Hdfs-webdav.war

Unzip Tomcat
# Unzip Apache-tomcat-5.5.25.zip

Copy War to WebApps
# CD apache-tomcat-5.5.25
# Cp/soft/hdfs-webdav.war./webapps

Start Tomcat to start deployment and unzip
# CD Bin
# chmod 777 Startup.sh
#./startup.sh

# CD./hdfs-webdav/linux_mount_lib

# TAR-XZVF Neon-0.28.3.tar.gz

# CD neon-0.28.3
Configuration
#./configure
Compile
#./make
If make: * * does not indicate the target and cannot find make, indicating that GCC is not installed, you need to install the installation using the following command
Mount the optical drive and install
# Mkdir/cdrom
# Mount/dev/cdrom0/cdrom
# Cd/cdrom/server
# RPM-IVH GCC
# RPM-IVH libxml*

Installation
#./make Install

Follow the steps above to compile and install the following two packages
# TAR-XZVF Fuse-2.7.4.tar.gz

#./configure && make && make install

# TAR-XZVF Davfs2-1.3.3.tar. Gz

#./configure && make && make install


# CD Web-info
# CD Classes
# VI Hadoop-site.xml

<  Property >
    < name >fs.default.name</name>
    < value >hdfs://test1:9000</value>
    < Description >namenode</description>
</  Property >

# CD: /lib
Copy the relevant jar package and remove the old version
# Cp/soft/hadoop-0.20.2/hadoop-0.20.2-core.jar./
# MV Hadoop-0.18.1-core.jar Hadoop-0.18.1-core.jar.bak


# cd/soft/hadoop-0.20.2/bin/
#./stop-all.sh
#./start-all.sh

Modify the Tomcat service port to 80
# cd/soft/apache-tomcat-5.5.25/conf
# VI Server.xml

# Cd/soft/apache-tomcat-5.5.25/bin
#./shutdown.sh
#./startup.sh

Access Http://ip:port/hdfs-webdav access to HDFs file system after startup
Can be directly mounted to Linux for seamless operation, the following steps:
# mkdir-p/download/hadoop
# Groupadd DAVFS2
# useradd-g DAVFS2 DAVFS2
# password DAVFS2

Davfs2
# mount-t Davfs Http://ip:port/hdfs_webdav /download/hadoop
Enter the above established user and password, mount is successful, then you can normally operate the HDFs file under the Linux system

# Cd/download/hadoop
# ls

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.