离线安装Kerberos

芒果1年前技术文章1719

首先下载kerberos客户端所需rpm包
在网站https://pkgs.org/搜索以下3个rpm包:
https://pkgs.org/
libkadm5
krb5-libs
krb5-workstation
(还有个krb5-server包,是服务端需要安装的,本次只安装客户端就不需要)
krb5-server(服务端安装)
./krb5-server-1.15.1-55.el7_9.x86_64.rpm
./krb5-libs-1.15.1-55.el7_9.x86_64.rpm
./krb5-workstation-1.15.1-55.el7_9.x86_64.rpm
./libkadm5-1.15.1-55.el7_9.x86_64.rpm
./libevent-2.0.21-4.el7.x86_64.rpm
./libverto-libevent-0.2.5-4.el7.x86_64.rpm
安装顺序:
rpm -Uvh krb5-libs-1.15.1-55.el7_9.x86_64.rpm
rpm -ivh libkadm5-1.15.1-55.el7_9.x86_64.rpm
rpm -ivh libevent-2.0.21-4.el7.x86_64
rpm -ivh libverto-libevent-0.2.5-4.el7.x86_64.rpm
rpm -ivh krb5-workstation-1.15.1-55.el7_9.x86_64.rpm
rpm -ivh words-3.0-22.el7.noarch.rpm
如果安装server 执行rpm -ivh krb5-server.x86_64.0.1.15.1-55.el7_9
ps
./base/packages/libevent-2.0.21-4.el7.x86_64.rpm
./base/packages/libverto-libevent-0.2.5-4.el7.x86_64.rpm
./base/packages/words-3.0-22.el7.noarch.rpm
./updates/packages/krb5-libs-1.15.1-55.el7_9.x86_64.rpm
./updates/packages/krb5-server-1.15.1-55.el7_9.x86_64.rpm
./updates/packages/krb5-workstation-1.15.1-55.el7_9.x86_64.rpm
./updates/packages/libkadm5-1.15.1-55.el7_9.x86_64.rpm


http://mirror.centos.org/centos/7/os/x86_64/Packages/libkadm5-1.15.1-50.el7.x86_64.rpm
http://mirror.centos.org/centos/7/os/x86_64/Packages/krb5-libs-1.15.1-50.el7.x86_64.rpm
http://mirror.centos.org/centos/7/os/x86_64/Packages/krb5-workstation-1.15.1-50.el7.x86_64.rpm
http://mirror.centos.org/centos/7/os/x86_64/Packages/krb5-server-1.15.1-50.el7.x86_64.rpm
安装rpm包
rpm -ivh libkadm5的rpm文件名
rpm -ivh krb5-libs的rpm文件名
rpm -ivh krb5-workstation的rpm文件名
注意:
krb5-server-1.15.1-50.el7.x86_64.rpm
启动krb5kdc前需要配置
/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
pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
default_realm = HADOOP.COM
[realms]
HADOOP.COM = {
  kdc = 172.16.121.147
  admin_server = 172.16.121.147
}
[domain_realm]
.hadoop.com = HADOOP.COM
hadoop.com =  HADOOP.COM
修改server服务端的配置文件kdc.conf
vim /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
  #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
}
配置阶段
创建kerberos数据库
[root@hdp01 ~]# kdb5_util create -s -r HADOOP.COM
Loading random data
Initializing database '/var/kerberos/krb5kdc/principal' for realm 'HADOOP.COM',
master key name 'K/M@HADOOP.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:
(123456)
[root@hdp01 ~]#
创建管理员admin
[root@hdp01 ~]# kadmin.local -q "addprinc admin/admin"
Authenticating as principal root/admin@HADOOP.COM with password.
WARNING: no policy specified for admin/admin@HADOOP.COM; defaulting to no policy
Enter password for principal "admin/admin@HADOOP.COM":
Re-enter password for principal "admin/admin@HADOOP.COM":
Principal "admin/admin@HADOOP.COM" created.
(123456)
[root@hdp01 ~]#
给管理员账户添加acl权限
[root@hdp01 ~]# cat /var/kerberos/krb5kdc/kadm5.acl
*/admin@HADOOP.COM      * 


标签: 大数据运维

相关文章

CDP实操--Ranger开启ldap认证

CDP实操--Ranger开启ldap认证

集群中已经部署了ldap主主模式,并且使用haproxy进行负载均衡,keepalive提供了虚拟ip。页面配置:Ranger进行同步用户:验证:使用ldap用户登录页面:FAQ:1、admin超级管...

Mac安装Hadoop文档-保姆级操作(一)

Mac安装Hadoop文档-保姆级操作(一)

首先配置ssh环境在Mac下如果想使用Hadoop,必须要配置ssh环境, 如果不执行这一步,后面启动hadoop时会出现Connection refused连接被拒绝的错误。首先终端命令框输入:ss...

ES运维(六)_segment合并使用原理及场景

ES运维(六)_segment合并使用原理及场景

一、背景简介ES中,每个index(索引)都包含若干个Shard(分片),每个分片底层又是一个个Segment文件(段),每次数据的读写底层就是与一个个段文件的交互,因此ES调优常用的一块就是对段文件...

Hive架构图及Hive SQL的执行流程

Hive架构图及Hive SQL的执行流程

1、Hive产生背景MapReduce编程的不便性HDFS上的文件缺少Schema(表名,名称,ID等,为数据库对象的集合)2、Hive是什么Hive的使用场景是什么?基于Hadoop做一些数据清洗啊...

Hadoop集群小文件合并优化建议指导

Hadoop集群小文件合并优化建议指导

1 综述1.1 综述本指导书旨在指导大数据集群使用者在大数据集群小文件较多的情况下,针对小文件进行优化处理,有效减小集群文件对象数目,减缓namenode所承载的压力,减少mapreduce任务扫描文...

idea打包java可执行jar包

idea打包java可执行jar包

1,在项目上鼠标右键 --> Open Module SettingsArtifacts --> + --> JAR --> From modules with depende...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。