Ubuntu 安装 yum 后可用

对于yum安装在ubuntu上和别的一些linux有点不同的,我的安装过程也是比较坎坷的,不过最后还是发现了个比较好的简单的安装方法。

下面给大家介绍个比较简单的yum安装。

1,首先打开终端,进入root模式 输入   apt -get install yum   命令后等待即可

2、配置yum源

在 /etc/yum/repos.d/    下创建两个文件 fedora-163.repo和fedora-updates-163.repo,

我这里使用vi分别创建的,(用别的也是可以的)

vi fedora-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

 

 vi 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、很多都是装了后没有仓库,

相关推荐
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页