Red Hat Enterprise Linux 8 / CentOS 8
Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on a minimal Red Hat Enterprise Linux (RHEL) 8 or CentOS 8 installation: 
# yum install docbook-style-xsl gcc gdb gnutls-devel gpgme-devel jansson-devel \
      keyutils-libs-devel krb5-workstation libacl-devel libaio-devel \
      libarchive-devel libattr-devel libblkid-devel libtasn1 libtasn1-tools \
      libxml2-devel libxslt lmdb-devel openldap-devel pam-devel perl \
      perl-ExtUtils-MakeMaker perl-Parse-Yapp popt-devel python3-cryptography \
      python3-dns python3-gpg python36-devel readline-devel rpcgen systemd-devel \
      tar zlib-devel
To install all required packages, you must enable the following repositories: 
RHEL 8 	CentOS 8 	
Base 	Base 	
AppStream 	AppStream 	
CodeReady Linux Builder* 	PowerTools 	
EPEL** 	EPEL** 	

* For further details about the CodeReady Linux Builder repository, see https://access.redhat.com/articles/4348511. 
** The Extra Packages for Enterprise Linux (EPEL) repository is not part of the distribution. For further details about EPEL, see https://fedoraproject.org/wiki/EPEL. 
For enabling PowerTools repository on CentOS 8, please use following commands: 
# yum -y install dnf-plugins-core
# yum config-manager --set-enabled PowerTools
If the DC should act as a print server with CUPS back end, additionally install the following package 
# yum install cups-devel