redhat7初始化yum源
1、卸载原有的yum
[app@localhost ~]$ su - root
Password:
Last login: Wed Apr :: CST on pts/
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
total
-rw-r--r--. root root Apr : redhat.repo
[root@localhost yum.repos.d]# tail redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
[root@localhost yum.repos.d]# yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repolist:
[root@localhost yum.repos.d]# rpm -qa | grep yum
yum-utils-1.1.-.el7.noarch
yum-metadata-parser-1.1.-.el7.x86_64
yum-3.4.-.el7.noarch
PackageKit-yum-1.1.-.el7.x86_64
yum-rhn-plugin-2.0.-.el7.noarch
yum-langpacks-0.4.-.el7.noarch
[root@localhost yum.repos.d]# rpm -qa|grep yum|xargs rpm -e --nodeps
2、联网下载yum
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-50.el7.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/PackageKit-yum-1.1.10-1.el7.centos.x86_64.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-rhn-plugin-2.0.1-10.el7.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-langpacks-0.4.2-7.el7.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/PackageKit-1.1.10-1.el7.centos.x86_64.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/PackageKit-glib-1.1.10-1.el7.centos.x86_64.rpm
3、安装yum
[root@localhost yum]# rpm -ivh yum-*
warning: yum-3.4.-.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing... ################################# [%]
Updating / installing...
:yum-metadata-parser-1.1.-.el7 ################################# [ %]
:yum-plugin-fastestmirror-1.1.-################################# [ %]
:yum-3.4.-.el7.centos ################################# [ %]
:yum-langpacks-0.4.-.el7 ################################# [ %]
:yum-rhn-plugin-2.0.-.el7 ################################# [ %]
:yum-utils-1.1.-.el7 ################################# [%]
[root@localhost yum]#
4、获取阿里云repo
[root@localhost yum]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
total
-rw-r--r--. root root Apr : redhat.repo
[root@localhost yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo
---- ::-- http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 27.221.93.99, 27.221.93.94, 27.221.56.136, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|27.221.93.99|:... connected.
HTTP request sent, awaiting response... OK
Length: (.5K) [application/octet-stream]
Saving to: ‘Centos-.repo’ %[==================================================================================================>] , --.-K/s in 0s -- :: (8.27 MB/s) - ‘Centos-.repo’ saved [/] [root@localhost yum.repos.d]# ls
Centos-.repo redhat.repo
[root@localhost yum.repos.d]#
5、替换repo里的版本号
[root@localhost yum.repos.d]# sed -i 's/$releasever/7/g' /etc/yum.repos.d/Centos-.repo
[root@localhost yum.repos.d]#
6、清理,重建缓存,查看repolist
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB ::
extras | 3.4 kB ::
updates | 3.4 kB ::
(/): base/x86_64/group_gz | kB ::
(/): extras/x86_64/prestodelta | kB ::
(/): base/x86_64/other_db | 2.6 MB ::
(/): extras/x86_64/primary_db | kB ::
(/): extras/x86_64/filelists_db | kB ::
(/): base/x86_64/filelists_db | 7.1 MB ::
(/): updates/x86_64/prestodelta | kB ::
(/): updates/x86_64/other_db | kB ::
(/): updates/x86_64/filelists_db | 3.0 MB ::
updates/x86_64/primary_db FAILED ========- ] 1.2 MB/s | MB :: ETA
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/77e1064f4695d093417e973b314fbb8199458df1af4428ee452be30159ee5598-primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
(/): updates/x86_64/primary_db | 3.4 MB ::
base/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/6614b3605d961a4aaec45d74ac4e5e713e517debb3ee454a1c91097955780697-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused"
Trying other mirror.
extras/x86_64/other_db FAILED ======================= ] kB/s | MB :: ETA
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/e3fc99b365562ee4f9dbd898f8acbbad55e2a5e5cf787dab83017026971ccbc9-other.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused"
Trying other mirror.
(/): extras/x86_64/other_db | kB ::
(/): base/x86_64/primary_db | 6.0 MB ::
Metadata Cache Created
[root@localhost yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/x86_64 CentOS- - Base - mirrors.aliyun.com ,
extras/x86_64 CentOS- - Extras - mirrors.aliyun.com
updates/x86_64 CentOS- - Updates - mirrors.aliyun.com ,
repolist: ,
[root@localhost yum.repos.d]#
redhat7初始化yum源的更多相关文章
- Redhat7配置yum源(本地源和网络源)
Redhat7配置yum源(本地源和网络源) 目录 一:配置本地yum源 二:配置网络yum源 YUM(Yellow dog Updater Modified): yum是基于RPM包构建的软件更 ...
- Redhat7 安装 yum源(亲测有效)
由于之前安装Redhat7 想安装vsftpd 使用yum install vsftpd 报错: This system is not registered to Red Hat Subscri ...
- redhat初始化yum源,使用阿里云yum源
本篇文章介绍redhat7使用国内阿里云yum安装源的方法,源地址使用的https://mirrors.aliyun.com/对应使用Centos7下的安装源. 在学习<Linux就该这么学&g ...
- RedHat7 配置yum源
今天需要搭建一个测试环境,没办法只能找了个Linux服务器,但是之前的其他同事弄过是其他系统的,不是centos的,所以只能自己搞. 合计直接百度,怎么安装docker,结果一直报错,下载失败之类的 ...
- # Redhat7 安装 yum源
第一步:先卸载原来的yum rpm -qa |grep yum 查看原来是否安装 yum-3.4.3-118.el7.noarch yum-utils-1.1.31-24.el7.noarch yum ...
- [Linux]Redhat7配置CentOS7 YUM源
一.简介 安装Redhat7并配置了网卡之后,虽然可以直接ping www.baidu.com,但是执行yum install的命令时提示如下信息: [root@ansible ~]# yum ins ...
- Linux之RedHat7如何更换yum源
目前,我们常见的系统大概就是Windows.Linux和Mac OS了.Windows系统应该是大部分人最早开始接触的系统,毕竟Windows系统使用起来相当方便,只需要点点鼠标,外加会简单的打字,一 ...
- RedHat7.0 网络源的配置
RedHat7.0 yum源的配置 写这篇随笔的目的 为了记录自己的操作,能够为以后的再次配置提供参考 因为网上的教程都有些年代了,为了方便其他同学方便配置 提高下自己的写作水平 参考资料 RedHa ...
- redhat7 配置使用centos的yum源
新安装了redhat7.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Man ...
随机推荐
- OpenStack之Fuel架构及其工作原理
一.Fuel架构 Fuel是一个开源的OpenStack部署和管理的工具,它允许用户通过Web UI进行OpenStack的部署和管理,并可以通过插件来扩展. Fuel的目标:加快和简化不同配置的 ...
- 【算法】深度优先 马走日 Hamilton routes
在n*m的棋盘中,马只能走“日” 字.马从位置(x,y)处出发,把棋盘的每一格都走一次,且只走一次.找出所有路径. ××××××××××××× 类似问题: 在半个中国象棋棋盘上,马在左下角(1,1)处 ...
- 深度学习识别CIFAR10:pytorch训练LeNet、AlexNet、VGG19实现及比较(一)
版权声明:本文为博主原创文章,欢迎转载,并请注明出处.联系方式:460356155@qq.com 前面几篇文章介绍了MINIST,对这种简单图片的识别,LeNet-5可以达到99%的识别率. CIFA ...
- 使用Docker安装Oracle数据库
在很多时候,我们需要在本地安装Oracle数据库,但是整个安装的过程时间非常长而且安装文件大,那么有不有更好的办法来安装Oracle数据库既能减少安装的时间而且还能够快速进行部署呢?答案就是使用Doc ...
- 鼠标拖动DOM
自己收藏,使用angualrjs的directive些的鼠标拖动DOM.... <!DOCTYPE html> <html lang="en"> <h ...
- CentOS7使用yum安装MySQL8.0
1.yum仓库下载MySQL:sudo yum localinstall https://repo.mysql.com//mysql80-community-release-el7-1.noarch. ...
- 标准3层神经网络搭建Demo
上面我们说了神经网络的基础知识,根据上章的基础尝试搭建一个标准的3层神经网络,参考https://www.cnblogs.com/bestExpert/p/9128645.html 1.框架代码 1. ...
- ImageMagick 安装 window10与错误总结
一般默认安装最新的版本(目前是7.0.8),但是通过测试发现这个版本会报错(ImportError: MagickWand shared library not found.)所以建议安装 im6版本 ...
- Codeforces 1093D Beautiful Graph(二分图染色+计数)
题目链接:Beautiful Graph 题意:给定一张无向无权图,每个顶点可以赋值1,2,3,现要求相邻节点一奇一偶,求符合要求的图的个数. 题解:由于一奇一偶,需二分图判定,染色.判定失败,直接输 ...
- luogu4166 最大土地面积 (旋转卡壳)
首先这样的点一定在凸包上 然后旋转卡壳就可以 具体来说,枚举对角线的一个端点,另一个端点在凸包上转,剩下两个点就是一个叉积最大一个最小,而这两个点也是跟着转的 所以是$O(N^2)$ #include ...