systemctl stop firewalld
systemctl disable firewalld
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 http://mirrors.aliyun.com/repo/Centos-7.repo
echo "nameserver 114.114.114.114" > /etc/resolv.conf
yum clean all
cd /etc/pki/rpm-gpg/
wget https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
setenforce 0
sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
yum install -y epel-release
yum install -y python-pip python36 python36-pip
pip install --upgrade pip
pip install netaddr
pip install --upgrade jinja2
如有缺失的rpm包,可以到
http://mirror.centos.org/centos/7/updates/x86_64/Packages
下载