JDK 安装
hadoop
scp .\hadoop-3.3.1.tar.gz hadoop@hadoop102:/opt/software
cd /opt
tar -zxvf software/hadoop-3.3.1.tar.gz -C module/
sudo vim /etc/profile.d/my_env.sh
# hadoop-3.3.1
export HADOOP_HOME=/opt/module/hadoop-3.3.1
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:
source /etc/profile
hadoop version
cd /opt/module/hadoop-3.3.1/etc/hadoop/
vim core-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop102:9820</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/module/hadoop-3.3.1/data/tmp</value>
</property>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/opt/module/hadoop-3.3.1/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/opt/module/hadoop-3.3.1/data/datanode</value>
</property>
</configuration>
hdfs namenode -format # 格式化
hdfs --daemon start namenode
hdfs --daemon start datanode
http://hadoop102:9870