這篇文章給大家介紹CentOS6.5中怎么通過Hadoop用戶實現(xiàn)HDFS偽分布式部署,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。
1、檢查hadoop用戶是否存在
[root@hadoop001 hadoop]# pwd
/opt/software/hadoop-2.8.1/etc/hadoop
[root@hadoop001 hadoop]# vim core-site.xml
--添加
#修改DataNode數(shù)據(jù)節(jié)點訪問IP
[root@hadoop001 hadoop]# pwd
/opt/software/hadoop-2.8.1/etc/hadoop
[root@hadoop001 hadoop]# vim slaves
localhost --localhost修改為IP,多DN逗號分隔ip
#修改SecondayNameNode數(shù)據(jù)節(jié)點訪問IP
[root@hadoop001 hadoop]# vim hdfs-site.xml
-- 添加
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
關(guān)于CentOS6.5中怎么通過Hadoop用戶實現(xiàn)HDFS偽分布式部署就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。