Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

03Hadoop3 and Centos7 installation manual

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report