1,Hadoop 主节点搭建安装
主节点
教程所有的环境都在 /app 目录下, 需要自己创建
百度云下载
链接:https://pan.baidu.com/s/1zjxkeMzRroLvectx0WyLUw
提取码:c1ev
apache-ant-1.9.15-bin.tar.gz
apache-maven-3.6.3-bin.tar.gz
findbugs-3.0.1.zip
hadoop-2.7.5-src.tar.gz
jdk-8u221-linux-x64.tar.gz
protobuf-2.5.0.tar.gz
snappy-1.1.3.tar.gz
1,安装程序依赖
yum -y install gcc-c++ build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-devua svn openssl-devel ncurses-devel
2,安装jdk 1.8
mkdir /app/jdk8
cd /app/jdk8
tar -zxvf jdk-8u221-linux-x64.tar.gz
vi /etc/profile
# JAVA
export JAVA_HOME=/app/jdk8/jdk1.8.0_221
export PATH=$PATH:$JAVA_HOME/bin
# 配置生效
source /etc/profile
# 测试
java
3,安装maven
mkdir /app/maven
cd /app/maven
tar -zxvf apache-maven-3.6.3-bin.tar.gz
vi /etc/profile
# MAVEN
export MAVEN_HOME=/app/maven/apache-maven-3.6.3
export PATH=$PATH:$MAVEN_HOME/bin
# 配置生效
source /etc/profile
# 测试
mvn -v
4,安装findbugs
mkdir /app/findbugs
cd /app/findbugs
unzip findbugs-3.0.1.zip
vi /etc/profile
# FINDBUGS
export FINDBUGS_HOME=/app/findbugs/findbugs-3.0.1
export PATH=$PATH:$FINDBUGS_HOME/bin
# 配置生效
source /etc/profile
# 测试
findbugs -version
5, 安装protobuf
mkdir /app/proto
cd /app/proto
tar -zxvf protobuf-2.5.0.tar.gz
# 编译
cd protobuf-2.5.0
./configure
make
make install
# 测试
protoc --version
6,安装ant
mkdir /app/ant
cd /app/ant/
tar -zxvf apache-ant-1.9.15-bin.tar.gz
# 配置环境
vi /etc/profile
# ANT
export ANT_HOME=/app/ant/apache-ant-1.9.15
export PATH=$PATH:$ANT_HOME/bin
# 配置生效
source /etc/profile
# 测试
ant -version
7,安装snappy
mkdir /app/snappy
cd /app/snappy/
# 解压
tar -zxvf snappy-1.1.3.tar.gz
# 编译安装
cd snappy-1.1.3
./configure
make && make install
# 测试
ls -lh /usr/local/lib | grep snappy
8,安装hadoop
mkdir /app/hadoop
cd /app/hadoop/
tar -zxvf hadoop-2.7.5-src.tar.gz
# 编译
cd hadoop-2.7.5-src
export MAVEN_OPTS="-Xms256m -Xmx512m"
# 提前切换maven 镜像为阿里云会快些
# 不出教程怎么替换阿里云镜像了, 跳过, 鄙人配置的阿里云, 有一个jar包下载不来 = _ =!!
# maven 打包
mvn package -Pdist,native,docs -DskipTests -Dtar
# 出现 Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs
# 用下面这个命令
mvn clean package -Pdist,native -DskipTests -Dtar -Dsnappy.lib=/usr/local/lib -Dbundle.snappy -Drequire.openssl