亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

大數據之---hadoop偽分布式部署(HDFS)全網終極篇

發布時間:2020-06-14 00:40:17 來源:網絡 閱讀:373 作者:ycwyong 欄目:大數據

?

1、軟件環境

RHEL6 jdk-8u45
hadoop-2.8.1.tar.gz ssh
xx.xx.xx.xx ip地址 hadoop1
xx.xx.xx.xx ip地址 hadoop2
xx.xx.xx.xx ip地址 hadoop3
xx.xx.xx.xx ip地址 hadoop4
xx.xx.xx.xx ip地址 hadoop5

本次部署只涉及偽分布式部署只是要主機hadoop1

?

2.偽分布式部署

偽分布式部署文檔參考官方網站hadoop
Apache > Hadoop > Apache Hadoop Project Dist POM > Apache Hadoop 2.8.3 > Hadoop: Setting up a Single Node Cluster
添加hadoop用戶

[root@hadoop1 ~]# useradd hadoop
[root@hadoop1 ~]# vi /etc/sudoers
# 找到root???? ALL=(ALL)???? ALL,添加
hadoop???? ALL=(ALL)?????? NOPASSWD:ALL
上傳并解壓
[root@hadoop1 software]# rz #上傳hadoop-2.8.1.tar.gz
[root@hadoop1 software]# tar -xzvf hadoop-2.8.1.tar.gz
軟連接
[root@hadoop1 software]# ln -s /opt/software/hadoop-2.8.1 /opt/software/hadoop
設置環境變量
[root@hadoop1 software]# vi /etc/profile
export HADOOP_HOME=/opt/software/hadoop
export PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
[root@hadoop1 software]# source /etc/profile
設置用戶、用戶組
[root@hadoop1 software]# chown -R hadoop:hadoop hadoop
[root@hadoop1 software]# chown -R hadoop:hadoop hadoop/*
[root@hadoop1 software]# chown -R hadoop:hadoop hadoop-2.8.1???????
[root@hadoop1 software]# cd hadoop
[root@hadoop1 hadoop]# rm -f *.txt
[root@hadoop1 software]# su - hadoop
[root@hadoop1 hadoop]# ll
total 32
drwxrwxr-x. 2 hadoop hadoop 4096 Jun? 2 14:24 bin
drwxrwxr-x. 3 hadoop hadoop 4096 Jun? 2 14:24 etc
drwxrwxr-x. 2 hadoop hadoop 4096 Jun? 2 14:24 include
drwxrwxr-x. 3 hadoop hadoop 4096 Jun? 2 14:24 lib
drwxrwxr-x. 2 hadoop hadoop 4096 Aug 20 13:59 libexec
drwxr-xr-x. 2 hadoop hadoop 4096 Aug 20 13:59 logs
drwxrwxr-x. 2 hadoop hadoop 4096 Jun? 2 14:24 sbin
drwxrwxr-x. 4 hadoop hadoop 4096 Jun? 2 14:24 share???
???????
# bin:??????? 可執行文件
# etc:???????? 配置文件
# sbin:??????? shell腳本,啟動關閉hdfs,yarn等配置文件
[hadoop@hadoop1 ~]# cd /opt/software/hadoop
[hadoop@hadoop1 hadoop]# vi etc/hadoop/core-site.xml
<configuration>
??? <property>
??????? <name>fs.defaultFS</name>
??????? <value>hdfs://172.168.18.133:9000</value>??? # 配置自己機器的IP
??? </property>

</configuration>
???????
[hadoop@hadoop1 hadoop]# vi etc/hadoop/hdfs-site.xml
<configuration>
??? <property>
??????? <name>dfs.replication</name>
??????? <value>1</value>
??? </property>

</configuration>

---紅色部分新增
配置hadoop用戶的ssh信任關系
# 公鑰/密鑰?? 配置無密碼登錄
[hadoop@hadoop1 ~]# ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
[hadoop@hadoop1 ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[hadoop@hadoop1 ~]# chmod 0600 ~/.ssh/authorized_keys???????
# 查看日期,看是否配置成功
[root@hadoop1 ~]# ssh hadoop1 date
Wed Apr 25 15:22:58 CST 2018

[root@hadoop1 ~]#? ssh localhost date
Wed Apr 25 15:23:25 CST 2018

# 第一次執行命令有交互選擇輸入yes
格式化和啟動
[hadoop@hadoop1 hadoop]# bin/hdfs namenode -format
[hadoop@hadoop1 hadoop]# sbin/start-dfs.sh
ERROR:
??? hadoop1: Error: JAVA_HOME is not set and could not be found.
??? localhost: Error: JAVA_HOME is not set and could not be found.
解決方法:添加環境變量
[hadoop@hadoop1 hadoop]#? vi etc/hadoop/hadoop-env.sh
# 將export JAVA_HOME=${JAVA_HOME}改為
export JAVA_HOME=/usr/java/jdk1.8.0_45
# 繼續啟動
[hadoop@hadoop1 hadoop]# sbin/start-dfs.sh
檢查是否成功
[hadoop@hadoop1 hadoop]# jps
8026 Jps
7485 NameNode
7597 DataNode
7807 SecondaryNameNode
訪問: http://192.168.137.130:50070

修改dfs啟動的進程,以hadoop1啟動? 啟動的三個進程:
namenode: hadoop1??? bin/hdfs getconf -namenodes
datanode: localhost??? datanodes (using default slaves file)?? etc/hadoop/slaves
secondarynamenode: 0.0.0.0

[hadoop@hadoop1 ~]# cd /opt/software/hadoop
[hadoop@hadoop1 hadoop]# echo? "hadoop1" > ./etc/hadoop/slaves
[hadoop@hadoop1 hadoop]# cat ./etc/hadoop/slaves
hadoop1
[hadoop@hadoop1 hadoop]# vi ./etc/hadoop/hdfs-site.xml
<property>
??? <name>dfs.namenode.secondary.http-address</name>
??? <value>hadoop1:50090</value>
</property>
<property>
??? <name>dfs.namenode.secondary.https-address</name>
??? <value>hadoop1:50091</value>
</property>

[hadoop@hadoop1 hadoop]# sbin/stop-dfs.sh
[hadoop@hadoop1 hadoop]# sbin/start-dfs.sh

訪問: http://192.168.137.130:50070界面

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

休宁县| 横山县| 浏阳市| 枣庄市| 阳朔县| 凤冈县| 达日县| 大城县| 建水县| 丰都县| 四子王旗| 彭阳县| 库尔勒市| 定边县| 昌图县| 仲巴县| 珲春市| 武夷山市| 隆德县| 收藏| 明溪县| 泰和县| 思南县| 时尚| 大港区| 蒲城县| 阿坝| 玉田县| 神木县| 石棉县| 苍南县| 老河口市| 永昌县| 县级市| 宁国市| 卢湾区| 敖汉旗| 临桂县| 沿河| 胶州市| 平凉市|