下载安装伪分布式:
- 国内源下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/Index of /apache/hadoop/common
https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/
https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-3.2.4/hadoop-3.2.4.tar.gz
- 解压:
bash
tar -xvf hadoop-3.2.4.tar.gz
3.配置Hadoop环境
编辑~/.bashrc文件,添加以下内容:
bash
export HADOOP_HOME=/path/to/hadoop-3.2.4
export PATH=$PATH:$HADOOP_HOME/bin
记得将/path/to/hadoop-3.2.1替换为实际的Hadoop路径。
然后,运行以下命令使配置生效:
bash
source ~/.bashrc
hadoop version