关闭防火墙
#systemctl stop firewalld
#systemctl disable firewalld
设置免密码登录设置解析地址
#vi /etc/hosts
192.168.56.100 xue
#ssh-keygen -t rsa
# ssh-copy-id -i .ssh/id_rsa.pub root@xue
#mkdir training //存放软件
# rpm -ivh jdk-8u91-linux-x64.rpm
# rm -rf jdk-8u91-linux-x64.rpm
//这里如果用的java包是gz格式的就需要设置环境变量。
#vi ~/.bash_profile
export JAVA_HOME=/root/training/jdk1.8.0_144
export PATH=$JAVA_HOME/bin:$PATH
#source ~/.bash_profile
#which java
安装hadoop
# tar -zxvf hadoop-2.7.3.tar.gz
# rm -rf hadoop-2.7.3.tar.gz
# mv hadoop-2.7.3/ hadoop
#cd hadoop
#vi /etc/profile
export HADOOP_HOME=/root/training/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
#source /etc/profile
# cd etc/hadoop/
#vi hadoop-env.sh
export JAVA_HOME=/usr/java/default
#cd ../../..
#mkdir data
#cd data
#mkdir input
#cd input
#vi data.txt
#cd ~/training/hadoop-2.4.1/share/hadoop/mapreduce/
# hadoop jar hadoop-mapreduce-examples-2.4.1.jar wordcount ~/training/data/input/data.txt ~/training/data/output
# cd ~/training/data/output/
# more part-r-00000
网友评论