一.
1.
Redhat7.4
2.
CDH5.15
3.
采用root用户进行操作
4.
192.168.8.181 master1.com (主机)
192.168.8.182 master2.com(备机)
192.168.8.183 slave183.com(客户机)
5.参考:
https://mp.weixin.qq.com/s/Xhl65FpAkG2mR4zMPdh8pA
https://mp.weixin.qq.com/s/7ZiSOgJIysn5zEv6eC7rVg
二.
1.在181 182服务器上安装KDC服务
yum -y install krb5-server krb5-libs krb5-workstation
2.在183上装
yum -y install krb5-workstation krb5-libs
3.修改181配置文件
[root@master1 ~]# cat /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
MASTER.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
max_renewable_life= 7d 0h 0m 0s
}
2
[root@master1 ~]# vi /var/kerberos/krb5kdc/kadm5.acl
[root@master1 ~]# cat /var/kerberos/krb5kdc/kadm5.acl
*/admin@MASTER.COM *
3
[root@master1 ~]# vi /etc/krb5.conf
[root@master1 ~]# cat /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
default_realm = MASTER.COM
#default_ccache_name = KEYRING:persistent:%{uid}
[realms]
MASTER.COM = {
kdc = master1.com
admin_server = master1.com
}
[domain_realm]
.master1.com = MASTER.COM
master1.com = MASTER.COM
4.创建Kerberos数据库
[root@master1 ~]# kdb5_util create –r MASTER.COM -s
Loading random data
Initializing database '/var/kerberos/krb5kdc/principal' for realm 'MASTER.COM',
master key name 'K/M@MASTER.COM'
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key:
Re-enter KDC database master key to verify:
5.创建Kerberos的管理账号
[root@master1 ~]# kadmin.local
Authenticating as principal root/admin@MASTER.COM with password.
kadmin.local: addprinc admin/admin@MASTER.COM
WARNING: no policy sp