Centos 7.2 安装 Ambari 2.2.2 + HDP 2.4.2 搭建Hadoop集群的环境配置

来源:互联网 发布:linux shell 系统时间 编辑:程序博客网 时间:2024/06/06 07:16
1.安装环境说明
安装前先安装好 Centos 7.2, jdk-8u91, mysql5.7.13
2.操作系统环境准备
2.1 配置SSH免密码登录
主节点里root用户登录执行如下步骤
ssh-keygencd ~/.ssh/cat id_rsa.pub >>authorized_keyschmod ~/.sshchmod ~/.ssh/authorized_keys
先在从节点登录root执行命令
mkdir ~/.ssh/
分发主节点里配置好的authorized_keys到各从节点
scp /root/.ssh/authorized_keys root@172.31.83.172:/root/.ssh/authorized_keys
2.2 创建ambari系统用户和用户组
只在主节点操作
添加ambari安装、运行用户和用户组,也可以不创建新用户,直接使用root或者系统其他账号
adduser ambaripasswd ambari
2.3 开启NTP服务
所有集群上节点都需要操作
Centos 7 命令
yum install ntpsystemctlis-enabled ntpdsystemctl enable ntpdsystemctl start ntpd
Centos 6 命令
yum install ntpdchkconfig--list ntpdchkconfig ntpd service ntpd start
2.4 检查DNS和NSCD
所有节点都要设置
ambari在安装时需要配置全域名,所以需要检查DNS。为了减轻DNS的负担, 建议在节点里用 Name Service Caching Daemon (NSCD)
vi /etc/hosts172.31.83.171 SY-001 SY-001.hadoop172.31.83.172 SY-002 SY-002.hadoop172.31.83.173 SY-003 SY-003.hadoop
每台节点里配置FQDN,如下以主节点为例
vi /etc/sysconfig/networkNETWORKING=yesHOSTNAME=SY-001.hadoop
2.5 关闭防火墙
所有节点都要设置
Centos 7 命令
systemctl disable firewalldsystemctl stop firewalld
Centos 6 命令
chkconfig iptablesoff/etc/init.d/iptables stop
2.6 关闭SELinux
所有节点都要设置
查看SELinux状态:
sestatus
如果SELinux status参数为enabled即为开启状态 
SELinux status: enabled
临时关闭,不用重启机器:
setenforce 0
修改配置文件需要重启机器:
vi /etc/sysconfig/selinuxSELINUX=disabled
阅读全文
0 0
原创粉丝点击