2.2 HDFS伪分布式集群搭建(智警杯比赛总结)

1.基础配置
systemctl stop firewalld
systemctl disable firewalld

hostnamectl set-hostname master

echo 172.18.38.88 master >> /etc/hosts
echo 172.18.32.117 slave1 >> /etc/hosts
echo 172.18.32.143 slave2 >> /etc/hosts

timedatectl set-timezone Asia/Shanghai
yum install ntp -y(如果本身有ntp那就不用yum,直接改ntpd.conf)
改ntpd.conf
/server 0.centos.pool.ntp.org iburst/d
/server 1.centos.pool.ntp.org iburst/d
/server 2.centos.pool.ntp.org iburst/d
/server 3.centos.pool.ntp.org iburst/d 
注释掉四行
server 127.127.1.0
fudge 127.127.1.0 stratum 10
systemctl restart ntpd
ntpdate master(从机操作)

crontab -e
//写入下方内容
*/30 10-17 * * * usr/sbin/ntpdate master
//保存退出
crontab -l

ssh-keygen -t rsa(三台)
ssh-copy-id ...
#ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa #一会实验
#ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host

配置JDK
mkdir -p /package
mkdir -p /usr/java
wget -P /package http://192.168.0.115:82/package/jdk-8u171-linux-x64.tar.gz
tar -zxvf /package/jdk-8u171-linux-x64.tar.gz -C

你可能感兴趣的:(hadoop本憨豆婆,hadoop,hdfs,大数据)