基础环境
- 安装bzip2和依赖
1
2
3
4
5curl -Lks http://www.hop5.in/yum/el6/hop5.repo > /etc/yum.repos.d/hop5.repo
yum -y install wget gcc gcc-c++ bzip2 bzip2-devel zlib zlib-devel openssl-devel curl curl-devel
yum install -y openssl openssl-devel svn ncurses-devel zlib-devel libtool
yum install -y svn ncurses-devel gcc*
yum install -y snappy snappy-devel bzip2 bzip2-devel lzo lzo-devel lzop autoconf automake cmake
protobuf安装
1
2
3
4
5
6
7
8
9
10
11
12
13- 下载protobuf安装包
wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
- 解压
tar -zxvf protobuf-2.5.0.tar.gz
- 安装
cd protobuf-2.5.0
./configure --prefix=/protobuf-2.5.0/
make && make install
- 配置环境变量
echo 'export PATH=/protobuf-2.5.0/bin:$PATH' >> /etc/profile
source /etc/profile
- 检查是否安装成功
protoc --versionmaven安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21- 下载
- 官网:http://maven.apache.org/download.cgi
- wget https://www-eu.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
- 解压
tar -C /usr/local/ -zxf apache-maven-3.6.0-bin.tar.gz
- 配置环境变量
echo 'export MAVEN_HOME=/usr/local/apache-maven-3.6.0' >> /etc/profile
echo 'export PATH=$PATH:$MAVEN_HOME/bin' >> /etc/profile
source /etc/profile
- 验证
mvn -v
- 镜像修改
vim /usr/local/apache-maven-3.6.0/conf/setting/xml
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
Hadoop下载与编译
- 下载
1
2
3
4wget http://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0-src.tar.gz
tar -zxf hadoop-2.6.0-cdh5.7.0-src.tar.gz
cd hadoop-2.6.0-cdh5.7.0-src
mvn clean package -Pdist,native -DskipTests -Dtar