- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[Hadoop]1 单节点Hadoop安装
装备软件CentOS 6.5 jdk-8u91-linux-x64.tar.gzhadoop-3.0.0-alpha1.tar.gz参考文档/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html步骤1、安装JDK 8解压mkdir/usr/java?cd?/usr/javatar?-zxvf?jdk-8u91-linux-x64.tar.gz配置环境变量JAVA_HOME=/usr/java/jdk1.8.0_79JRE_HOME=$JAVA_HOME/jreCLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libPATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binexport?JAVA_HOME?JRE_HOME?CLASS_PATH?PATH让修改生效source?/etc/profile2、安装Hadoop解压tar -zxvf hadoop-3.0.0-alpha1.tar.gz修改配置文件etc/hadoop/hadoop-env.shexport JAVA_HOME=/usr/java/jdk1.8.0_79Standalone OperationBy default, Hadoop is configured to run in a non-distributed mode, as a single Java process. This is useful for debugging.The following example copies the unpacked conf directory to use as input and then finds and displays every match of the given regular expression. Output is written to the given output directory. $ mkdir input $ cp etc/hadoop/*.xml input $ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.0.0-alpha1.jar grep input output dfs[a-z.]+ $ cat output/*Pseudo-Distributed OperationHadoop can also be run on a single-node in a pseudo-distributed mode where each Hadoop daemon runs in a separate Java process.ConfigurationUse the following:etc/hadoop/core-site.xml:configuration property namefs.defaultFS/name valuehdfs://localhost:9000/value /property/configurationetc/hadoop/hdfs-site.xml:configuration property namedfs.replication/name value1/value /property/configurationSetup passphraseless sshNow check that you can ssh to the localhost without a passphrase: $ ssh localhostIf you cannot ssh to localhost without a passphrase, execute the following commands: $ ssh-keygen -t rsa -P -f ~/.ssh/id_rsa $ cat ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys $ chmod 0600 ~/.ssh/authorized_keysExecutionThe following instructions are to run a MapReduce job locally. If you want to execute a job on YARN, see?/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.htmlYARN on Single No
文档评论(0)