龙空技术网

Linux安装源更换为aliyun

武汉王老吉 338

前言:

目前咱们对“ubuntu配置yum源”大约比较关怀,咱们都想要剖析一些“ubuntu配置yum源”的相关知识。那么小编也在网上汇集了一些有关“ubuntu配置yum源””的相关知识,希望姐妹们能喜欢,各位老铁们快快来学习一下吧!

Ubuntu系统:

vi /etc/apt/sources.list #编辑sources.list这个文件

deb wheezy main contrib non-free

deb-src wheezy main contrib non-free

deb wheezy-updates main contrib non-free

deb-src wheezy-updates main contrib non-free

deb wheezy/updates main contrib non-free

deb-src wheezy/updates main contrib non-free

apt-get update

Centos系统:

(1)首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

(2)下载ailiyun的yum源配置文件到/etc/yum.repos.d/

CentOS7:

wget -O /etc/yum.repos.d/CentOS-Base.repo

CentOS6:

wget -O /etc/yum.repos.d/CentOS-Base.repo

CentOS5:

wget -O /etc/yum.repos.d/CentOS-Base.repo

(3)Epel源(Extra Packages for Enterprise):

Centos7:

wget -O /etc/yum.repos.d/epel.repo

(4)运行yum makecache生成缓存

yum makecache

标签: #ubuntu配置yum源