After downloading a copy of RHEL 7 and installing it in a virtual machine or in a physical server, you still need to register to the RedHat network to get the repository active.
To register to the RedHat network, type:
# subscription-manager register
You will have to type your login and password previously created at the RedHat website.
To activate you subscription, type:
# subscription-manager auto-attach