安装KDC
yum install krb5-server krb5-libs krb5-auth-dialog krb5-workstation
修改配置
# vi /etc/krb5.conf
# Configuration snippets may be placed in this directory as well
includedir /etc/krb5.conf.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
dns_lookup_realm = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
default_realm = CDH6.COM
#default_ccache_name = KEYRING:persistent:%{uid}
dns_lookup_realm = false
dns_lookup_kdc = false
[realms]
CDH6.COM = {
kdc = slave1
admin_server = slave1
}
[domain_realm]
.cdh5.com = CDH6.COM
cdh5.com = CDH6.COM
# 修改 /var/kerberos/krb5kdc/kadm5.acl 配置
*/[email protected] *
# 修改/var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
CDH6.COM = {
#master_key_type = aes256-cts
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
#supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
supported_enctypes = des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
max_life=1d
max_renewable_life=7d
}
创建 Kerberos 数据库
kdb5_util create -r CDH6.COM -s
创建 Kerberos 管理账号
Kerberos 添加到自启动
systemctl enable krb5kdc
systemctl enable kadmin
systemctl start krb5kdc
systemctl start kadmin
为集群所有节点安装 Kerberos 客户端
yum -y install krb5-libs krb5-workstation
# 集群 master 节点安装 openldap-clients
yum -y install openldap-clients
# KDC Server上的krb5.conf文件拷贝到所有Kerberos客户端
rsync -av /etc/krb5.conf root@cdh6-m:/etc/
CDH6 启用 Kerberos
进入集群 Web 后台操作,步骤如图