基于hortonworks的大数据集群环境部署流水
Posted wcwen1990
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了基于hortonworks的大数据集群环境部署流水相关的知识,希望对你有一定的参考价值。
一、ambari及HDP安装文件下载地址:
1、系统
操作系统:CentOS7
2、软件
本次安装采用最新版本:
ambari-2.7.0.0
hdp-3.0.0.0
详细信息及下载地址如下:
Ambari 2.7.0 Repositories
Base URL :http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0
Repo File :http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/ambari.repo
Tarball md5 | asc :http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/ambari-2.7.0.0-centos7.tar.gz
HDP 3.0 Repositories
Base URL :http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0
Repo File :http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/hdp.repo
Tarball md5 | asc :http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/HDP-3.0.0.0-centos7-rpm.tar.gz
HDP-UTILS Base URL :http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7
Tarball md5 | asc :http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz
HDP-GPL URL :http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.0.0.0/hdp.gpl.repo
Tarball md5 | asc :http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.0.0.0/HDP-GPL-3.0.0.0-centos7-gpl.tar.gz
二、配置服务器
1、所有服务器分别配置/etc/hosts文件:向其中添加以下3行
192.168.72.129 chavin.king chavin
2、所有服务器均创建安装用户: ambari
groupadd ambari
useradd -g ambari ambari
echo "dbking588" | passwd --stdin ambari
3、所有服务器为cloudera用户配置sudo权限
chmod u+w /etc/sudoers
echo "ambari ALL=(root)NOPASSWD:ALL" >> /etc/sudoers
chmod u-w /etc/sudoers
4、所有服务器关闭防火墙、禁用selinux
-------
sed -i ‘/SELINUX=enforcing/d‘ /etc/selinux/config
sed -i ‘/SELINUX=disabled/d‘ /etc/selinux/config
echo "SELINUX=disabled" >> /etc/selinux/config
-------
sed -e ‘s/SELINUX=enforcing/SELINUX=disabled/d‘ /etc/selinux/config
-------
Service iptables stop
Chkconfig iptables off
5、所有服务器设置文件打开数量及最大进程数
cp /etc/security/limits.conf /etc/security/limits.conf.bak
echo "* soft nproc 32000" >>/etc/security/limits.conf
echo "* hard nproc 32000" >>/etc/security/limits.conf
echo "* soft nofile 65535" >>/etc/security/limits.conf
echo "* hard nofile 65535" >>/etc/security/limits.conf
6、配置SSH无秘钥登录:至少在namenode和resourcemanager节点配置
ssh-keygen -t rsa
ssh-copy-id chavin.king
7、配置集群时间同步服务:通过ntp服务配置
ntp主节点配置:
cp /etc/ntp.conf /etc/ntp.conf.bak
cp /etc/sysconfig/ntpd /etc/sysconfig/ntpd.bak
echo "restrict 192.168.72.0 mask 255.255.255.0 nomodify notrap" >> /etc/ntp.conf
echo "SYNC_HWCLOCK=yes" >> /etc/sysconfig/ntpd
service ntpd restart
ntp客户端配置:
#crontab -e
输入如下一行内容,保存退出:
0-59/10 * * * * /opt/scripts/sync_time.sh
上述脚本内容如下:
# cat /opt/scripts/sync_time.sh
/sbin/service ntpd stop
/usr/sbin/ntpdate chavin
/sbin/service ntpd start
8、所有节点安装java软件并配置环境变量
export JAVA_HOME=/usr/java/jdk1.8.0_181
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
9、安装postgresql数据库
参考文档:https://www.cnblogs.com/wcwen1990/p/6655438.html
10、安装apache服务器:
yum -y install httpd
service httpd start
cd /var/www/htmp
mkdir ambari
mkdir hdp
三、安装ambari
yum安装,界面配置,略
以上是关于基于hortonworks的大数据集群环境部署流水的主要内容,如果未能解决你的问题,请参考以下文章