Image by fedorapeople.org |
In an earlier post, I've explained how to install the first IPA-Server. This time I'll explain how to create a replica.
First, I will add the server to our idm domain and promote the server to be a replica afterwards ( domain level 1 ). To have the necessary steps working, I'll have to use the IPA-Master-Server as the first DNS. Otherwise autodiscovery won't work.
Let's start with /etc/hosts
The output should look like this:
[root@ipa02 ~]$
echo "$(hostname -I | awk '{print $1}') $(hostname) $(hostname -s)" >> /etc/hosts
172.31.10.251 ipa02.archyslife.lan ipa02
Next up, we install the needed packages and update our systemUsing this command, we add the server to our domain.
yum -y update && yum -y install ipa-server ipa-server-dns epel-release
[root@ipa02 ~]$
You can switch to your normal user now.
ipa-client-install --mkhomedir
[root@ipa02 ~]$
Before we can create the replica, we need to configure our firewall to allow connections to the services we want to provide.
Afterwards we can restart the server and the replica is ready to be installed. To install we issue the following command:
sudo firewall-cmd --add-port={80/tcp,443/tcp,389/tcp,636/tcp,88/tcp,464/tcp,53/tcp,88/udp,464/udp,53/udp,123/udp} --permanent
[archy@ipa02 ~]$
sudo firewall-cmd --reload
[archy@ipa02 ~]$
Output:
ipa-replica-install --principal archy
[archy@ipa02 ~]$ sudo
WARNING: conflicting time&date synchronization service 'chronyd' will
be disabled in favor of ntpd
Password for archy@ARCHYSLIFE.LAN:
Run connection check to master
Connection check OK
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: 1 minute
[1/44]: creating directory server user
[2/44]: creating directory server instance
[3/44]: updating configuration in dse.ldif
[4/44]: restarting directory server
[5/44]: adding default schema
[6/44]: enabling memberof plugin
[7/44]: enabling winsync plugin
[8/44]: configuring replication version plugin
[9/44]: enabling IPA enrollment plugin
[10/44]: enabling ldapi
[11/44]: configuring uniqueness plugin
[12/44]: configuring uuid plugin
[13/44]: configuring modrdn plugin
[14/44]: configuring DNS plugin
[15/44]: enabling entryUSN plugin
[16/44]: configuring lockout plugin
[17/44]: configuring topology plugin
[18/44]: creating indices
[19/44]: enabling referential integrity plugin
[20/44]: configuring certmap.conf
[21/44]: configure autobind for root
[22/44]: configure new location for managed entries
[23/44]: configure dirsrv ccache
[24/44]: enabling SASL mapping fallback
[25/44]: restarting directory server
[26/44]: creating DS keytab
[27/44]: retrieving DS Certificate
[28/44]: restarting directory server
[29/44]: setting up initial replication
Starting replication, please wait until this has completed.
Update in progress, 3 seconds elapsed
Update succeeded
[30/44]: adding sasl mappings to the directory
[31/44]: updating schema
[32/44]: setting Auto Member configuration
[33/44]: enabling S4U2Proxy delegation
[34/44]: importing CA certificates from LDAP
[35/44]: initializing group membership
[36/44]: adding master entry
[37/44]: initializing domain level
[38/44]: configuring Posix uid/gid generation
[39/44]: adding replication acis
[40/44]: enabling compatibility plugin
[41/44]: activating sidgen plugin
[42/44]: activating extdom plugin
[43/44]: tuning directory server
[44/44]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring ipa-custodia
[1/5]: Generating ipa-custodia config file
[2/5]: Generating ipa-custodia keys
[3/5]: Importing RA Key
[4/5]: starting ipa-custodia
[5/5]: configuring ipa-custodia to start on boot
Done configuring ipa-custodia.
Configuring Kerberos KDC (krb5kdc). Estimated time: 30 seconds
[1/4]: configuring KDC
[2/4]: adding the password extension to the directory
[3/4]: starting the KDC
[4/4]: 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_memcached
[1/2]: starting ipa_memcached
[2/2]: configuring ipa_memcached to start on boot
Done configuring ipa_memcached.
Configuring the web interface (httpd). Estimated time: 1 minute
[1/20]: setting mod_nss port to 443
[2/20]: setting mod_nss cipher suite
[3/20]: setting mod_nss protocol list to TLSv1.0 - TLSv1.2
[4/20]: setting mod_nss password file
[5/20]: enabling mod_nss renegotiate
[6/20]: adding URL rewriting rules
[7/20]: configuring httpd
[8/20]: configure certmonger for renewals
[9/20]: setting up httpd keytab
[10/20]: setting up ssl
[11/20]: importing CA certificates from LDAP
[12/20]: publish CA cert
[13/20]: clean up any existing httpd ccache
[14/20]: configuring SELinux for httpd
[15/20]: create KDC proxy user
[16/20]: create KDC proxy config
[17/20]: enable KDC proxy
[18/20]: restarting httpd
[19/20]: configuring httpd to start on boot
[20/20]: enabling oddjobd
Done configuring the web interface (httpd).
Applying LDAP updates
Upgrading IPA:
[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.
Configuring ipa-otpd
[1/2]: starting ipa-otpd
[2/2]: configuring ipa-otpd to start on boot
Done configuring ipa-otpd.
This completes the setup used for LDAP and Kerberos. For a working domain and redundancy I'd also recommend to install the dns feature by issuing the command:Output:
ipa-dns-install
[archy@ipa02 ~]$ sudo
The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will setup DNS for the IPA Server.
This includes:
* Configure DNS (bind)
* Configure SoftHSM (required by DNSSEC)
* Configure ipa-dnskeysyncd (required by DNSSEC)
NOTE: DNSSEC zone signing is not enabled by default
To accept the default shown in brackets, press the Enter key.
Do you want to configure DNS forwarders? [yes]:
Following DNS servers are configured in /etc/resolv.conf: 172.31.10.250
Do you want to configure these servers as DNS forwarders? [yes]: 208.67.222.222
Do you want to configure these servers as DNS forwarders? [yes]: 208.67.220.220
Do you want to configure these servers as DNS forwarders? [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 172.31.10.250: 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]:
Adding [172.31.10.251 ipa02.archyslife.lan] to your /etc/hosts file
The following operations may take some minutes to complete.
Please wait until the prompt is returned.
Configuring DNS (named)
[1/8]: generating rndc key file
WARNING: Your system is running out of entropy, you may experience long delays
[2/8]: setting up our own record
[3/8]: adding NS record to the zones
[4/8]: setting up kerberos principal
[5/8]: setting up named.conf
[6/8]: setting up server configuration
[7/8]: configuring named to start on boot
[8/8]: changing resolv.conf to point to ourselves
Done configuring DNS (named).
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
==============================================================================
Setup complete
Global DNS configuration in LDAP server is not empty
The following configuration options override local settings in named.conf:
Global forwarders: 208.67.222.222, 208.67.220.220
Allow PTR sync: FALSE
IPA DNS servers: ipa01.archyslife.lan, ipa02.archyslife.lan,
You must make sure these network ports are open:
TCP Ports:
* 53: bind
UDP Ports:
* 53: bind
Restarting the web server
again, the CA-feature is optional but it's highly recommended to have it installed on atleast 2 servers.To install, use the command
Ouput:
ipa-ca-install
[archy@ipa02 ~]$ sudo
Run connection check to master
Connection check OK
Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes 30 seconds
[1/26]: creating certificate server user
[2/26]: creating certificate server db
[3/26]: setting up initial replication
Starting replication, please wait until this has completed.
Update in progress, 3 seconds elapsed
Update succeeded
[4/26]: creating installation admin user
[5/26]: setting up certificate server
[6/26]: stopping instance to update CS.cfg
[7/26]: backing up CS.cfg
[8/26]: disabling nonces
[9/26]: set up CRL publishing
[10/26]: enable PKIX certificate path discovery and validation
[11/26]: set up client auth to db
[12/26]: destroying installation admin user
[13/26]: Ensure lightweight CAs container exists
[14/26]: Configure lightweight CA key retrieval
[15/26]: starting instance
[16/26]: importing CA chain to RA certificate database
[17/26]: fixing RA database permissions
[18/26]: setting up signing cert profile
[19/26]: setting audit signing renewal to 2 years
[20/26]: configure certificate renewals
[21/26]: configure Server-Cert certificate renewal
[22/26]: Configure HTTP to proxy connections
[23/26]: updating IPA configuration
[24/26]: Restart HTTP server to pick up changes
[25/26]: enabling CA instance
[26/26]: configuring certmonger renewal for lightweight CAs
Done configuring certificate server (pki-tomcatd).
Updating DNS system records
The last thing to install is the kra which is used for password-storing.[archy@ipa02 ~]$ sudo ipa-kra-install
Output: ===================================================================
This program will setup Dogtag KRA for the IPA Server.
Configuring KRA server (pki-tomcatd). Estimated time: 2 minutes
[1/9]: configuring KRA instance
[2/9]: create KRA agent
[3/9]: restarting KRA
[4/9]: configure certmonger for renewals
[5/9]: configure certificate renewals
[6/9]: configure HTTP to proxy connections
[7/9]: add vault container
[8/9]: apply LDAP updates
[9/9]: enabling KRA instance
Done configuring KRA server (pki-tomcatd).
Restarting the directory server
The ipa-kra-install command was successful
Both servers are now in Master/Master Replication Mode.The type of what data is replicated and which directions will be allowed can be configured using the webinterface with following path:
IPA-Server --> Topology --> Topology Graph or using the cli issuing the interactive commands
for domain (LDAP, Kerberos, DNS) and
ipa topologysegment-add Suffix name: domain Left node: ipa01.archyslife.lan Right node: ipa02.archyslife.lan Segment name [ipa01.archyslife.lan-to-ipa02.archyslife.lan]: --------------------------- Added segment "ipa01.archyslife.lan-ipa02.archyslife.lan" --------------------------- Segment name: ipa01.archyslife.lan-ipa02.archyslife.lan Left node: ipa01.archyslife.lan Right node: ipa02.archyslife.lan Connectivity: both
[archy@ipa02 ~]$
for CA replication
ipa topologysegment-add Suffix name: ca Left node: ipa01.archyslife.lan Right node: ipa02.archyslife.lan Segment name [ipa01.archyslife.lan-to-ipa02.archyslife.lan]: --------------------------- Added segment "ipa01.archyslife.lan-ipa02.archyslife.lan" --------------------------- Segment name: ipa01.archyslife.lan-ipa02.archyslife.lan Left node: ipa01.archyslife.lan Right node: ipa02.archyslife.lan Connectivity: both
[archy@ipa02 ~]$
Feel free to comment and / or suggest a topic.
Comments
Post a Comment