Check what repos you have (this is a fragment from here):
# yum repolist ... repo id repo name status epel epel 11,155+144 ol_latest ol_latest 10,795+3,600
I presume that you may not have any repos installed.
The package rpm-build should be available in the main centos repo.