RedHat Enterprise Linux 6.4使用Centos 6 的yum源 分类: 服务器搭建 Nginx 2015-07-14 14:11 5人阅读 评论(0) 收藏
转载自:http://blog.sina.com.cn/s/blog_50f908410101cto6.html
思路:卸载redhat自带yum,然后下载centos的yum,安装后修改配置文件
1、首先到http://mirrors.163.com/centos下载软件包
x86 地址:http://mirrors.163.com/centos/6/os/i386/Packages/
x86_64 地址:http://mirrors.163.com/centos/6/os/x86_64/Packages/
必要下载的软件包有(以64位系统为例):
a python-iniparse-0.3.1-2.1.el6.noarch.rpm
b yum-3.2.29-40.el6.centos.noarch.rpm
c yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
d yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
下载命令:
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/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-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
[注] :版本不一定要最新的
2、卸载RedHat自带的yum
rpm -qa | grep yum | xargs rpm -e --nodeps
注:a、xargs是一条Unix和类Unix操作系统的常用命令。它的作用是将参数列表转换成小块分段传递给其他命令,以避免参数列表过长的问题
b、--nodeps 强制卸载,不管依赖性
3、安装下载的centos的yum包:
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
[注] :最后2个需要一起安装,否则会出现依赖性错误
4、到http://mirrors.163.com的 centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repo.d中
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
5、编辑CentOS6-Base-163.repo文件,将其中的$releasever更改为centos的版本号
下面是修改好的:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
6、yum clean all 清除原有缓存
7、yum makecache 获取yum列表
出现下面提示,表示yum更改完成:
Metadata Cache Created
RedHat Enterprise Linux 6.4使用Centos 6 的yum源 分类: 服务器搭建 Nginx 2015-07-14 14:11 5人阅读 评论(0) 收藏的更多相关文章
- RedHat Enterprise Linux 6.4使用Centos 6的yum源问题
RedHat Enterprise Linux 6.4使用Centos 6的yum源问题 作为一名新手,学习Linux已经一个月了,其间遇到了不少问题,而今天笔者遇到的问题是 #yum install ...
- 【转发】RedHat Enterprise Linux 6.4 使用 Centos 6 的yum源问题
作为一名新手,学习Linux已经一个月了,其间遇到了不少问题,而今天笔者遇到的问题是 #yum install pam-devel #This system is not registered to ...
- 关于RedHat Enterprise Linux 6.4使用Centos 6 的yum源
思路:卸载redhat自带yum,然后下载centos的yum,安装后修改配置文件 1.首先到http://mirrors.163.com/centos下载软件包 x86 地址:http://mirr ...
- 随机带权选取文件中一行 分类: linux c/c++ 2014-06-02 00:11 344人阅读 评论(0) 收藏
本程序实现从文件中随即选取一行,每行被选中的概率与改行长度成正比. 程序用一次遍历,实现带权随机选取. 算法:假设第i行权重wi(i=1...n).读取到文件第i行时,以概率wi/(w1+w2+... ...
- RedHat Enterprise Linux 6.4 使用 Centos 6 的yum(转)
概述 redhat的yum源需注册付费,费时费力,整理RedHat yum 安装CentOS的方法. 安装系统文件 系统:RedHat Enterprise Linux 6.4-x86_64 md5: ...
- Linux命令 标签: linux 2016-08-01 10:26 508人阅读 评论(0) 收藏
Linux常用命令 文件.目录的基本操作 ls - 查看文件 cp - 拷贝文件 mv - 移动或重命名文件 rm - 删除文件 touch - 创建空文件或更新文件时间 cd - 改变当前路径 pw ...
- Linux 系统挂载数据盘 分类: B3_LINUX 2015-01-30 18:13 228人阅读 评论(0) 收藏
适用系统:Linux(Redhat , CentOS,Debian,Ubuntu) * Linux的云服务器数据盘未做分区和格式化,可以根据以下步骤进行分区以及格式化操作. 下面的操作将会把数据盘划 ...
- *** glibc detected *** malloc(): memory corruption 分类: C/C++ Linux 2015-05-14 09:22 37人阅读 评论(0) 收藏
*** glibc detected *** malloc(): memory corruption: 0x09eab988 *** 发现是由于memset越界写引起的. 在Linux Server上 ...
- ubuntu中安装samba 分类: linux 学习笔记 ubuntu 2015-07-07 16:14 46人阅读 评论(0) 收藏
为了方便的和Windows之间进行交互,samba必不可少. 当然,他的安装使用也很简单: 安装: sudo apt-get install samba sudo apt-get install sm ...
随机推荐
- php的curl获取https加密协议请求返回json数据进行信息获取
<?php header("Content-type:text/html; charset=utf-8");function getToken($url){ $ ...
- codeforces Vasya and Digital Root
/* * c.cpp * * Created on: 2013-10-7 * Author: wangzhu */ /** * 当时比赛时,想得复杂了,也想偏了, * 1).写出来之后,结果达到了预期 ...
- 关于安装完Node.js 出现node is not dedined 问题
今天想来接触下Node.js 神奇 怀着揣揣的心 从官网下载了windows 的64位mis版本 几个下一步就顺利安装完毕了 接着跟着新手教程走 不懂教程里的 苹果shell 是什么 反正就是检 ...
- LINUX下安装PHP(CGI模式)和NGINX[转]
安装所需依赖 yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freety ...
- Qt 自定义model实现文件系统的文件名排序
前段时间,需要做一个功能是要做文件系统的排序的功能.由于是自己写的model, 自己定义的数据结构.最初的想法只有一个自己去实现文件夹跟文件名的排序算法,不过感觉比较费时间.后来想到的是QFileSy ...
- matlab numpy equivalents
THIS IS AN EVOLVING WIKI DOCUMENT. If you find an error, or can fill in an empty box, please fix it! ...
- 将Sublime Text3添加到右键菜单中
卸载了Sublime Text2,安装了最新版本的Sublime Text3,不过一直不在右键菜单中,每次使用都需要从打开方式中选,所以决定添加,有如下2种方法. 添加到右键菜单 方法一(推荐) 在S ...
- 小试.NET代码保护软件(代码混淆、加密)
有着微软人性化的开发工具VISUAL STUDIO和MSDN详尽的帮助,.NET 的开发效率的确高. 但是由于.NET同JAVA一样都采用中间语言.虚拟机/SDK等诸多特质,而且高等语言的类库编码规范 ...
- Azure Backup 入门
Viswanath Tata 云 + Enterprise项目经理 Azure Backup是一款允许客户将数据备份到 Azure的强大工具.请参阅这篇文章,快速了解 Azure Backup.我 ...
- 【转】VIRTUALBOX导入已有.VDI文件步骤
原文网址:http://blog.csdn.net/wanghai__/article/details/6703923 1.安装SUN VIRTUALBOX 2.新建,进入到“新建虚拟电话”对话框,下 ...