您好,登錄后才能下訂單哦!
1.下載jce并解壓
jce下載地址:http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
[root@manager ~]# ls
jce_policy-8.zip
[root@manager ~]# unzip -o -j -q jce_policy-8.zip -d /usr/local/jdk/jre/lib/security/
2.安裝krb5
[root@manager ~]# yum install -y krb5-libs krb5-workstation
3.修改配置文件
[root@manager ~]# 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 = KRB.COM #修改為認證域
default_ccache_name = KEYRING:persistent:%{uid}
[realms]
KRB.COM = {
kdc = 192.168.10.131 #KDC的地址
admin_server = 192.168.10.131 #kadmin服務地址
}
[domain_realm]
#以上需要在服務端和客戶端都配置,可以在服務端配置好以后使用scp拷貝。
4.在服務端安裝krb5-server
[root@manager ~]# yum install -y krb5-server
5.修改服務端的配置文件
[root@manager ~]# cat /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
KRB.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
}
1.創建kerberos數據庫
[root@manager ~]# kdb5_util create -s -r KRB.COM
Loading random data
Initializing database '/var/kerberos/krb5kdc/principal' for realm 'KRB.COM',
master key name 'K/M@KRB.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:
2.創建管理員
[root@manager ~]# kadmin.local -q "addprinc admin/admin"
Authenticating as principal root/admin@KRB.COM with password.
WARNING: no policy specified for admin/admin@KRB.COM; defaulting to no policy
Enter password for principal "admin/admin@KRB.COM":
Re-enter password for principal "admin/admin@KRB.COM":
Principal "admin/admin@KRB.COM" created.
3.給管理員賬戶添加acl權限
[root@manager ~]# cat /var/kerberos/krb5kdc/kadm5.acl
*/admin@KRB.COM *
4.啟動服務和設置開機自啟
[root@manager ~]# systemctl start krb5kdc
[root@manager ~]# systemctl start kadmin
[root@manager ~]# systemctl enable krb5kdc
[root@manager ~]# systemctl enable kadmin
5.在客戶端測試連接
[root@vm1 ~]# kadmin -p admin/admin
Authenticating as principal admin/admin with password.
Password for admin/admin@KRB.COM:
kadmin: listprincs
K/M@KRB.COM
admin/admin@KRB.COM
kadmin/admin@KRB.COM
kadmin/changepw@KRB.COM
kadmin/manager@KRB.COM
kiprop/manager@KRB.COM
krbtgt/KRB.COM@KRB.COM
kadmin: quit
6.重新啟動ambari-server
[root@manager ~]# ambari-server restart
1.開啟Kerberos
2.選擇MIT
3.輸入KDC和Kadmin相關信息
4.安裝和測試
5.配置文件設置
6.等待停止其他服務
7.添加完成
8.等待開啟服務
9.完成
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。