IPA 安装

本文介绍了IDM服务器的配置步骤,包括配置静态IP和主机名称并重启机器,安装IPA软件,在windows的etc/hosts文件中进行相关写入操作,使用ipa - server - install命令,最后在浏览器输入指定网址,完成配置。

配置IDM服务器

1、配置静态IP,以及主机名称

 cd /etc/sysconfig/network-scripts/
 
   vi ifcfg-ens33

在这里插入图片描述

vi   /etc/hostname

在这里插入图片描述

修改成功后重启机器

2、安装IPA软件

 yum install ipa-server ipa-server-dns -y

3、

systemctl   start  named

systemctl   enable   named

systemctl   start   network

4、在windows的etc/hosts文件下,仍要写出

192.168.76.150 ipa  ipa.examplelable.cc

5、

ipa-server-install

[root@ipa ~]# ipa-server-install

The log file for this installation can be found in /var/log/ipaserver-install.log

This program will set up the IPA Server.

This includes:
* Configure a stand-alone CA (dogtag) for certificate management
* Configure the Network Time Daemon (ntpd)
* Create and configure an instance of Directory Server
* Create and configure a Kerberos Key Distribution Center (KDC)
* Configure Apache (httpd)
* Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Do you want to configure integrated DNS (BIND)? [no]: ***yes***

Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.

Server host name [ipa.kclouder.local]: *ipa.kclouder.local*

Warning: skipping DNS resolution of host ipa.kclouder.local
The domain name has been determined based on the host name.

Please confirm the domain name [kclouder.local]: *kclouder.local*

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.
Please provide a realm name [KCLOUDER.LOCAL]: **KCLOUDER.LOCAL**
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.

Directory Manager password:    <--输入密码(Directory manager password)
Password (confirm):    <--输入密码(Directory manager password)

The IPA server requires an administrative user, named 'admin'.
This user is a regular system account used for IPA server administration.

IPA admin password:    <--输入密码(IPA Admin password)
Password (confirm):    <--输入密码(IPA Admin password)

Checking DNS domain kclouder.local., please wait …
Do you want to configure DNS forwarders? [yes]: YES
Following DNS servers are configured in /etc/resolv.conf: 192.168.17.2
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: 8.8.8.8
DNS forwarder 8.8.8.8 added. You may add another.
Enter an IP address for a DNS forwarder, or press Enter to skip: 
Checking DNS forwarders, please wait …
DNS server 192.168.17.2: 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**

The IPA Master Server will be configured with:
Hostname:       ipa.kclouder.local
IP address(es): 192.168.17.20
Domain name:    kclouder.local
Realm name:     KCLOUDER.LOCAL

BIND DNS server will be configured to serve IPA domain with:
Forwarders:       192.168.17.2, 8.8.8.8
Forward policy:   only
Reverse zone(s):  No reverse zone

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.

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv). Estimated time: 30 seconds
  [1/45]: creating directory server instance
  [2/45]: enabling ldapi
  [3/45]: configure autobind for root
  [4/45]: stopping directory server
  [5/45]: updating configuration in dse.ldif
  [6/45]: starting directory server
  [7/45]: adding default schema
  [8/45]: enabling memberof plugin
  [9/45]: enabling winsync plugin
  [10/45]: configuring replication version plugin
  [11/45]: enabling IPA enrollment plugin
  [12/45]: configuring uniqueness plugin
  [13/45]: configuring uuid plugin
  [14/45]: configuring modrdn plugin
  [15/45]: configuring DNS plugin
  [16/45]: enabling entryUSN plugin
  [17/45]: configuring lockout plugin
  [18/45]: configuring topology plugin
  [19/45]: creating indices
  [20/45]: enabling referential integrity plugin
  [21/45]: configuring certmap.conf
  [22/45]: configure new location for managed entries
  [23/45]: configure dirsrv ccache
  [24/45]: enabling SASL mapping fallback
  [25/45]: restarting directory server
  [26/45]: adding sasl mappings to the directory
  [27/45]: adding default layout
  [28/45]: adding delegation layout
  [29/45]: creating container for managed entries
  [30/45]: configuring user private groups
  [31/45]: configuring netgroups from hostgroups
  [32/45]: creating default Sudo bind user
  [33/45]: creating default Auto Member layout
  [34/45]: adding range check plugin
  [35/45]: creating default HBAC rule allow_all
  [36/45]: adding entries for topology management
  [37/45]: initializing group membership
  [38/45]: adding master entry
  [39/45]: initializing domain level
  [40/45]: configuring Posix uid/gid generation
  [41/45]: adding replication acis
  [42/45]: activating sidgen plugin
  [43/45]: activating extdom plugin
  [44/45]: tuning directory server
  [45/45]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring Kerberos KDC (krb5kdc)
  [1/10]: adding kerberos container to the directory
  [2/10]: configuring KDC
  [3/10]: initialize kerberos container
  [4/10]: adding default ACIs
  [5/10]: creating a keytab for the directory
  [6/10]: creating a keytab for the machine
  [7/10]: adding the password extension to the directory
  [8/10]: creating anonymous principal
  [9/10]: starting the KDC
  [10/10]: configuring KDC to start on boot
