[root@kickstart ~]# rpm -qf /etc/redhat-release centos-release-7-4.1708.el7.centos.x86_64
yum中的$releasever变量是取redhat-release-server rpm包的属性值( %{version})。
[root@ldap01 ~]# rpm -q --qf %{version} redhat-release-server;echo
6Server
[root@kickstart ~]# arch
x86_64
参考
http://blog.sina.com.cn/s/blog_69b59e3b0101lu12.html
http://blog.csdn.net/whatday/article/details/51097456