Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

03Hadoop3 and Centos7 installation manual

Shulou Source: shulou.com Published: 2022-06-03 05:45:39 11月24日 Update

Install hadoop

Decompress hadoop

Sudo tar-zxvf hadoop

Related configuration

1. Delete the doc directory

Will / hadoop01/hadoop3/share

Delete the doc directory under the

Rm-rf doc

2. For hadoop01/hadoop3/etc/hadoop

Modify export JAVA_HOME= "/ yds/java/jdk8"

Chmod + x hadoop-env.sh

3. Construction of pseudo-distributed environment

Directory: / hadoop01/hadoop3/etc/hadoop

3-1. Modify core-site.xml

Add to the configuration node

Fs.defaultFS

Hdfs://hadoop001:9000

Note: hadoop001 is the hostname

3-2. Modify hdfs-site.xml

Add to the configuration node

Dfs.replication

one

3-3. Secret-free setting

Ssh-keygen-t dsa-P''- f ~ / .ssh/id_dsa

Cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

Chmod 0600 ~ / .ssh/authorized_keys

Can be tested by ssh hostname

3-4. Start hadoop

Initialization is required for the first time

Go to the bin directory:

. / hdfs namenode-format

If you need to run hdfs directly. You need to put hdfs in it.

Modify the environment variable of hdfs

Sudo / etc/profile

Export $HADOOP_HOME=/hadoop01/hadoop3

Export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin

Source / etc/profile

Boot into the sbin directory

. / start-dfs.sh

Check to see if it starts:

Jps

If the public network cannot be accessed:

The port can be accessed through the external network:

Iptables-I INPUT 9-p udp-- dport 9870-j ACCEPT

Systemctl start firewalld.service# starts firewall

Systemctl stop firewalld.service# stop firewall

Systemctl disable firewalld.service# forbids firewall from booting

Visit hdfs:

Http://192.168.0.130:9870

Tags: Directory host environment node distributed variable port reachable test run configure manual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Microsoft Huawei Linux Shulou Tech Info