一、hadoop所需环境搭建
1.ubuntu 安装java 8
sudo apt install openjdk-8-jdk
2.安装伪分布式hadoop
解决安装过程遇到的问题:
Starting namenodes on [localhost]
pdsh@shaw-B365M-POWER: localhost: rcmd: socket: Permission denied
Starting datanodes
pdsh@shaw-B365M-POWER: localhost: rcmd: socket: Permission denied
Starting secondary namenodes [shaw-B365M-POWER]
修改pdsh默认连接方式
export PDSH_RCMD_TYPE=ssh
开放ubuntu 端口
sudo iptables -I INPUT -p tcp --dport 9000 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 9870 -j ACCEPT
sudo netfilter-persistent save
sudo netfilter-persistent reload