rhel替换centosyum源

由于rhel需要注册才能使用yum源,所以会更换成centos源。

接下来就用rhce的系统,安装centos源。

需要包的地址:http://mirrors.163.com/centos/7/os/x86_64/Packages/

1.安装wget:

1 [[email protected] centosyum]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/wget-1.14-13.el7.x86_64.rpm
2
3 [[email protected] centosyum]# rpm -ivh wget-1.14-13.el7.x86_64.rpm

2.卸载yum:

1 [[email protected] centosyum]# rpm -qa | grep yum | xargs rpm -e --nodeps
2 warning: /etc/yum/pluginconf.d/langpacks.conf saved as /etc/yum/pluginconf.d/langpacks.conf.rpmsave
3 [[email protected] centosyum]# rpm -qa yum

3.下载centos的yum安装包:

1 [[email protected] centosyum]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
2 [[email protected] centosyum]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm
3 [[email protected] centosyum]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
4 [[email protected] centosyum]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm

4.安装包:最后两个一起装,因为会检测依赖性。

1 [[email protected] centosyum]# rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm
2 [[email protected] centosyum]# rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
3 [[email protected] centosyum]# rpm -ivh yum-3.4.3-150.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm  //这两个一起安装

5.创建repo,参考:

 1 # CentOS-Base.repo
 2 #
 3 # The mirror system uses the connecting IP address of the client and the
 4 # update status of each mirror to pick mirrors that are updated to and
 5 # geographically close to the client.  You should use this for CentOS updates
 6 # unless you are manually picking other mirrors.
 7 #
 8 # If the mirrorlist= does not work for you, as a fall back you can try the
 9 # remarked out baseurl= line instead.
10 #
11 #
12 [base]
13 name=CentOS-7 - Base - 163.com
14 #mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os
15 baseurl=http://mirrors.163.com/centos/7/os/$basearch/
16 gpgcheck=1
17 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
18 #released updates
19 [updates]
20 name=CentOS-7 - Updates - 163.com
21 #mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates
22 baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
23 gpgcheck=1
24 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
25 #additional packages that may be useful
26 [extras]
27 name=CentOS-7 - Extras - 163.com
28 #mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras
29 baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
30 gpgcheck=1
31 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
32 #additional packages that extend functionality of existing packages
33 [centosplus]
34 name=CentOS-7 - Plus - 163.com
35 baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
36 gpgcheck=1
37 enabled=0
38 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

6.

1  yum clean all
2  yum makecache  //这条执行会较慢
3  yum repolist 
时间: 2024-08-06 02:21:26

rhel替换centosyum源的相关文章

rhel替换centos源

参考文档:http://crushlinux.blog.51cto.com/2663646/1564136 1.卸载redhat原有的yum rpm -qa | grep yum | xargs rpm -e --nodeps 2.下载yum包 wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm wget http://mirrors.163.com/ce

替换yum源时出现的错误

今天在redhat 5.4_64系统替换yum源的时候出现: [[email protected] yum.repos.d]# yum clean metadata There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: /usr/lib/python2.4/site-packages/_sqlitecache.so: w

redhat替换yum源

redhat6 替换yum源: 由于redhat的服务器必须要求注册红帽才可以使用红帽的yum.但是我们可以替换掉原本的yum,使用centos的yum源. 准备工作: 需要下载下面的yum包和依赖: python-iniparse-0.3.1-2.1.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1

redhat使用centosYUM源

1.删除rhel自带的yum源 rpm -aq | grep yum|xargs rpm -e --nodeps 2.下载新的yum安装包 wget http://mirrors.163.com/CentOS/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-69.el6.centos

RHEL 使用epel源

转自http://www.linuxidc.com/Linux/2012-10/71850.htm 设置epel源.方法如下: 32位系统选择:rpm -ivh http://download.Fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm64位系统选择:rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch

rhel使用Centos源

环境:rhel 6.4 rhel Linux如果要使用网络源,需要订购红帽公司的RHN服务.... [[email protected] ~]# rpm -qa | grep yum yum-rhn-plugin-0.9.1-43.el6.noarch yum-metadata-parser-1.1.2-16.el6.x86_64 yum-3.2.29-40.el6.noarch [[email protected] ~]# [[email protected] ~]# rpm -qa | gr

rhel创建yum源

环境: rhel5.4 x64位虚拟机, 过程: 1.将OS 系统安装光盘iso上传到虚拟机中,挂载iso光盘: mount  -t iso9660 -o loop /tmp/RHEL-5.4_x86_64_DVD.iso /mnt 2.找到安装光盘中repodata文件夹位置,例如rhel在/mnt/Server下,但是centos在/mnt下,视具体情况而定,因为在yum配置文件中要指定这个文件夹的绝对路径 3.进入/etc/yum.repos.d文件夹,编辑yum的配置文件 a.备份原文件

Xcode8 重新配置 CocoaPods -替换阿里源

一.CocoaPods是什么? CocoaPods是一个负责管理iOS项目中第三方开源库的工具.CocoaPods的项目源码在Github上管理.该项目开始于2011年8月12日,在这两年多的时间里,它持续保持活跃更新.开发iOS项目不可避免地要使用第三方开源库,CocoaPods的出现使得我们可以节省设置和更新第三方开源库的时间,在iOS开发中经常会用到第三方库如AFNetworking,ASIHttpRequest等,在使用第三方库时,你除了要导数源码外,但是,集成这些依赖库需要我们手动去配

如何重新配置RHEL的yum源

问题如下: #yum install pam-devel #This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Install Process Nothing to do 如下图: 提示系统没有在redhat上注册.如果使用redhat的yum源需注册付费,费时费力,因此试图寻找一种不需要注册可以使用的方