CentOS7.5配置阿里云yum源和epel源

一、安装环境

cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

二、命令

yum install -y wget \
&& mkdir -p /etc/yum.repos.d/repo_bak \
&& mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo_bak/ \
&& wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo \
&& wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo \
&& yum clean all && yum makecache && yum update -y 

你可能感兴趣的:(Linux运维)