Kerberos
在centos7
下安裝kerberos
html
yum
安裝kerberos
yum install krb5-libs krb5-server krb5-workstation
java
hosts
vim /etc/hosts 10.2.1.23 ambari-ttt-master
krb5
vim /etc/krb5.conf [libdefaults] renew_lifetime = 7d forwardable = true default_realm = [EXAM.CN] ticket_lifetime = 24h dns_lookup_realm = false dns_lookup_kdc = false default_ccache_name = /tmp/krb5cc_%{uid} #default_tgs_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5 #default_tkt_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5 [logging] default = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log kdc = FILE:/var/log/krb5kdc.log [realms] [EXAM.CN] = { admin_server = [ambari-ttt-master] kdc = [ambari-ttt-master] }
krb
中的kdc
信息vim /var/kerberos/krb5kdc/kdc.conf [kdcdefaults] kdc_ports = 88 kdc_tcp_ports = 88 [realms] [EXAM.CN] = { #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 } vim /var/kerberos/krb5kdc/kadm5.acl */admin@[EXAM.CN] *
kerberos
數據庫ll /var/kerberos/krb5kdc/
是否有 kadm5.acl,kdc.conf
文件,建立命令以下:kdb5_util create -r EXAM.COM -s
ll /var/kerberos/krb5kdc/
目錄會多幾個文件分別principal,principal.kadm5,principal.kadm5.lock,principal.ok
kadmin.local -q "addprinc admin/admin"
其中admin/admin
是用戶名,在建立的時候須要輸入密碼,須要把密碼保存好,能夠使用kadmin.local
輸入listprincs
查看用戶是否建立成功數據庫
systemctl start krb5kdc
systemctl start kadmin
krb5kdc
時失敗,查看/var/log/krb5kdc.log
文件報以下信息:Algorithm AES256 not enabled
經過google後發現由於jre
下的加密的問題,須要重下載替換就能夠啦http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
根據本身安裝的jdk
版本去下載vim
cp *.jar /usr/java/jdk1.8.0_112/jre/lib/security/
替換完成以後須要重啓ambari
centos
Ambari2.7
拖管Kerberos
kerberos
kerberos
KDC
相關信息,若是鏈接失敗,請查看ambari
的server
日誌