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

相关推荐

  • centos系统中VPS忘记密码该如何解决

    问题描述在CentOS系统中,VPS忘记密码是一个常见的问题,这种情况下,用户可能无法登录到VPS,也就无法进行必要的操作,如重启、关闭等,如何解决这个问题呢?本文将详细介绍如何在CentOS系统中重置VPS的密码。技术介绍在CentOS系统中,我们可以通过以下步骤来重置VPS的密码:1、我们需要通过SSH连接到我们的VPS,我们可以……

    2023-12-22
    0123
  • 博客搭建用什么云服务器好「博客搭建用什么云服务器好用」

    博客搭建用什么云服务器好?随着互联网的发展,越来越多的人开始关注个人博客的建设,而搭建一个博客,首先需要的就是一台云服务器,博客搭建用什么云服务器好呢?本文将从多个方面为大家推荐几款适合搭建博客的云服务器。一、阿里云ECS阿里云ECS(Elastic Compute Service)是阿里巴巴旗下的一款云服务器产品,具有性能稳定、安全……

    2023-11-20
    0137
  • 山东vps主机租用怎么搭建

    山东vps主机租用搭建技术教程在当今互联网时代,拥有一个稳定、高效的服务器对于网站运营和数据存储至关重要,而VPS主机作为一种虚拟私有服务器,具有独立IP地址、资源隔离等特点,成为许多用户的首选,本文将详细介绍如何搭建山东VPS主机租用,帮助读者快速搭建自己的服务器环境。一、选择可靠的VPS提供商在选择VPS提供商时,需要考虑以下几个……

    2023-12-02
    0136
  • DevOps如何提供可靠的测试环境和生产环境?

    一、DevOps如何提供可靠的测试环境和生产环境?1、使用容器技术:容器技术如Docker可以帮助我们在开发、测试和生产环境中提供一致的环境,通过将应用程序及其依赖项打包到一个可移植的容器中,我们可以在不同的环境中轻松地部署和运行应用程序。2、持续集成/持续部署(CI/CD):CI/CD是一种自动化的软件开发过程,它包括构建、测试和部……

    2023-12-12
    0173
  • linux创建用户并设置密码但密码不匹配

    在Linux系统中,创建用户并设置密码是管理员的基本操作之一,本文将详细介绍如何在Linux系统中创建用户并设置密码。1. 创建用户在Linux系统中,可以使用`useradd`命令来创建新用户,要创建一个名为`testuser`的新用户,可以执行以下命令:sudo useradd testuser2. 设置密码创建新用户后,需要为其……

    2023-12-03
    0652
  • CentOS6.4系统中Mysql数据库的卸载、安装与配置教程

    Mysql数据库的卸载在CentOS 6.4系统中,卸载MySQL数据库需要执行以下步骤:1、停止MySQL服务,在终端中输入以下命令:sudo service mysqld stop2、使用yum命令卸载MySQL,在终端中输入以下命令:sudo yum remove mysql mysql-server3、删除MySQL相关的配置……

    2023-12-19
    0119

发表回复

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

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