Use distribution rpm on RedHat 7

Don't install compilation packages.
Use operatingsystemmajrelease instead of lsbmajdistrelease