目录
Part.01 关于HDP
Part.02 核心组件原理
Part.03 资源规划
Part.04 基础环境配置
Part.05 Yum源配置
Part.06 安装OracleJDK
Part.07 安装MySQL
Part.08 部署Ambari集群
Part.09 安装OpenLDAP
Part.10 创建集群
Part.11 安装Kerberos
Part.12 安装HDFS
Part.13 安装Ranger
Part.14 安装YARN+MR
Part.15 安装HIVE
Part.16 安装HBase
Part.17 安装Spark2
Part.18 安装Flink
Part.19 安装Kafka
Part.20 安装Flume
五、Yum源配置
1.配置系统Yum源
【hdp01】配置CentOS镜像Yum源
bash
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom/
rm -f /etc/yum.repos.d/*
创建repo文件,/etc/yum.repos.d/local.repo
bash
[centos]
name=centos
baseurl=file:///mnt/cdrom
gpgcheck=0
enabled=1
更新yum源
bash
yum clean all
yum update
安装httpd服务
bash
yum install -y httpd
systemctl enable --now httpd
配置http服务指向CentOS源
bash
mkdir /var/www/html/centos
mount /dev/cdrom /var/www/html/centos/
删除原有repo文件
bash
ansible all -m shell -a 'rm -f /etc/yum.repos.d/*.repo'
配置所有节点的系统Yum源
bash
ansible all -m yum_repository -a 'name="centos" description="centos" baseurl="http://hdp01.hdp.com/centos" enabled=yes gpgcheck=no'
ansible all -m shell -a 'yum clean all'
ansible all -m shell -a 'yum update'
2.配置Ambari Yum源
【hdp01】解压ambari压缩包
bash
tar -zxvf /opt/hdp/ambari-2.7.5.0-centos7.tar.gz -C /var/www/html/
配置所有节点的ambari Yum源
bash
ansible all -m yum_repository -a 'name="ambari" description="ambari" baseurl="http://hdp01.hdp.com/ambari/centos7/2.7.5.0-72" enabled=yes gpgcheck=yes gpgkey="http://hdp01.hdp.com/ambari/centos7/2.7.5.0-72/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins"'
查看/etc/yum.repos.d/ambari.repo文件
bash
[ambari]
baseurl = http://hdp01.hdp.com/ambari/centos7/2.7.5.0-72
enabled = 1
gpgcheck = 1
gpgkey = http://hdp01.hdp.com/ambari/centos7/2.7.5.0-72/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
name = ambari
3.配置HDP Yum源
【hdp01】解压HDP压缩包
bash
tar -zxvf /opt/hdp/HDP-3.1.5.0-centos7-rpm.tar.gz -C /var/www/html/
配置所有节点的HDP Yum源
bash
ansible all -m yum_repository -a 'name="HDP" description="HDP" baseurl="http://hdp01.hdp.com/HDP/centos7/3.1.5.0-152" enabled=yes gpgcheck=yes gpgkey="http://hdp01.hdp.com/HDP/centos7/3.1.5.0-152/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins"'
查看/etc/yum.repos.d/HDP.repo文件
bash
[HDP]
baseurl = http://hdp01.hdp.com/HDP/centos7/3.1.5.0-152
enabled = 1
gpgcheck = 1
gpgkey = http://hdp01.hdp.com/HDP/centos7/3.1.5.0-152/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
name = HDP
4.配置HDP-UTILS Yum源
【hdp01】解压HDP-UTILS压缩包
bash
tar -zxvf /opt/hdp/HDP-UTILS-1.1.0.22-centos7.tar.gz -C /var/www/html/
配置所有节点的HDP-UTILS Yum源
bash
ansible all -m yum_repository -a 'name="HDP-UTILS" description="HDP-UTILS" baseurl="http://hdp01.hdp.com/HDP-UTILS/centos7/1.1.0.22" enabled=yes gpgcheck=yes gpgkey="http://hdp01.hdp.com/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins"'
查看/etc/yum.repos.d/HDP-UTILS.repo文件
bash
[HDP-UTILS]
baseurl = http://hdp01.hdp.com/HDP-UTILS/centos7/1.1.0.22
enabled = 1
gpgcheck = 1
gpgkey = http://hdp01.hdp.com/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
name = HDP-UTILS
5.配置HDP-GPL Yum源
【hdp01】解压HDP-GPL压缩包
bash
tar -zxvf /opt/hdp/HDP-GPL-3.1.5.0-centos7-gpl.tar.gz -C /var/www/html/
配置所有节点的HDP-GPL Yum源
bash
ansible all -m yum_repository -a 'name="HDP-GPL" description="HDP-GPL" baseurl="http://hdp01.hdp.com/HDP-GPL/centos7/3.1.5.0-152" enabled=yes gpgcheck=yes gpgkey="http://hdp01.hdp.com/HDP-GPL/centos7/3.1.5.0-152/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins"'
查看/etc/yum.repos.d/HDP-GPL.repo文件
bash
[HDP-GPL]
baseurl = http://hdp01.hdp.com/HDP-GPL/centos7/3.1.5.0-152
enabled = 1
gpgcheck = 1
gpgkey = http://hdp01.hdp.com/HDP-GPL/centos7/3.1.5.0-152/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
name = HDP-GPL
6.配置OpenLDAP Yum源
下载以下安装包,并放在/opt/openldap/下
安装包名称 | 说明 |
---|---|
openldap | openldap服务端和客户端必须用的库文件 |
openldap-servers | 用于启动服务和设置,包含单独的ldap后台守护程序 |
openldap-clients | 在LDAP服务端使用,用户增删改查的命令行环境 |
openldap-devel | devel包,可选择性安装 |
openldap-servers-sql | 支持sql模块,可选择性安装 |
migrationtools | 通过migrationtools实现OpenLDAP用户及用户组的添加,导入系统账户,可选择性安装 |
compat-openldap | openldap兼容性库 |
安装createrepo
bash
yum install -y createrepo
根据安装的rpm文件,生成repodata
bash
createrepo /opt/openldap/
将repodata文件夹、rpm文件复制到/var/www/html/openldap下
bash
cp -R /opt/openldap/ /var/www/html/openldap/
配置hdp01-02节点的openldap yum源
bash
ansible all -m yum_repository -a 'name="OpenLDAP" description="OpenLDAP" baseurl="http://hdp01.hdp.com/openldap" enabled=yes gpgcheck=no'
查看/etc/yum.repos.d/OpenLDAP.repo文件
bash
[OpenLDAP]
baseurl = http://hdp01.hdp.com/openldap
enabled = 1
gpgcheck = 0
name = OpenLDAP