首页 > 代码库 > CentOS 6.5 编译Eclipse plugin for hadoop 2.5及加载连接
CentOS 6.5 编译Eclipse plugin for hadoop 2.5及加载连接
1. rpm -ivh jdk-7u67-linux-x64.rpm
cd /opt
tar zxf /root/hadoop-2.2.0.tar.gz
tar zxf /root/apache-ant-1.9.4-bin.tar.gz
tar zxf /root/apache-maven-3.2.3-bin.tar.gz
tar zxf /root/eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz
unzip -x /root/hadoop2x-eclipse-plugin-master.zip (https://github.com/winghc/hadoop2x-eclipse-plugin)
ln -s apache-ant-1.9.4 ant
ln -s apache-maven-3.2.3 maven
ln -s hadoop-2.2.0 hadoop
2. echo ‘export JAVA_HOME=/usr/java/default‘ >> /etc/profile
echo ‘export HADOOP_HOME=/opt/hadoop‘ >> /etc/profile
echo ‘export ANT_HOME=/opt/ant‘ >> /etc/profile
echo ‘export MAVEN_HOME=/opt/maven‘ >> /etc/profile
echo ‘export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$HADOOP_HOME/bin:$PATH‘ >> /etc/profile
source /etc/profile
3. cp /root/ivy-2.1.0.jar /opt/hadoop2x-eclipse-plugin-master/ivy/
cd /opt/hadoop2x-eclipse-plugin-master/src/contrib/eclipse-plugin
ant jar -Dversion=2.5.0 -Declipse.home=/opt/eclipse -Dhadoop.home=/opt/hadoop
cp /opt/hadoop2x-eclipse-plugin-master/build/contrib/eclipse-plugin/hadoop-eclipse-plugin-2.5.0.jar /opt/eclipse/plugins/
4. run eclipse: /opt/eclipse/eclipse
连接hadoop环境为:CDH 5.2 on a Single Linux Node in Pseudo-distributed Mode
5. Windows 7一样可使用这个hadoop-eclipse-plugin-2.5.0.jar
ok
本文出自 “Ilovecat(个人笔记)” 博客,请务必保留此出处http://hj192837.blog.51cto.com/655995/1576073
CentOS 6.5 编译Eclipse plugin for hadoop 2.5及加载连接