Configure yum repository

how to configure yum server to get rpms from any repository or redhat repo.

If you just searched in this forum, I would get you answer. A few days back, I posted about the same in here:

Chapter�5.�Yum

see if it is useful to you.

why does your question sound like RHSCA exam question to me?

This is how my repo looked like (mount from DVD)

# mount -r -t iso9660 /dev/sr0 /repo

# more /etc/yum.repos.d/dvd.repo

[dvd]
name=dvd installation
baseurl=file:///repo/Server
gpgcheck=0

I have found this video very helpful for you.
U can easily configure using simple steps.
Yum config both server & client side.