你的脚本操作是??
本地YUM源设置,可参考:
https://blog.csdn.net/qq_37674858/article/details/93028842
自定义仓库,可参考:
https://www.cnblogs.com/sunqim16/p/6580644.html
阿里源的配置方法:https://developer.aliyun.com/mirror/centos
阿里源EPEL源配置方法:http://developer.aliyun.com/mirror/epel
你按照教程配置源就可以了