1.关闭禁用防火墙和selinux
systemctl disable firewalld --now
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
 

2.保证可以连接外网
 ping -c3 www.baidu.com 

3.配置yum为阿里仓库并下载epel源
mkdir /etc/yum.repos.d/bak/; mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo 
 yum -y install epel-release.noarch 
#查看仓库是否有rpm包
 yum repolist 
                














![QList 的访问方式list.at(index) 和 list[index] 对比](https://i-blog.csdnimg.cn/direct/95cedea9a379492ea24fa5bdc177cacc.png)



