Install vsftpd (very secure file transfer protocol daemon) and createrepo (tool to create repositories):

# yum install -y vsftpd createrepo

Start vsftpd and enable autostart at boot:

# systemctl enable vsftpd.service
# systemctl start vsftpd.service

Configure firewalld to allow ftp service (default port 21):

# firewall-cmd --permanent --add-service=ftp
# firewall-cmd --reload

Create the custom repository on the server with createrepo:

# mkdir /var/ftp/pub/customrepo
# createrepo /var/ftp/pub/customrepo


CLIENT SETUP

Create a new file: /etc/yum.repos.d/customrepo.repo :

# vi /etc/yum.repos.d/customrepo.repo

[customrepo]
name=Custom Repo
baseurl=ftp://server.example.local/pub/customrepo
enabled=1
gpgcheck=0

Update the repository cache:

# yum repolist