Installing Hadoop
Unzip Hadoop
sudo tar-zxvf Hadoop
Related configuration
1. Delete the doc directory
Will/hadoop01/hadoop3/share
To delete the doc directory under
RM-RF doc
2, to Hadoop01/hadoop3/etc/hadoop
Modify Export java_home= "/yds/java/jdk8"
chmod +x hadoop-env.sh
3, pseudo-distributed environment construction
Catalog:/hadoop01/hadoop3/etc/hadoop
3-1, modify the Core-site.xml
On the configuration node, add
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop001:9000</value>
</property>
Note: hadoop001 is host name
3-2, modify the Hdfs-site.xml
On the configuration node, add
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
3-3. Free-Secret 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 with SSH host name
3-4. Start Hadoop
Initialization required for first boot
Go to the Bin directory:
./hdfs Namenode-format
If you need to run HDFs directly. Need to put HDFs inside
Modify the environment variables for 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
To see if it starts:
JPs
If an external network is unreachable:
The Port Gateway is accessible:
Iptables-i INPUT 9-p UDP--dport 9870-j ACCEPT
Systemctl Start firewalld.service# Startup firewall
Systemctl Stop firewalld.service# stops firewall
Systemctl Disable firewalld.service# disable firewall boot boot
To access HDFs:
http://192.168.0.130:9870
03HADOOP3 and CENTOS7 Installation manuals