安装CDH

配置五个节点,有几个节点是虚拟机

安装CDH_第1张图片

为了方便在Windows中用webUI,编辑C:\Windows\System32\Drivers\etc\hosts,加入如下地址和主机名

安装CDH_第2张图片

下面是要在各节点上执行的:

1.修改主机名

centos7中修改hostname里的名字后重启主机名会恢复成以前的样子

要用hostnamectl set-hostname 主机名来修改

参考:https://www.server-world.info/en/note?os=CentOS_7&p=hostname

           https://www.jianshu.com/p/39d7000dfa47

2.关闭防火墙及SE Linux

$>systemctl stop firewalld.service

$>systemctl disable firewalld.service

$>sudo vim /etc/selinux/config

selinux=enforcing改成selinux=disabled

安装CDH_第3张图片

安装CDH_第4张图片

3.修改hosts

$>sudo vim /etc/hosts

安装CDH_第5张图片

 

去掉命令行提示声

 

设置虚拟机桥接、配置静态地址

 

随后配置了ssh和ntp

ssh:

    1.删除所有主机上的/home/centos/.ssh/*

    2.在nn1主机上生成密钥对
        $>ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa

    3.将nn1的公钥文件id_rsa.pub远程复制到202 ~ 204主机上。
      并放置/home/centos/.ssh/authorized_keys
        $>scp id_rsa.pub centos@nn1:/home/centos/.ssh/authorized_keys
        $>scp id_rsa.pub centos@nn2:/home/centos/.ssh/authorized_keys
        $>scp id_rsa.pub centos@dn1:/home/centos/.ssh/authorized_keys      .......  都发过去

         scp id_rsa.pub 用户名@主机名:/home/centos/.ssh/authorized_keys

ntp:

各个节点装yum -y install ntp

设定时区timedatectl set-timezone Asia/Shanghai

编辑vi /etc/ntp.conf

由于是局域网内节点较少就不按照标准的服务器去同步时间了,以nn1即192.168.1.21的时间为准

server里加这个

安装CDH_第6张图片

server  192.168.1.21 prefer
server  192.168.1.22
server  127.127.1.0
fudge   127.127.1.0 stratum 8
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 192.168.1.21
restrict 192.168.1.22
restrict 192.168.1.23
restrict 192.168.1.24
restrict 192.168.1.25

client里加这个

安装CDH_第7张图片

server	192.168.1.21 prefer
server	192.168.1.22
server	127.127.1.0
fudge	127.127.1.0 stratum 8
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 192.168.1.21
restrict 192.168.1.22

每个节点运行这个

                # systemctl start ntpd

                # systemctl enable ntpd

https://blog.csdn.net/loopeng1/article/details/79051884

 

设置vm共享文件夹

https://blog.csdn.net/Ahuuua/article/details/90053218

 

不行了,后面的安装就跟着这个走了

https://blog.csdn.net/dongyunlon/article/details/79755791

https://www.cnblogs.com/skyrim/p/7455484.html#%E5%AE%89%E8%A3%85%E4%B8%AD%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98

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