Done configuring Kerberos KDC (krb5kdc).
Configuring kadmin
  [1/2]: starting kadmin 
  [2/2]: configuring kadmin to start on boot
Done configuring kadmin.
Configuring ipa-custodia
  [1/5]: Making sure custodia container exists
  [2/5]: Generating ipa-custodia config file
  [3/5]: Generating ipa-custodia keys
  [4/5]: starting ipa-custodia 
  [5/5]: configuring ipa-custodia to start on boot
Done configuring ipa-custodia.
Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes
  [1/29]: configuring certificate server instance
  [2/29]: exporting Dogtag certificate store pin
  [3/29]: stopping certificate server instance to update CS.cfg
  [4/29]: backing up CS.cfg
  [5/29]: disabling nonces
  [6/29]: set up CRL publishing
  [7/29]: enable PKIX certificate path discovery and validation
  [8/29]: starting certificate server instance
  [9/29]: configure certmonger for renewals
  [10/29]: requesting RA certificate from CA
  [11/29]: setting up signing cert profile
  [12/29]: setting audit signing renewal to 2 years
  [13/29]: restarting certificate server
  [14/29]: publishing the CA certificate
  [15/29]: adding RA agent as a trusted user
  [16/29]: authorizing RA to modify profiles
  [17/29]: authorizing RA to manage lightweight CAs
  [18/29]: Ensure lightweight CAs container exists
  [19/29]: configure certificate renewals
  [20/29]: configure Server-Cert certificate renewal
  [21/29]: Configure HTTP to proxy connections
  [22/29]: restarting certificate server
  [23/29]: updating IPA configuration
  [24/29]: enabling CA instance
  [25/29]: migrating certificate profiles to LDAP
  [26/29]: importing IPA certificate profiles
  [27/29]: adding default CA ACL
  [28/29]: adding 'ipa' CA entry
  [29/29]: configuring certmonger renewal for lightweight CAs
Done configuring certificate server (pki-tomcatd).
Configuring directory server (dirsrv)
  [1/3]: configuring TLS for DS instance
  [2/3]: adding CA certificate entry
  [3/3]: restarting directory server
Done configuring directory server (dirsrv).
Configuring ipa-otpd
  [1/2]: starting ipa-otpd 
  [2/2]: configuring ipa-otpd to start on boot
Done configuring ipa-otpd.
Configuring the web interface (httpd)
  [1/22]: stopping httpd
  [2/22]: setting mod_nss port to 443
  [3/22]: setting mod_nss cipher suite
  [4/22]: setting mod_nss protocol list to TLSv1.0 - TLSv1.2
  [5/22]: setting mod_nss password file
  [6/22]: enabling mod_nss renegotiate
  [7/22]: disabling mod_nss OCSP
  [8/22]: adding URL rewriting rules
  [9/22]: configuring httpd
  [10/22]: setting up httpd keytab
  [11/22]: configuring Gssproxy
  [12/22]: setting up ssl
  [13/22]: configure certmonger for renewals
  [14/22]: importing CA certificates from LDAP
  [15/22]: publish CA cert
  [16/22]: clean up any existing httpd ccaches
  [17/22]: configuring SELinux for httpd
  [18/22]: create KDC proxy config
  [19/22]: enable KDC proxy
  [20/22]: starting httpd
  [21/22]: configuring httpd to start on boot
  [22/22]: enabling oddjobd
Done configuring the web interface (httpd).
Configuring Kerberos KDC (krb5kdc)
  [1/1]: installing X509 Certificate for PKINIT
