Hadoop单机模式搭建

安利一篇我翻译的国外大牛的神经网络入门文章

目标机器:Centos 64bit

下载二进制包

http://apache.fayea.com/hadoop/common/hadoop-2.7.1/hadoop-2.7.1.tar.gz

解压到目标文件夹

tar zxf tar zxf hadoop-2.7.1.tar.gz -C /usr

建立hadoop用户组和用户

groupadd hadoop
useradd -g hadoop hadoop
passwd hadoop
usermod -g root hadoop

切换到hadoop用户并更改hadoop目录所属

su - hadoop
cd /usr
mv  hadoop-2.7.1  hadoop
sudo chown -R hadoop:hadoop hadoop

配置ssh免密码登录

ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys

配置hadoop-env.sh

新增如下内容

export JAVA_HOME=/usr/lib/jvm/java/jdk1.7.0_79
export HADOOP_INSTALL=/usr/hadoop
export PATH=$PATH:/usr/hadoop/bin

验证

mkdir input
cp sbin/* input/
source etc/hadoop/hadoop-env.sh
cp share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar .
hadoop jar hadoop-mapreduce-examples-2.7.1.jar wordcount input output

你可能感兴趣的:(大数据)