配置yum源

因为ubuntu系统本身是没有yum源的、所以要想使用yum源、必须自己手动配置:

1、新建两个配置文件

cd /etc/yum/repos.d

sudo touch fedora-163.repo

sudo touch fedora-updates-163.repo

2、打开两个配置文件

gedit fedora-updates-163.repo
gedit fedora-163.repo
2.1fedora-163.repo文件里面添加:
[fedora]
 
name=Fedora 17 - $basearch - 163.com
 
failovermethod=priority
 
baseurl=http://mirrors.163.com/fedora/releases/17/Everything/$basearch/os/
 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-17&arch=$basearch
 
enabled=1
 
metadata_expire=7d
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
 
 
 
[fedora-debuginfo]
 
name=Fedora 17 - $basearch - Debug - 163.com
 
failovermethod=priority
 
baseurl=http://mirrors.163.com/fedora/releases/17/Everything/$basearch/debug/
 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-17&arch=$basearch
 
enabled=0
 
metadata_expire=7d
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
 
 
 
[fedora-source]
 
name=Fedora 17 - Source - 163.com
 
failovermethod=priority
 
baseurl=http://mirrors.163.com/fedora/releases/17/Everything/source/SRPMS/
 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-17&arch=$basearch
 
enabled=0
 
metadata_expire=7d
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
2.2 fedora-updates-163.repo文件里面添加:

[updates]
 
name=Fedora 17 - $basearch - Updates - 163.com
 
failovermethod=priority
 
baseurl=http://mirrors.163.com/fedora/updates/17/$basearch/
 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f17&arch=$basearch
 
enabled=1
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
 
 
[updates-debuginfo]
 
name=Fedora 17 - $basearch - Updates - Debug - 163.com
 
failovermethod=priority
 
baseurl=http://mirrors.163.com/fedora/updates/17/$basearch/debug/
 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f17&arch=$basearch
 
enabled=0
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
 
 
[updates-source]
 
name=Fedora 17 - Updates Source - 163.com
 
failovermethod=priority
 
baseurl=http://mirrors.163.com/fedora/updates/17/SRPMS/
 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f17&arch=$basearch
 
enabled=0
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

3、执行刚才配置

yum makecache     #在终端输入命令

4、更新软件包数据

yum update      #在终端输入命令

来源:ubuntu系统配置yum源_linux_明人不放暗屁@cheng-华为云开发者联盟

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值