1.準備三臺虛擬機html
2.hadoop+hive+spark+java軟件包java
傳送門:Hadoop官網 Hive官網 Spark官網node
hostnamectl set-hostname ***web
vi /etc/hosts 寫入如下內容apache
master 192.168.0.110瀏覽器
slaver1 192.168.0.111ssh
slaver2 192.168.0.112oop
運行命令 ssh-keygen -t rsa生成祕鑰測試
master節點運行命令 cat id_rsa.pub > authorized_keysspa
ssh slaver1 cat ~/.ssh/id_rsa.pub >>authorized_keys
ssh slaver2 cat ~/.ssh/id_rsa.pub >>authorized_keys
scp authorized_key root@slaver1:~/.ssh/
scp authorized_key root@slaver2:~/.ssh/
vi /etc/ssh/sshd刪掉如下注釋
執行完如上操做便可免密登陸
export JAVA_HOME=/usr/local/jdk1.8.0
export PATH=$JAVA_HOME/bin:$PATH
運行java -version命令
成功安裝並配置java
export HADOOP_HOME=/usr/local/hadoop
export PATH=$HADOOP_HOME/bin:$PATH
master節點運行命令hdfs namenode -format