Done configuring Kerberos KDC (krb5kdc).
Applying LDAP updates
Upgrading IPA:. Estimated time: 1 minute 30 seconds
  [1/9]: stopping directory server
  [2/9]: saving configuration
  [3/9]: disabling listeners
  [4/9]: enabling DS global lock
  [5/9]: starting directory server
  [6/9]: upgrading server
  [7/9]: stopping directory server
  [8/9]: restoring configuration
  [9/9]: starting directory server
Done.
Restarting the KDC
Configuring DNS (named)
  [1/11]: generating rndc key file
  [2/11]: adding DNS container
  [3/11]: setting up our zone
  [4/11]: setting up our own record
  [5/11]: setting up records for other masters
  [6/11]: adding NS record to the zones
  [7/11]: setting up kerberos principal
  [8/11]: setting up named.conf
  [9/11]: setting up server configuration
  [10/11]: configuring named to start on boot
  [11/11]: changing resolv.conf to point to ourselves
Done configuring DNS (named).
Restarting the web server to pick up resolv.conf changes
Configuring DNS key synchronization service (ipa-dnskeysyncd)
  [1/7]: checking status
  [2/7]: setting up bind-dyndb-ldap working directory
  [3/7]: setting up kerberos principal
  [4/7]: setting up SoftHSM
  [5/7]: adding DNSSEC containers
  [6/7]: creating replica keys
  [7/7]: configuring ipa-dnskeysyncd to start on boot
Done configuring DNS key synchronization service (ipa-dnskeysyncd).
Restarting ipa-dnskeysyncd
Restarting named
Updating DNS system records
Configuring client side components
Using existing certificate '/etc/ipa/ca.crt'.
Client hostname: ipa.kclouder.local
Realm: KCLOUDER.LOCAL
DNS Domain: kclouder.local
IPA Server: ipa.kclouder.local
BaseDN: dc=kclouder,dc=local
Skipping synchronizing time with NTP server.
New SSSD config will be created
Configured sudoers in /etc/nsswitch.conf
Configured /etc/sssd/sssd.conf
trying https://ipa.kclouder.local/ipa/json
trying https://ipa.kclouder.local/ipa/session/json
Systemwide CA database updated.
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
SSSD enabled
Configured /etc/openldap/ldap.conf
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Configuring kclouder.local as NIS domain.
Client configuration complete.
The ipa-client-install command was successful

==============================================================================

Setup complete

Next steps:
    1. You must make sure these network ports are open:
        TCP Ports:
          * 80, 443: HTTP/HTTPS
          * 389, 636: LDAP/LDAPS
          * 88, 464: kerberos
          * 53: bind
        UDP Ports:
          * 88, 464: kerberos
          * 53: bind
          * 123: ntp
2. You can now obtain a kerberos ticket using the command: 'kinit admin'
   This ticket will allow you to use the IPA tools (e.g., ipa user-add)
   and the web user interface.

Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password
[root@ipa ~]#

6、在windows的etc/hosts文件中写上

192.168.76.150   ipa    ipa.examplelable.cc

7、在浏览器中输入ipa.examplelable.cc
在这里插入图片描述

此时,会出现

在这里插入图片描述

即可成功

