主節(jié)點(diǎn)安裝
在銅陵等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站制作、做網(wǎng)站 網(wǎng)站設(shè)計(jì)制作按需網(wǎng)站策劃,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站建設(shè),全網(wǎng)營銷推廣,外貿(mào)營銷網(wǎng)站建設(shè),銅陵網(wǎng)站建設(shè)費(fèi)用合理。
yum -y install krb5-server krb5-libs krb5-auth-dialog krb5-workstation
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]
default_realm = HADOOP.COM
DNS_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
# default_realm = EXAMPLE.COM
# default_ccache_name = KEYRING:persistent:%{uid}
[realms]
HADOOP.COM = {
kdc = bigdata-cdh01.kfk.com
admin_server = bigdata-cdh01.kfk.com
}
[domain_realm]
.bigdata-cdh01.kfk.com = HADOOP.COM
bigdata-cdh01.kfk.com = HADOOP.COM
cat /var/kerberos/krb5kdc/kadm5.acl
*/admin@HADOOP.COM *
cat /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
HADOOP.COM = {
#master_key_type = aes256-cts
max_renewable_life= 7d 0h 0m 0s
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
}
創(chuàng)建kerberos數(shù)據(jù)庫
kdb5_util create -r HADOOP.COM -s
創(chuàng)建kerberos管理賬號(hào)
將kerberos服務(wù)添加為開機(jī)啟動(dòng)
systemctl enable krb5kdc
systemctl enable kadmin
systemctl start krb5kdc
systemctl start kadmin
測(cè)試管理員賬號(hào)
為節(jié)點(diǎn)安裝客戶端
yum -y install krb5-libs krb5-auth-dialog krb5-workstation
在主節(jié)點(diǎn)上安裝額外的包
yum -y install openldap-clients
將krb5.conf文件拷貝到所有kerberos客戶端(批量拷貝)
#!/bin/bash
for i in `cat node.list`
do
scp -r $2 $i:$3
done
sh scp.sh node.list /etc/krb5.conf /etc/
啟動(dòng)kerberos
為kafka開啟kerberos
krb5的一些命令
列出賬號(hào) kadmin.local -q "listprincs"
刪除賬號(hào) kadmin.local -q 'delete_principal hdfs/bigdata-cdh01.kfk.com@HADOOP.COM'
創(chuàng)建賬號(hào)指定密碼 kadmin.local -q "addprinc hdfs/bigdata-cdh01.kfk.com@bd00@HADOOP.COM"
隨機(jī)生成密碼 kadmin.local -q "addprinc -randkey hdfs/bigdata-cdh01.kfk.com@HADOOP.COM"
導(dǎo)出票據(jù) kadmin.local -q "xst -k hdfs.keytab hdfs/bigdata-cdh01.kfk.com@HADOOP.COM"
登錄 kinit -k -t hdfs.keytab hdfs/bigdata-cdh01.kfk.com@HADOOP.COM
查看過期時(shí)間 kadmin.local -q 'getprinc krbtgt/HADOOP.COM@HADOOP.COM'
修改時(shí)間 kadmin.local -q 'modprinc -maxrenewlife "7d" krbtgt/HADOOP.COM@HADOOP.COM'
查看keytab內(nèi)容 klist -e -k -t zookeeper.keytab
不修改密碼導(dǎo)出 kadmin.local -q 'xst -k hdfs.keytab -norandkey hdfs/bigdata-cdh01.kfk.com@HADOOP.COM'
退出登錄 kdestroy
網(wǎng)頁名稱:為kafka開啟kerberos
網(wǎng)站地址:http://aaarwkj.com/article12/pjdpgc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、App開發(fā)、定制開發(fā)、微信小程序、外貿(mào)建站、網(wǎng)站策劃
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)