2022
我们一起努力

Linux下安装FreeIPA具体方法

FreeIPA是一款集成的安全信息管理解决方案。FreeIPA包含Linux (Fedora),389 Directory Server MIT Kerberos, NTP, DNS, Dogtag (Certificate System)等等身份,认证和策略功能,下面为大家分享一下Linux下安装FreeIPA具体方法。

Linux下安装FreeIPA具体方法

环境准备

Centos7.7 虚拟机两台

IPA server 版本 4.6.5

地址信息

VM1作为服务端

VM2作为客户端

Virtual Machine 1/VM1 Virtual Machine 2/VM2
IP/Netmask 192.168.43.138/24 192.168.43.139/24
Gateway 192.168.43.2 192.168.43.2
DNS 114.114.114.114 114.114.114.114

DNS地址先设置成公网地址,因为需要从网络安装软件包。安装完软件包之后需要VM1和VM2的dns地址改成192.168.43.138,也就是改成VM1的地址。

关闭防火墙

两台虚拟机都要关闭防火墙。

# 关闭firewalld 和 selinux设置成Permissive模式
[root@localhost ~]# systemctl stop firewalld && systemctl disable firewalld && setenforce 0
# 关闭selinux
[root@localhost ~]# sed -i '/^SELINUX/s/enforcing/disabled/' /etc/selinux/config

修改主机名和修改/etc/hosts文件

VM1修改内容:

[root@localhost ~]# hostnamectl set-hostname server.linuxprobe.com
[root@localhost ~]# echo '192.168.43.138 server.linuxprobe.com server’ >> /etc/hosts
[root@localhost ~]# echo ‘192.168.43.139 client.linuxprobe.com client' >> /etc/hosts

VM2修改内容:

[root@localhost ~]# hostnamectl set-hostname client.linuxprobe.com
[root@localhost ~]# echo '192.168.43.138 server.linuxprobe.com server’ >> /etc/hosts
[root@localhost ~]# echo ‘192.168.43.139 client.linuxprobe.com client' >> /etc/hosts

开机ntp时间同步

在VM1和VM2上面设置ntp服务器地址为 ntp.aliyun.com

# 注释掉自带的服务器地址
[root@localhost ~]# sed -i 's/^server/#&/' /etc/chrony.conf
# 添加ntp.aliyun.com
[root@localhost ~]# echo 'server ntp.aliyun.com iburst' >> /etc/chrony.conf
# 重启chronyd服务
[root@localhost ~]# systemctl restart chronyd
# 查看ntp状态
[root@localhost ~]# chronyc sources -v
210 Number of sources = 1

 .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample              
===============================================================================
^* 203.107.6.88                  2   6    17    40  -5540us[-5762us] +/-   16ms

然后重启一下VM1和VM2

[root@localhost ~]# reboot

在VM1中配置FreeIPA 服务端

安装ipa-server

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

配置ipa-server

先设置网卡dns地址为本地地址。 Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)

然后配置ipa-server

[root@server ~]# ipa-server-install --setup-dns --forwarder=114.114.114.114
Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)
Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)
Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)
Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)
Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)
Centos7.7 安装FreeIPA (一)Centos7.7 安装FreeIPA (一)
# 为首次登陆的用户创建主目录 ,并且更新配置
[root@server ~]# authconfig --enablemkhomedir --update

本文来源:www.lxlinux.net/4686.html,若引用不当,请联系修改。

赞(0)
文章名称:《Linux下安装FreeIPA具体方法》
文章链接:https://www.fzvps.com/152866.html
本站文章来源于互联网,如有侵权,请联系管理删除,本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
图片版权归属各自创作者所有,图片水印出于防止被无耻之徒盗取劳动成果的目的。

评论 抢沙发

评论前必须登录!