wget https://mirror.bit.edu.cn/apache/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz
tar xf hadoop-3.2.1.tar.gz && cd hadoop-3.2.1
vim etc/hadoop/core-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
vim etc/hadoop/hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
./bin/hdfs namenode -format
./sbin/start-dfs.sh
jps
# 34068 DataNode
# 33949 NameNode
# 34527 SecondaryNameNode
./bin/hdfs dfs -mkdir /test
./bin/hdfs dfs -ls /
网友评论