echo '10.10.106.156
edu-bigdata-01.novalocal' > /etc/hosts
echo '10.10.106.157
edu-bigdata-02.novalocal' >> /etc/hosts
echo '10.10.106.158
edu-bigdata-03.novalocal' >> /etc/hosts
echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' >> /etc/hosts
echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> /etc/hosts
|
yum install krb5-server krb5-libs krb5-auth-dialog |
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
HADOOP.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
max_renewable_life = 7d
supported_enctypes = aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
}
|
[libdefaults]
default_realm = HADOOP.COM
dns_lookup_kdc = false
dns_lookup_realm = false
ticket_lifetime = 86400
renew_lifetime = 604800
forwardable = true
default_tgs_enctypes = aes128-cts
default_tkt_enctypes = aes128-cts
permitted_enctypes = aes128-cts
udp_preference_limit = 1
kdc_timeout = 3000
[realms]
HADOOP.COM = {
kdc =
edu-bigdata-01.novalocal
admin_server =
edu-bigdata-01.novalocal
}
|
当Kerberos database创建好后,可以看到目录 /var/kerberos/krb5kdc 下生成了几个文件:
# /usr/sbin/kadmin.local -q "addprinc admin/admin" |
将文件/var/kerberos/krb5kdc/kadm5.acl的内容编辑为
# service krb5kdc start
# service kadmin start
|
# chkconfig krb5kdc on
# chkconfig kadmin on
|
现在KDC已经在工作了。这两个daemons将会在后台运行,可以查看它们的日志文件(/var/log/krb5kdc.log 和 /var/log/kadmind.log)。
yum install krb5-workstation krb5-libs krb5-auth-dialog |