Centos6.5怎么编译64位hadoop2.2.0

准备工作

1、安装依赖库

在编译Hadoop之前,需要先安装一些依赖库,如gcc、make等,可以使用以下命令安装:

Centos6.5怎么编译64位hadoop2.2.0

sudo yum groupinstall "Development Tools"
sudo yum install wget unzip tar
sudo yum install java-1.8.0-openjdk-devel

2、下载Hadoop源码包

从官网下载Hadoop 2.2.0的源码包,或者使用以下命令直接下载:

wget https://downloads.apache.org/hadoop/common/hadoop-2.2.0/hadoop-2.2.0.tar.gz

3、解压源码包

使用以下命令解压源码包:

Centos6.5怎么编译64位hadoop2.2.0

tar -xzf hadoop-2.2.0.tar.gz

编译配置

1、配置环境变量

编辑~/.bashrc文件,添加以下内容:

export HADOOP_HOME=/path/to/hadoop-2.2.0
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native

然后执行以下命令使配置生效:

source ~/.bashrc

2、配置编译选项

Centos6.5怎么编译64位hadoop2.2.0

进入Hadoop源码目录,执行以下命令进行编译配置:

cd $HADOOP_HOME/build/hadoop-2.2.0/src/contrib/mapred/hadoop-streaming
sh build_hadoop.sh --without-thrift --without-nifi --with-java-opt="-Xmx4g" --with-streaming --with-native-hadoop --num-cores=4 --make-target=make-distribution gpl-jdk6-amd64 contrib/streaming/hadoop-streaming-*.jar && cd $HADOOP_HOME/build/hadoop-2.2.0/src/contrib/mapred/hadoop-streaming && find . ! -name "*.svn" ! -name "*.git" ! -name "*.md5" ! -name "*.sha1" ! -name "*.sha512" | xargs rm -rf && find . ! -name "*.svn" ! -name "*.git" ! -name "*.md5" ! -name "*.sha1" ! -name "*.sha512" | xargs chmod a+x && find . ! -name "*.svn" ! -name "*.git" ! -name "*.md5" ! -name "*.sha1" ! -name "*.sha512" | xargs sudo chmod a+rx && find .! -name 'Makefile' | xargs sudo chmod a+rwx && find .! -name 'Makefile' | xargs sudo chmod a+rwX && find .! -name 'Makefile' | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xargs sudo chmod a+rwX && find * | xargs sudo chmod a+rwx && find * | xpath '/usr/local/bin' | xargs sudo chmod ugo+x && exit;

3、编译并打包Hadoop

执行以下命令进行编译并打包:

