安装rpm build工具
yum install rpm* rpm-build rpmdev*
以安装vdsm-4.18.3-0.el7ev.src.rpm为例
1、执行命令:rpm -i vdsm-4.18.3-0.el7ev.src.rpm
2、执行命令:cd /root/rpmbuild/SPECS
3、执行命令:rpmbuild -bb vdsm.spec
4、执行命令:cd /root/rpmbuild/RPMS/x86_64
5、执行命令:yum localinstall vdsm-4.18.3-0.el7.centos.x86_64.rpm