Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说0558-01-如何在Redhat7上安装FreeIPA[亲测有效],希望能够帮助你!!!。
温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。
Fayson的github:
https://github.com/fayson/cdhproject
提示:代码块部分可以左右滑动查看噢
1 文档编写目的
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配置
提示:代码块部分可以左右滑动查看噢
为天地立心,为生民立命,为往圣继绝学,为万世开太平。
温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。
上一篇
已是最后文章
下一篇
已是最新文章