kerberos安装及高可用配置

本文详细介绍了如何在181、182和183服务器上安装及配置Kerberos服务,实现高可用。主要内容包括安装KDC服务、修改配置文件、创建数据库和管理账号、设置自启动服务、进行主从同步、配置定时任务以及测试故障切换。通过这些步骤,确保了Kerberos服务在集群中的稳定运行。
摘要由CSDN通过智能技术生成

一.

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
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值