CDH5启用Kerberos和添加Sentry服务

说明:该文档假设你已安装了完整功能的CDH5 【参看文档CDH5部署】


一、CDH5添加Kerberos
1、环境说明:
host文件:
    
    
    
[root@master yum.repos.d]# cat /etc/hosts
10.16.30.97 master
10.16.30.98 slave1
10.16.30.99 slave2
10.16.30.100 slave3
10.16.30.101 slave4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
更改为:删除localhost的解析
     
     
     
10.16.30.97 master
10.16.30.98 slave1
10.16.30.99 slave2
10.16.30.100 slave3
10.16.30.101 slave4


2、 AES-256加密  选择下面的任何一种方式安装【推荐第二种】
注:这里我没有使用AES-256加密
(1)、查看linux版本命令:
     
     
     
uname -a
cat /proc/version
cat /etc/issue
lsb_release -a 适合所有linux
对于使用centos5.6及以上的系统,默认使用AES-256来加密的。这就需要集群中的 所有节点和hadoop user machine上安装   Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy File
打开上面的链接,在页面的下方,下载jdk对应的文件,jdk1.6.0_22下载下面的文件:
注:如果后面出现login failed的错误,应先检查是否是从官方网站下载的JCE。
下载的文件是一个zip包,解开后,将里面的两个文件放到下面的目录中:
/usr/java/jdk1.6.0_22/jre/lib/security

(2)、使用CM安装
 可以在cm中点击【主机】--【重新运行升级向导】

一直点击【继续】


选中点击【继续】

配置密码---【继续】

一直【继续】知道【完成】
安装JCE成功

注:也可以不使用AES-256加密。如果没有使用AES-256加密的KDC配置见如下的英文文档,也可以参看
[3、KDC部署]
you can configureKerberos to notuse AES-256by removing aes256-cts:normalfrom the supported_enctypes field of
the kdc.confor krb5.conf file.Note that after changing the kdc.conf file, you will need to restart both the KDC
and the kadmin server for those changes to take affect. You may also need to recreate or change the password of
the relevant principals, including potentially the Ticket Granting Ticket principal (krbtgt/REALM@REALM).
If AES-256 is still used after all of those steps, it is because the aes256-cts:normal setting existed
when the Kerberos database was created.To fix this, create a newKerberos database andthen restart both
the KDCand the kadmin server.

3、KDC部署
(1)选择host安装KDC-SERVER( 选择任意一台 )
     
     
     
yum install krb5-server.x86_64 krb5-devel.x86_64
(2)其他hosts安装kdc-client
      
      
      
yum install krb5-devel.x86_64
(3)配置文件
kdc服务器涉及到三个配置文件:
/etc/krb5.conf、
/var/kerberos/krb5kdc/kdc.conf、
/var/kerberos/krb5kdc / kadm5.acl

hadoop集群中其他服务器涉及到的kerberos配置文件:/etc/krb5.conf。
将kdc中的/etc/krb5.conf拷贝到集群中其他服务器即可。
集群如果开启selinux了,拷贝后可能需要执行restorecon -R -v /etc/krb5.conf
注:我使用的是ansible

/etc/krb5.conf
    
    
    
[logging]
default =
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值