<think>我们正在回答用户关于FreeIPA安装和配置的问题。用户之前询问了FreeIPA的主备架构,现在明确要求了解安装步骤和配置指南。根据用户提供的引用,特别是引用[1]中提到了使用Ansible Playbook来部署FreeIPA Server,我们可以参考这一点。同时,结合FreeIPA的官方文档,给出安装和配置的步骤。 注意:用户提供的引用中,引用[1]是关于Ansible部署FreeIPAinventory配置示例,引用[2]是关于配置LDAP身份验证的步骤(与FreeIPA相关,但主要是针对Impala的LDAP配置),引用[3]和[4]与FreeIPA无关。 因此,我们将重点放在引用[1]中提到的Ansible部署方法,同时补充常规的手动安装步骤。 回答结构: 1. 安装前的准备 2. 使用Ansible Playbook安装(参考引用[1]) 3. 手动安装步骤(主服务器和副本服务器) 4. 基本配置(包括DNS、用户、组等) 5. 客户端配置 注意:由于FreeIPA安装和配置较为复杂,这里提供关键步骤的概述。 同时,根据要求,生成相关问题。</think>### FreeIPA 安装与配置指南 FreeIPA 是一个集成的身份管理系统,结合了 LDAP、Kerberos、DNS 和证书服务。以下是完整的安装与配置流程: --- #### **一、安装前准备** 1. **系统要求** - 操作系统:CentOS/RHEL 7+ 或 Fedora - 主机名:需配置 FQDN(如 `ipa-server.example.com`) - 时间同步:启用 NTP 服务(`chronyd` 或 `ntpd`) - 防火墙:开放必要端口 ```bash firewall-cmd --add-service={http,https,dns,ntp,ldap,ldaps,kerberos} --permanent firewall-cmd --reload ``` 2. **DNS 配置** - 确保正反向 DNS 解析正常: ```bash hostname -f # 检查 FQDN dig +short ipa-server.example.com # 验证正向解析 dig +short -x <server_ip> # 验证反向解析 ``` --- #### **二、安装 FreeIPA Server** ##### 方法 1:手动安装(推荐) ```bash # 安装软件包 sudo yum install -y ipa-server ipa-server-dns # 运行安装向导 sudo ipa-server-install # 按提示输入配置: # - 域名:example.com # - Realm:EXAMPLE.COM(通常与域名大写一致) # - 管理员密码:设置强密码 # - DNS 配置:选择集成 DNS(需配置正向/反向解析) # - 其他选项:默认回车 ``` ##### 方法 2:使用 Ansible Playbook(引用[1]) 1. 创建 `inventory.ini`: ```ini [freeipa_servers] ipaserver ansible_host=192.168.1.10 ansible_user=admin ansible_password=your_password [freeipa_clients] client1 ansible_host=192.168.1.20 ``` 2. 运行 Playbook: ```bash ansible-playbook -i inventory.ini freeipa-server-setup.yml ``` --- #### **三、配置 FreeIPA Server** 1. **初始登录与配置** ```bash # 获取 Kerberos 票据 kinit admin # 验证登录 ipa user-find admin ``` 2. **添加用户/组** ```bash ipa user-add alice --first=Alice --last=Smith --password ipa group-add developers --desc="Development Team" ipa group-add-member developers --users=alice ``` 3. **DNS 管理(若启用集成 DNS)** ```bash ipa dnszone-add example.com ipa dnsrecord-add example.com www --a-rec=192.168.1.100 ``` 4. **配置 LDAP 身份验证(引用[2])** 在客户端配置文件中(如 `/etc/openldap/ldap.conf`): ```conf URI ldaps://ipa-server.example.com BASE dc=example,dc=com TLS_CACERT /etc/ipa/ca.crt ``` --- #### **四、高可用部署(主备架构)** 1. **添加副本服务器** ```bash # 在副本服务器上执行 sudo ipa-replica-install --setup-ca --setup-dns --principal admin ``` 2. **验证复制状态** ```bash ipa-replica-manage list # 查看拓扑 ipa-replica-manage list <master_host> --agreements # 检查同步状态 ``` 3. **客户端故障转移配置** 在 DNS 中添加 SRV 记录(如 `_ldap._tcp.example.com`): ```dns _kerberos._tcp IN SRV 0 100 88 ipa-master.example.com. _kerberos._tcp IN SRV 10 100 88 ipa-replica.example.com. ``` --- #### **五、客户端加入域** ```bash # 安装客户端工具 sudo yum install -y freeipa-client # 加入域 sudo ipa-client-install \ --server=ipa-server.example.com \ --domain=example.com \ --realm=EXAMPLE.COM \ --principal=admin \ --password=<admin_password> \ --mkhomedir # 自动创建用户家目录 ``` --- #### **六、验证与测试** 1. **用户登录测试** ```bash ssh alice@client.example.com # 使用 FreeIPA 用户凭证登录 ``` 2. **Kerberos 票据检查** ```bash klist # 查看票据 kinit alice # 获取新票据 ``` 3. **LDAP 查询** ```bash ldapsearch -x -H ldaps://ipa-server.example.com -b "dc=example,dc=com" "(uid=alice)" ``` --- ### 常见问题排查 - **DNS 解析失败**:检查 `/etc/resolv.conf` 是否指向 FreeIPA DNS。 - **复制延迟**:使用 `ipa-replica-manage list` 检查状态,日志在 `/var/log/dirsrv/slapd-INSTANCE/`。 - **证书问题**:确保客户端安装了 CA 证书(路径:`/etc/ipa/ca.crt`)。 > 提示:详细日志位于 `/var/log/ipa/` 目录。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值