Install samba4 from source code on CentOS8
How to install samba v4.13.0 from source code on CentOS 8
1. First, introduce the epel repository
$ sudo dnf -y install epel-release
2. Install the required libraries
$ sudo dnf install python36 python36-devel zlib-devel lmdb-devel gnutls-devel perl-Parse-Yapp jansson-devel libacl-devel openldap-devel pam-devel dbus-devel
$ sudo dnf install --enablerepo=PowerTools gpgme-devel libarchive-devel rpcgen
3. Build
$ sudo ./configure --prefix=/usr/local/samba-4.13.0/
$ sudo make -j2
$ sudo make -j2 install
4. systemd settings
$ sudo cp -a bin/default/packaging/systemd/smb.service /lib/systemd/system/
$ sudo cp -a bin/default/packaging/systemd/nmb.service /lib/systemd/system/
$ sudo systemctl daemon-reload
5. Enable samba startup and automatic startup
$ sudo systemctl start smb
$ sudo systemctl start nmb
$ sudo systemctl enable smb
$ sudo systemctl enable nmb