1. 安装jdk, 直接apt get openjdk-7-jdk
2. 安装openssl ,直接apt get openssl
3. 安装maven,直接apt get maven
4. 安装protobuf
tar -zxf protobuf-2.5.0.tar.gz
cd protobuf-2.5.0
./configure --prefix=/usr/local/
上面命令可能会出错,根据打印的log,到对应的地方查看log,发现c++环境没有完成,因此apt get g++
再次尝试上面的命令
make && make install
export PATH= /usr/local/protobuf/bin:$PATH
protoc --version
# vim /etc/ld.so.conf
/usr/local/protobuf/lib
# /sbin/ldconfig
5. 安装cmake ,直接apt get cmake
6. 安装ncurses
ncurses-5.9.tar.gz
解压后进入
./configure --prefix=/usr/local
make && make install
# /sbin/ldconfig
7. 下载hadoo的src包
maven源设置【在<mirrors></mirros>里添加】
# vim /usr/local/maven/conf/settings.xml
<
mirror
>
<
id
>nexus-osc</
id
>
<
mirrorOf
>*</
mirrorOf
>
<
name
>Nexusosc</
name
>
<
url
>http://maven.oschina.net/content/groups/public/</
url
>
</
mirror
>
8.
进入hadoop src目录
mvn clean package -Pdist,native -DskipTests -Dtar
二进制包路径
hadoop-dist/target/
期间可能遇到错误
例如
Unknown lifecycle phase "–Pdist,native"
这种错误可能是step8中命令的格式不对,含有中文字符
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
安装apt get install libssh-dev