- 版本:hadoop_2.6.4
- java_version: 1.8
- 创建用户
sudo useradd -m hadoop -s /bin/bash
passwd hadoop //123456
- 配置所有机器无密码登录
#master上创建公钥
su hadoop
whereis ssh
mkdir .ssh
cd .ssh
ssh-keygen -t rsa -P ""
cat id_rsa.pub >> authorized_keys
chmod 600 authorized_keys
cat authorized_keys
#将公钥复制到slaves上
- hadoop解压并配置环境变量
tar -zxvf hadoop-2.6.4.tar.gz
sudo mv hadoop-2.6.4 /opt/hadoop-2.6.4
sudo vi /etc/profile
source /etc/profile
或者
echo "export HADOOP_HOME=/opt/hadoop-2.6.4" >> /etc/profile
- 配置hadoop
cd /opt/hadoop-2.6.4/etc
sudo vi core-site.xml
- core-site.xml
单机模式不用任何配置就可以直接进行测试
#hive连接
<property><name>hadoop.proxyuser.hadoop.hosts</name><value>*</value></property>
<property><name>hadoop.proxyuser.hadoop.groups</name><value>*</value></property>
网友评论