To do this is sample, straight (and boring) process.
First you find where is located package for your distribution and architecture and get the URL. For example for x86_64, CentOS 8 is (one of the mirrors):
http://centos.telecoms.bg/8/BaseOS/x86_64/os/Packages/yum-4.0.9.2-5.el8.noarch.rpm
Next you need to get dependencies of this package (based on what you have already installed) (to be run as root)
# rpm -q -R http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-29.19.0.40-1.el8.x86_64.rpm
/bin/sh
/bin/sh
anaconda-core = 29.19.0.40-1.el8
anaconda-gui = 29.19.0.40-1.el8
anaconda-install-env-deps = 29.19.0.40-1.el8
anaconda-tui = 29.19.0.40-1.el8
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
(in above example I use different package)
So you have already /bin/sh
but need anaconda-core
anaconda-gui
anaconda-install-env-deps
anaconda-tui
rpmlib
Next you search for the URL of those packages in the repo. And check them one by one for dependencies. After getting all the URLs you create one long line to install all of them. Or install first the prerequisites and then the package.
rpm -i http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-29.19.0.40-1.el8.x86_64.rpm \
http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-core-29.19.0.40-1.el8.x86_64.rpm \
http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-gui-29.19.0.40-1.el8.x86_64.rpm \
http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-install-env-deps-29.19.0.40-1.el8.x86_64.rpm \
.....