如何在Redhat7上安装FreeIPA

 

FreeIPA是一个Linux环境下开源的身份管理系统,它提供了用户管理和身份验证,就跟Fayson前面介绍的Microsoft Active Directory或OpenLDAP。FreeIPA集成了Directory Server、Kerberos、PKI、DNS、Certmonger、NTP Server、WebUI、Trusts、Client等组件,也就是说在Hadoop集群要统一用户管理和安全认证一个它就足够了。本篇文章Fayson主要介绍如何在Redhat7上安装FreeIPA。 

 

  • 内容概述

1.环境准备

2.FreeIPA安装

3.FreeIPA使用

 

  • 测试环境

1.RedHat7.3

2.FreeIPA4.6.4

 

2

环境准备

 

1.首先要确保安装FreeIPA服务的服务器主机名为完全限定域名(FQDN),Fayson这里使用cdh4.fayson.com作为本篇文章教程的FQDN。

 

 

在redhat7下可以使用如下命令修改hostname

 

 

配置本机HOSTS

 

 

2.FreeIPA安装需要大量的随机数运行加密操作,需要安装rngd服务防止操作系统的熵值过低

 

[root@cdh4 ~]# yum -y install rng-tools

 

 

启动rngd服务并设置为开机自启动

 

[root@cdh4 ~]# systemctl start rngd

[root@cdh4 ~]# systemctl status rngd

[root@cdh4 ~]# systemctl enable rngd

 

 

3.FreeIPA依赖需要启用IPv6堆栈,修改/etc/sysctl.conf文件增加如下内容

 

net.ipv6.conf.lo.disable_ipv6 = 0

net.ipv6.conf.all.disable_ipv6 = 0

net.ipv6.conf.default.disable_ipv6 = 0

 

 

执行sysctl -p命令使其生效

 

 

3

安装FreeIPA

 

1.安装FreeIPA服务依赖包

 

[root@cdh4 ~]# yum -y install ipa-server ipa-server-dns bind bind-dyndb-ldap

 

 

2.在命令行执行如下命令安装FreeIPA服务

 

[root@cdh04 ~]# ipa-server-install
...
Do you want to configure integrated DNS (BIND)? [no]: yes
Server host name [cdh04.fayson.net]: 回车

Please confirm the domain name [fayson.net]: 回车

Please provide a realm name [FAYSON.NET]: 回车

Directory Manager password:********
Password (confirm):********


IPA admin password:********
Password (confirm):********

Do you want to configure DNS forwarders? [yes]: yes
Following DNS servers are configured in /etc/resolv.conf: 183.60.83.19, 183.60.82.98
Do you want to configure these servers as DNS forwarders? [yes]: yes
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 回车
Checking DNS forwarders, please wait ...
DNS server 183.60.83.19: answer to query '. SOA' is missing DNSSEC signatures (no RRSIG data)
Please fix forwarder configuration to enable DNSSEC support.
(For BIND 9 add directive "dnssec-enable yes;" to "options {}")
DNS server 183.60.82.98: answer to query '. SOA' is missing DNSSEC signatures (no RRSIG data)
Please fix forwarder configuration to enable DNSSEC support.
(For BIND 9 add directive "dnssec-enable yes;" to "options {}")
WARNING: DNSSEC validation will be disabled
Do you want to search for missing reverse zones? [yes]: yes
Do you want to create reverse zone for IP 172.27.0.3 [yes]: 回车
Please specify the reverse zone name [0.27.172.in-addr.arpa.]: 回车
Using reverse zone(s) 0.27.172.in-addr.arpa.

The IPA Master Server will be configured with:
Hostname:       cdh04.fayson.net
IP address(es): 172.27.0.3
Domain name:    fayson.net
Realm name:     FAYSON.NET

BIND DNS server will be configured to serve IPA domain with:
Forwarders:       183.60.83.19, 183.60.82.98
Forward policy:   only
Reverse zone(s):  0.27.172.in-addr.arpa.

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

 

 

3.输入”yes”等待FreeIPA服务的安装

 

 

4.等待FreeIPA服务的各个组件安装完成,如下截图显示FreeIPA安装完成

 

 

5.在命令行执行如下命令查看FreeIPA服务状态

 

[root@cdh4 ~]# ipactl status

 

 

ipactl命令可对FreeIPA服务进行启动、停止、重启、查看状态等操作

 

 

4

FreeIPA使用

 

1.在浏览器输入https://cdh04.fayson.net进入FreeIPA管理界面

 

 

默认管理员为admin,密码为安装时命令行设置的。

 

2.进入管理主界面,可以看到用户列表

 

 

3.添加一个测试用户cdhadmin

 

 

添加成功

 

 

点击创建的用户名可以进入用户详细属性编辑界面

 

 

4.在FreeIPA服务器上查看cdhadmin用户是否已存在

 

[root@cdh4 ~]# cat /etc/passwd |grep cdhadmin

[root@cdh4 ~]# id cdhadmin

[root@cdh4 ~]# kinit cdhadmin

[root@cdh4 ~]# klist

 

 

可以看到通过FreeIPA创建的用户,默认为该用户创建了对应的Kerberos账号,并且用户已同步至OS。

 

5

总结

 

 

1.FreeIPA服务集成了LDAP及KDC服务,便于统一管理用户信息

 

2.Fayson安装FreeIPA时直接集成了默认的DNS服务,推荐使用它默认提供的DNS服务,使用外部的DNS服务集成会复杂很多,在集成DNS服务时也可以指定forwarders,将解析转到其它的DNS服务

 

 

3.由于FreeIPA运行需要大量的随机数进行加密算法,为防止系统熵值过低可以安装rngd服务

 

4.FreeIPA需要依赖ipv6的堆栈需要在/etc/sysctl.conf文件中启用ipv6配置

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值