标签:依赖 avr 3.1 序列 src 服务 evel 故障 ice
Apache?Hadoop?项目开发了用于可靠,可扩展的分布式计算的开源软件。
Apache Hadoop软件库是一个框架,允许使用简单的编程模型跨计算机集群分布式处理大型数据集。它旨在从单个服务器扩展到数千台计算机,每台计算机都提供本地计算和存储。库本身不是依靠硬件来提供高可用性,而是设计用于检测和处理应用程序层的故障,从而在计算机集群之上提供高可用性服务,每个计算机都可能容易出现故障。
该项目包括以下模块:
Apache的其他Hadoop相关项目包括:
上传下载好的包
[root@localhost opt]# mkdir /opt/software /opt/sourcecode [root@localhost opt]# ll 总用量 0 drwxr-xr-x. 2 root root 6 9月 7 2017 rh drwxr-xr-x. 2 root root 6 8月 1 18:44 software drwxr-xr-x. 2 root root 6 8月 1 18:44 sourcecode [root@localhost opt]# cd /opt/sourcecode/[root@localhost sourcecode]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
100% 33714 KB 16857 KB/s 00:00:02 0 Errors
[root@localhost sourcecode]#
解压文件并查看:
[root@localhost sourcecode]# tar -xzvf hadoop-2.8.1-src.tar.gz
。。。。。。##此处省略一大片
[root@localhost sourcecode]# ll
总用量 33720
drwxr-xr-x. 17 root root 4096 6月 2 2017 hadoop-2.8.1-src
-rw-r--r--. 1 root root 34523353 8月 1 17:47 hadoop-2.8.1-src.tar.gz
[root@localhost sourcecode]#
查看要求文档:
[root@localhost sourcecode]# cd hadoop-2.8.1-src [root@localhost hadoop-2.8.1-src]# ll 总用量 164 -rw-rw-r--. 1 root root 15623 5月 24 2017 BUILDING.txt //要求文档 drwxr-xr-x. 4 root root 137 8月 1 18:51 dev-support drwxr-xr-x. 3 root root 32 8月 1 18:51 hadoop-assemblies drwxr-xr-x. 3 root root 32 8月 1 18:51 hadoop-build-tools drwxrwxr-x. 2 root root 21 8月 1 18:51 hadoop-client drwxr-xr-x. 10 root root 192 8月 1 18:51 hadoop-common-project drwxr-xr-x. 2 root root 21 8月 1 18:51 hadoop-dist drwxr-xr-x. 8 root root 167 8月 1 18:51 hadoop-hdfs-project drwxr-xr-x. 9 root root 164 8月 1 18:51 hadoop-mapreduce-project drwxr-xr-x. 3 root root 32 8月 1 18:51 hadoop-maven-plugins drwxr-xr-x. 2 root root 21 8月 1 18:51 hadoop-minicluster drwxr-xr-x. 3 root root 32 8月 1 18:51 hadoop-project drwxr-xr-x. 2 root root 39 8月 1 18:51 hadoop-project-dist drwxr-xr-x. 18 root root 4096 8月 1 18:51 hadoop-tools drwxr-xr-x. 3 root root 40 8月 1 18:51 hadoop-yarn-project -rw-rw-r--. 1 root root 99253 5月 24 2017 LICENSE.txt -rw-rw-r--. 1 root root 15915 5月 24 2017 NOTICE.txt drwxrwxr-x. 2 root root 6 6月 2 2017 patchprocess -rw-rw-r--. 1 root root 20477 5月 29 2017 pom.xml -rw-r--r--. 1 root root 1366 5月 20 2017 README.txt -rwxrwxr-x. 1 root root 1841 5月 24 2017 start-build-env.sh [root@localhost hadoop-2.8.1-src]#
查看要求文档
Building on Windows ---------------------------------------------------------------------------------- Requirements: * Windows System * JDK 1.7+ * Maven 3.0 or later * Findbugs 1.3.9 (if running findbugs) * ProtocolBuffer 2.5.0 * CMake 2.6 or newer * Windows SDK 7.1 or Visual Studio 2010 Professional * Windows SDK 8.1 (if building CPU rate control for the container executor) * zlib headers (if building native code bindings for zlib) * Internet connection for first build (to fetch all Maven and Hadoop dependencies)
接下来安装java:
[root@localhost usr]# mkdir -p /usr/java
[root@localhost usr]# cd /usr/java
[root@localhost java]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
100% 169210 KB 28201 KB/s 00:00:06 0 Errors
[root@localhost java]# tar -xzvf jdk-8u45-linux-x64.gz
解压后查看:
[root@localhost java]# ll
总用量 169212
drwxr-xr-x. 8 10 143 255 4月 11 2015 jdk1.8.0_45
-rw-r--r--. 1 root root 173271626 8月 1 17:21 jdk-8u45-linux-x64.gz
[root@localhost java]#
修改用户用户组:
[root@localhost java]# ll 总用量 169212 drwxr-xr-x. 8 10 143 255 4月 11 2015 jdk1.8.0_45 -rw-r--r--. 1 root root 173271626 8月 1 17:21 jdk-8u45-linux-x64.gz [root@localhost java]# chown -R root:root jdk1.8.0_45 [root@localhost java]# ll 总用量 169212 drwxr-xr-x. 8 root root 255 4月 11 2015 jdk1.8.0_45 -rw-r--r--. 1 root root 173271626 8月 1 17:21 jdk-8u45-linux-x64.gz [root@localhost java]#
配置环境变量:
[root@localhost java]# vi /etc/profile
追加如下内容:
export JAVA_HOME=/usr/java/jdk1.8.0_45
export PATH=$JAVA_HOME/bin:$PATH
配置完以后wq保存退出,修改完配置文件要生效,接下来生效配置文件,并且查看java位置以及版本
[root@localhost java]# source /etc/profile [root@localhost java]# which java /usr/java/jdk1.8.0_45/bin/java [root@localhost java]# java -version java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) [root@localhost java]#
接下来安装需求文档上传maven解压:
[root@localhost java]# cd /opt/software/ [root@localhost software]# rz rz waiting to receive. Starting zmodem transfer. Press Ctrl+C to cancel. 100% 8415 KB 8415 KB/s 00:00:01 0 Errors [root@localhost software]# ll 总用量 8416 -rw-r--r--. 1 root root 8617253 8月 1 17:44 apache-maven-3.3.9-bin.zip [root@localhost software]# unzip apache-maven-3.3.9-bin.zip Archive: apache-maven-3.3.9-bin.zip creating: apache-maven-3.3.9/ creating: apache-maven-3.3.9/boot/ inflating: apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar creating: apache-maven-3.3.9/lib/ inflating: apache-maven-3.3.9/lib/maven-embedder-3.3.9.jar
接下来配置环境变量,生效配置文件,查看版本
[root@localhost software]# vi /etc/profile 添加以下内容 export MAVEN_HOME=/opt/software/apache-maven-3.3.9 export MAVEN_OPTS="-Xms256m -Xmx512m" export PATH=$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH
[root@localhost software]# source /etc/profile [root@localhost software]# mvn -version Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: /opt/software/apache-maven-3.3.9 Java version: 1.8.0_45, vendor: Oracle Corporation Java home: /usr/java/jdk1.8.0_45/jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix" [root@localhost software]#
protobuf的安装
[root@localhost software]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
100% 2345 KB 2345 KB/s 00:00:01 0 Errors
[root@localhost software]# ll
总用量 10764
drwxr-xr-x. 6 root root 99 11月 10 2015 apache-maven-3.3.9
-rw-r--r--. 1 root root 8617253 8月 1 17:44 apache-maven-3.3.9-bin.zip
-rw-r--r--. 1 root root 2401901 8月 1 17:16 protobuf-2.5.0.tar.gz
[root@localhost software]# tar -xzvf protobuf-2.5.0.tar.gz
[root@localhost software]# ll
总用量 10768
drwxr-xr-x. 6 root root 99 11月 10 2015 apache-maven-3.3.9
-rw-r--r--. 1 root root 8617253 8月 1 17:44 apache-maven-3.3.9-bin.zip
drwxr-xr-x. 10 109965 5000 4096 2月 27 2013 protobuf-2.5.0
-rw-r--r--. 1 root root 2401901 8月 1 17:16 protobuf-2.5.0.tar.gz
[root@localhost software]#
安装gcc gcc-c++ cmake
[root@localhost software]# cd protobuf-2.5.0
[root@localhost protobuf-2.5.0]# yum install -y gcc gcc-c++ make cmake
编译安装
[root@localhost protobuf-2.5.0]# ./configure --prefix=/usr/local/protobuf
./configure是编译你的源码文件 --prefix=/usr/local 是指定文件安装目录 [root@localhost protobuf-2.5.0]# make && make install
配置环境变量,生效,查看
[root@localhost protobuf-2.5.0]# vi /etc/profile 添加如下内容 export PROTOC_HOME=/usr/local/protobuf export PATH=$PROTOC_HOME/bin:$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH [root@localhost protobuf-2.5.0]# source /etc/profile [root@localhost protobuf-2.5.0]# protoc --version libprotoc 2.5.0
findbugs安装
[root@localhost software]# rz rz waiting to receive. Starting zmodem transfer. Press Ctrl+C to cancel. 100% 7369 KB 7369 KB/s 00:00:01 0 Errors [root@localhost software]# ll 总用量 18140 drwxr-xr-x. 6 root root 99 11月 10 2015 apache-maven-3.3.9 -rw-r--r--. 1 root root 8617253 8月 1 17:44 apache-maven-3.3.9-bin.zip -rw-r--r--. 1 root root 7546219 8月 1 17:45 findbugs-1.3.9.zip drwxr-xr-x. 10 109965 5000 4096 8月 2 10:24 protobuf-2.5.0 -rw-r--r--. 1 root root 2401901 8月 1 17:16 protobuf-2.5.0.tar.gz [root@localhost software]#
[root@localhost software]# unzip findbugs-1.3.9.zip
环境变量:
[root@localhost software]# vi /etc/profile 添加如下内容 export FINDBUGS_HOME=/opt/software/findbugs-1.3.9 export PATH=$FINDBUGS_HOME/bin:$PROTOC_HOME/bin:$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH [root@localhost software]# source /etc/profile [root@localhost software]# findbugs -version 1.3.9
下载其它依赖
[root@localhost software]#yum install -y openssl openssl-devel svn ncurses-devel zlib-devel libtool
[root@localhost software]#yum install -y snappy snappy-devel bzip2 bzip2-devel lzo lzo-devel lzop autoconf automake
开始编译:
[root@localhost sourcecode]# cd hadoop-2.8.1-src [root@localhost hadoop-2.8.1-src]# mvn clean package -Pdist,native -DskipTests -Dtar
编译好的文件
/opt/sourcecode/hadoop-2.8.1-src/hadoop-dist/target/hadoop-2.8.1.tar.gz
1. 有时候编译过程中出现假死,按ctrl+c,重新运行编译命令。
2. 如果出现缺少了某个文件的情况,则要先清理maven(使用命令 mvn clean) 再重新编译。
标签:依赖 avr 3.1 序列 src 服务 evel 故障 ice
原文地址:https://www.cnblogs.com/pipipi/p/9403415.html