64位的CentOS上编译 Hadoop 2.2.0
程序员文章站
2022-05-31 11:38:20
...
[b]编译需要安装的软件:[/b]
[b]1. 下载Hadoop 2.2.0 源码包,并解压[/b]
[b]2. 安装下面的软件[/b]
[b]3. 安装Maven[/b]
[b]4. 安装protobuf[/b]
[color=red]编译Hadoop 2.2.0,需要protobuf的编译器protoc。一定需要protobuf 2.5.0以上,yum里的是2.3,下载源码,编译安装。[/color]
[b]5. 给Hadoop源码打一个patch[/b]
#让设置生效
[color=red][b]source ~/.bashrc[/b][/color]
[b]6. 编译 Hadoop[/b]
[b]7. 替换掉32位的native库[/b]
用 hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/lib/native 替换掉 hadoop-2.2.0/lib/native
1.yum install svn
2.yum install autoconfautomake libtool cmake
3.yum install ncurses-devel
4.yum install openssl-devel
5.yum install gcc*
6.wget http://mirror.esocc.com/apache/maven/maven-3/3.1.4/binaries/apache-maven-3.1.4-bin.tar.gz
7.wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
$ tar zxf protobuf-2.5.0.tar.gz
[b]1. 下载Hadoop 2.2.0 源码包,并解压[/b]
$ wget http://mirrors.hust.edu.cn/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz
$ tar zxf hadoop-2.2.0-src.tar.gz
[b]2. 安装下面的软件[/b]
$ sudo yum install cmake lzo-devel zlib-devel gcc autoconf automake libtool ncurses-devel openssl-deve glibc-headers gcc-c++
[b]3. 安装Maven[/b]
$ wget http://mirror.esocc.com/apache/maven/maven-3/3.1.4/binaries/apache-maven-3.1.4-bin.tar.gz
$ tar zxf apache-maven-3.1.4-bin.tar.gz -C /opt
$ vi ~/.bashrc
export MAVEN_HOME=/opt/apache-maven-3.1.4
export PATH=$PATH:$MAVEN_HOME/bin
[b]4. 安装protobuf[/b]
[color=red]编译Hadoop 2.2.0,需要protobuf的编译器protoc。一定需要protobuf 2.5.0以上,yum里的是2.3,下载源码,编译安装。[/color]
$ wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
$ tar zxf protobuf-2.5.0.tar.gz
$ cd protobuf-2.5.0
$ ./configure
$ make
$ make install
[b]5. 给Hadoop源码打一个patch[/b]
cd /opt/program/hadoop-2.2.0-src
wget https://issues.apache.org/jira/secure/attachment/12614482/HADOOP-10110.patch; patch -p0 < HADOOP-10110.patch
#让设置生效
[color=red][b]source ~/.bashrc[/b][/color]
[b]6. 编译 Hadoop[/b]
cd hadoop-2.2.0-src
mvn package -DskipTests -Pdist,native -Dtar
[b]7. 替换掉32位的native库[/b]
用 hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/lib/native 替换掉 hadoop-2.2.0/lib/native
rm -rf ~/local/opt/hadoop-2.2.0/lib/native
cp ./hadoop-dist/target/hadoop-2.2.0/lib/native ~/local/opt/hadoop-2.2.0/lib/
上一篇: iOS 错误记录
下一篇: 在CentOS上使用离线YUM安装软件包
推荐阅读
-
CentOS 6.5上编译安装Apache服务器的方法(最小化安装)
-
最小化安装的centos7.5上编译安装git2.19
-
Hadoop2.7.3在centos7上的单机版安装部署
-
在CentOS上以源码编译的方式安装Greenplum数据库
-
CentOS 6.5上编译安装Apache服务器的方法(最小化安装)
-
CentOS 7.1上使用Systemd管理编译安装的MySQL 5.6
-
一个centos7上全自动互动式编译nginx的脚本
-
64位的CentOS上编译 Hadoop 2.2.0
-
64位CentOS上编译 Hadoop 2.2.0
-
最小化安装的centos7.5上编译安装git2.19