金沙澳门官网登录-www.js8.com-金沙澳门官网下载app

CDH的安装和设置

CDH的安装和设置。也得以在浏览器里面输入地点

1. 下载hadoop-2.6.0-cdh5.9.0,复制到/opt/下,再解压;

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>/home/hadoop/tmp</value>
    </property>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://192.168.1.104:9000</value>
    </property>
</configuration>

CDH的安装和设置。mapred-site.xml:

CDH的安装和设置。CDH的安装和设置。5. 跻身/opt/hadoop-2.6.0-cdh5.9.0/etc/hadoop/sbin,输入指令:

图片 1

CDH的安装和设置。格式化NameNode,要是结果提示Successful评释格式化成功。

  1. 在/etc/profile前边加上:

    export HADOOP_HOME=/opt/hadoop-2.6.0-cdh5.9.0 export PATH=$PATH:$HADOOP_HOME/bin

起始Hadoop。为了检查是或不是运维成功,输入指令:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
    <property>
        <name>dfs.name.dir</name>
        <value>/opt/hdfs/name</value>
    </property>
    <property>
        <name>dfs.data.dir</name>
        <value>/opt/hdfs/data</value>
    </property>
    <property>
            <name>dfs.tmp.dir</name>
            <value>/opt/hdfs/tmp</value>
    </property>
</configuration>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
    <property>
        <name>mapred.job.tracker</name>
        <value>hdfs://192.168.1.104:9001</value>
    </property>
</configuration>
source /etc/profile

假如结果包罗了以下多少个进程,则注脚运营成功:

使设置生效。

hdfs-site.xml:

./start-all.sh

图片 2

与此同有时间输入指令:

jps

修正配置文件core-tite.xml:

应用伪布满形式安装和设置CDH,前提是早就安装了Java和SSH。

export JAVA_HOME=/opt/jdk1.8.0_121
export HADOOP_HOME=/opt/hadoop-2.6.0-cdh5.9.0

2. 进入/opt/hadoop-2.6.0-cdh5.9.0/etc/hadoop/,在hadoop-env.sh中添加:

内部hadoop.tmp.dir最佳温馨设置,不要采用私下认可的设置,因为私下认可的设置是在/tmp/下面,机重视启未来会被去除掉,产生Hadoop无法运维,要重复格式化NameNode才干运作。

  1. 输入指令:

    hadoop namenode -format

本文由金沙澳门官网登录发布于金沙澳门官网下载app,转载请注明出处:CDH的安装和设置

TAG标签:
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。