您好,登錄后才能下訂單哦!
這篇文章給大家介紹CentOS6.5中怎么通過Hadoop用戶實現HDFS偽分布式部署,內容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。
1、檢查hadoop用戶是否存在
[root@hadoop001 hadoop]# pwd
/opt/software/hadoop-2.8.1/etc/hadoop
[root@hadoop001 hadoop]# vim core-site.xml
--添加<property>,localhost修改為IP
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
#修改DataNode數據節點訪問IP
[root@hadoop001 hadoop]# pwd
/opt/software/hadoop-2.8.1/etc/hadoop
[root@hadoop001 hadoop]# vim slaves
localhost --localhost修改為IP,多DN逗號分隔ip
#修改SecondayNameNode數據節點訪問IP
[root@hadoop001 hadoop]# vim hdfs-site.xml
-- 添加<property>
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>192.168.0.129:50090</value>
</property>
<property>
<name>dfs.namenode.secondary.https-address</name>
<value>192.168.0.129:50091</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
6、刪除root用戶的DFS文件及DFS磁盤格式化
[root@hadoop001 tmp]# rm -rf /tmp/hadoop-* /tmp/hsperfdata-*
[root@hadoop001 tmp]# su - hadoop
[hadoop@hadoop001 hadoop-2.8.1]$ hdfs namenode -format
7、hadoop用戶啟動
[hadoop@hadoop001 sbin]$ pwd
/opt/software/hadoop-2.8.1/sbin
[hadoop@hadoop001 sbin]$ ./start-dfs.sh -- 第一次啟動輸入密碼
Starting namenodes on [hadoop001]
hadoop001: starting namenode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-hadoop-namenode-hadoop001.out
192.168.0.129: starting datanode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-hadoop-datanode-hadoop001.out
Starting secondary namenodes [hadoop001]
hadoop001: starting secondarynamenode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-hadoop-secondarynamenode-hadoop001.out
關于CentOS6.5中怎么通過Hadoop用戶實現HDFS偽分布式部署就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。