JDK,Eclipse的安装请参考:Ubuntu 安装 搭建 J2EE 开发环境
Ant安装:
下载ant:http://ant.apache.org/bindownload.cgi
解压Ant:
tar -xvzf apache-ant-1.9.2-bin.tar.gz
移动重命名:
mv apache-ant-1.9.2/ ~/opt/
mv apache-ant-1.9.2/ ant
配置环境变量,添加ANT_HOME,和$ANT_HOME/bin:
sudo vim /etc/profile
.......................
export ANT_HOME=/opt/ant
export PATH=$PATH:$ANT_HOME/bin
.......................
source /etc/profile
测试是否生效:
ant -version
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Hadoop Eclipse 插件安装:
Hadoop的eclipse插件需要自行安装编译,也很简单,用ant进行编译打包
cd /opt/hadoop-1.2.1/src/contrib/eclipse-plugin
参考这篇文章:http://qindongliang1922.iteye.com/blog/1972641
此处贴出build.xml全部和META-INFO改动的:
build.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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