# yum 换国内镜像 sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.ustc.edu.cn/centos|g' \ -i.bak \ /etc/yum.repos.d/CentOS-Base.repo yum makecache yum install -y centos-release-scl yum install -y epel-release yum install -y openssl-devel yum install -y libcurl-devel yum install -y libevent-devel yum install -y devtoolset-7-gcc* source /opt/rh/devtoolset-7/enable #使能编译环境 如果长期