To create a local yum repo, all you need to do is to make sure the packages are available in a path in the server, say /downloaded_packages/
Now, create a repo file. Be default, all repo files are present in the path /etc/yum.repos.d/ . I am going to name my repo as local_yum, so I will create a repo file named local_yum.repo and add the following contents in it.
Total download size: 547 k
Installed size: 2.0 M
Is this ok [y/d/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Installing : wget-1.14-18.el7_6.1.x86_64 1/1
install-info: No such file or directory for /usr/share/info/wget.info.gz
Verifying : wget-1.14-18.el7_6.1.x86_64 1/1
Since there is only one repo present in my case, my default the package will be installed from my local_yum repo that we just created. In your case, if more repos are present, then you will have to choose the repo while installing the package, to confirm it’s working correctly.