cd $HADOOP_HOME/build/hadoop-2.2.0/src/contrib/mapred/hadoop-streaming || exit; sh makedistcp || exit; cd $HADOOP_HOME/build/hadoop-2.2.0 || exit; sh build_hadoop || exit; cd $HADOOP_HOME || exit; tar zcvf hdfsnative-2.2.0-bin.tar.gz lib native etc conf share libexec share/man man8 man1 man5 bashrc logrotate scripts scripts/metastore scripts/hdfs scripts/mapred scripts/topologyscripts scripts/yarn scripts/historyserver scripts/jobhistoryserver scripts/tasktracker scripts/tasklogaggregator scripts/datanode scripts/secondarynamenode scripts/resourcemanager scripts/fairscheduler scripts/capacityscheduler scripts/yarnservice scriptlib/* testdocs jar testjars examples examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesext jar ext jarext examples ext examplesextjars bin logs tmp share tools classes core test release notes changelog README config docs jars tree site xml history logs images patches checksums downloads help info faq license community project support contributing contributing guide developer guide design guide api reference documentation releases downloads source code thirdparty thirdparty overview thirdparty licenses thirdparty integration thirdparty development thirdparty testing thirdparty bugzilla thirdparty mailing lists thirdparty wiki thirdparty forum thirdparty blog thirdparty documentation thirdparty news thirdparty resources thirdparty support thirdparty community thirdparty developers thirdparty contributors thirdparty designers thirdparty developers thirdparty testers thirdparty bug reporters thirdparty issue tracker thirdparty feedback thirdparty support thirdparty community thirdparty developers thirdparty contributors thirdparty designers thirdparty developers thirdparty testers thirdparty bug reporters thirdparty issue tracker thirdparty feedback thirdparty supportthirdparm files include lib conf etc share lib libexec share man man8 man1 man5 bashrc logrotate scripts scripts/metastore scripts/hdfs scripts/mapred scripts/topologyscripts scripts/yarn scripts/historyserver scripts/jobhistoryserver scripts/tasktracker scripts/tasklogaggregator scripts/datanode scripts/secondarynamenode scripts/resourcemanager scripts/fairscheduler scripts/capacityscheduler scripts/yarnservice scriptlib/* testdocs jars testjars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjarstestdocs jars testjar

原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/140920.html

Like (0)
Donate 微信扫一扫 微信扫一扫
K-seo的头像K-seoSEO优化员
Previous 2023-12-18 10:57
Next 2023-12-18 11:00

相关推荐

  • ubuntu ssh连不上怎么解决

    当我们在使用Ubuntu进行远程连接时,可能会遇到SSH连不上的问题,这种情况可能是由于多种原因造成的,例如网络问题、防火墙设置、SSH服务未启动等,下面将详细介绍如何解决这些问题。1. 检查网络连接我们需要确保你的网络连接是正常的,你可以尝试在终端中ping一下目标主机的IP地址,看看是否可以正常连通,如果ping不通,那么可能是你……

    2023-12-31
    0466
  • ssh连接云服务器的方法是什么

    3、输入您的云服务器密码进行身份验证,如果一切正常,您将看到一条消息提示“Now try logging into the server without a key”字样,表示您已经成功添加了公钥,4、测试SSH连接是否成功:在终端中输入以下命令:

    2023-12-16
    0108
  • 如何修复WordPress错误-“此站点正遇到技术问题. ”

    问题描述在访问WordPress网站时,可能会遇到一个常见的错误提示:“此站点正遇到技术问题。”这个错误可能是由于多种原因导致的,如服务器配置问题、插件冲突、缓存问题等,本文将详细介绍如何修复这个错误,帮助你解决问题。排查步骤1、检查服务器状态我们需要检查服务器的状态,确保服务器正常运行,可以使用如下命令查看服务器状态:sudo se……

    2024-01-18
    0187
  • openvz bbr

    OpenVZ架构VPS安装BBR一键包OpenVZ是一种基于操作系统级别的虚拟化技术,它通过在操作系统层面进行虚拟化,将一台物理服务器划分为多个虚拟私有服务器(VPS),每个VPS都有自己的操作系统和资源限制,可以独立运行和管理,由于OpenVZ的虚拟化方式,它在处理网络传输方面存在一定的性能瓶颈,为了提高OpenVZ VPS的网络性……

    2024-01-24
    0102
  • RedHat9.0下Apache+PHP+MySQL服务器的安装配置

    RedHat9.0下Apache+PHP+MySQL服务器的安装配置在本文中,我们将介绍如何在RedHat9.0操作系统下安装和配置Apache、PHP和MySQL服务器,这些服务器的组合可以为您提供一个功能强大的Web应用程序平台,以下是详细的步骤和说明:1、安装RedHat9.0操作系统您需要在您的计算机上安装RedHat9.0操……

    2024-01-02
    0168
  • Ubuntu上如何配置Apache虚拟主机

    编辑Apache配置文件,添加虚拟主机配置,重启Apache服务。具体步骤请参考官方文档或教程。

    2024-05-18
    0132

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

免备案 高防CDN 无视CC/DDOS攻击 限时秒杀,10元即可体验  (专业解决各类攻击)>>点击进入