以下是在CentOS上搭建HDFS集群的步骤:
/etc/hosts
文件。/etc/profile
或~/.bashrc
文件,添加HADOOP_HOME
和PATH
。core-site.xml
,配置HDFS默认URI。hdfs-site.xml
,配置存储目录、副本数等。mapred-site.xml
和yarn-site.xml
。hdfs namenode -format
。start-dfs.sh
。jps
命令检查进程,或通过Web界面(如http://namenode:9870
)查看。若需配置高可用,还需安装配置ZooKeeper,修改相关配置文件并初始化JournalNodes等。