redhat 6 使用centos源 yum安装
1、删除redhat原有的yum源
# rpm -aq | grep yum|xargs rpm -e --nodeps
2、下载新的yum安装包
这里我们使用CentOS的yum源
# wget http://mirror.centos.org/centos/6.0/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
# wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
# wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
# wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-plugin-fastestmirror-1.1.26-1.el6.noarch.rpm
如果wget不了,可以试着到http://mirrors.163.com/centos/6/os/x86_64/Packages/找
3、安装yum软件包
# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
# rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
# rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
注意:最后两个安装包要放在一起同时安装,否则会提示相互依赖,安装失败。
4、更改yum源 #我们使用网易的CentOS镜像源
# cd /etc/yum.repos.d/
# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
# vi CentOS6-Base-163.repo
编辑文件,把文件里面的$releasever全部替换为版本号,即6 最后保存!或者直接把下面的内存拷贝到CentOS6-Base-163.repo文件中即可(已经修改好)
#########################################################################
# 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 #########################################################################
5、清理yum缓存
# yum clean all
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim* #测试域名是否可用
至此,Redhat6可以使用CentOS的yum源在线安装软件了!
redhat 6 使用centos源 yum安装的更多相关文章
- CentOS 使用官方源yum安装最新nginx版本
CentOS 使用官方源yum安装最新nginx版本 1.创建nginx.repo # vi /etc/yum.repos.d/nginx.repo 2.添加内容#如果是CentOS6,文件内容如下: ...
- <亲测>CentOS中yum安装ffmpeg
CentOS中yum安装ffmpeg 1.升级系统 sudo yum install epel-release -y sudo yum update -y sudo shutdown -r now 2 ...
- CentOS源码安装QT
在VirtualBox上的CentOS下安装qt-everywhere-opensource-src-4.8.4 ,执行 ./confiure时失败,失败信息为:Basic XLib function ...
- centos 下yum 安装nginx
centos 下yum 安装nginx 1. 直接yum install nginx不行,要先处理下源: rpm -ivh http://nginx.org/packages/centos/6/noa ...
- centos'的yum安装php的memcache扩展
centos'的yum安装php的memcache扩展 博客分类: linux 让php能使用memcached服务的扩展有两种:memcache 和 memcached 1. 先安装libmem ...
- centOS下yum安装配置samba
centOS下yum安装配置samba 2010-03-29 15:46:00 标签:samba yum centOS 安装 休闲 注意:本文的原则是只将文件共享应用于内网服务器,并让将要被共享的目 ...
- centos源码安装git
因为Centos上yum安装的话可能版本比较低,使用中会有一些难以预料的问题出现. 从源代码编译安装方法: #Centos执行: yum install curl-devel expat-devel ...
- centos下yum安装crontab+mysql自动备份
参考博文: centos下yum安装crontab yum install vixie-cron crontabs //安装 chkconfig crond on ...
- Linux Centos 使用 yum 安装java
centos 使用 yum 安装java 首先,在你的服务器上运行一下更新. yum update 然后,在您的系统上搜索,任何版本的已安装的JDK组件. rpm -qa | grep -E '^op ...
随机推荐
- 你真的会Xilinx FPGA的复位吗?
Get Smart About Reset: Think Local, Not Global. 对于复位信号的处理,为了方便我们习惯上采用全局复位,博主在很长一段时间内都是将复位信号作为一个I/O口, ...
- Uval4726-数形结合的思想
题意:给定一段01序列,求一段长度不小于L的连续序列,使其平均值最大 思路:一看就想到了斜率优化,但是用基本的推公示一直没推出来,看了别人的代码,像推出斜率的式子一直没弄出来..后来一看别人写的题解, ...
- <c:forEach varStatus="status">中 varStatus的属性简介
我们常会用c标签来遍历需要的数据,为了方便使用,varStatus属性可以方便我们实现一些与行数相关的功能,如:奇数行.偶数行差异:最后一行特殊处理等等.先就varStatus属性常用参数总结下: $ ...
- uva10905同一思路的两种做法,前一种WA,后一种AC
这道题应该算一道普通的排序吧,实际上就是另一种形式地比大小,自己最开始是用int型存,后来觉着不行,改用long,结果还是WA,这是第一个程序. 第二个程序是改用string处理,确实比int方便很多 ...
- htpasswd建立和更新存储用户名、密码
htpasswd建立和更新存储用户名.密码的文本文件, 用于对HTTP用户的basic认证. # /usr/local/apache/bin/htpasswd --help Usage: htpass ...
- poj 3083 Children of th
#include <iostream> #include<stdio.h> #include<string.h> using namespace std; int ...
- http://vjudge.net/contest/view.action?cid=51142#problem/C 精度转换的一道题。。。
C - Get-Together at Den's Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & ...
- 二、RHCSA试题解析
一.设置YUM仓库 YUM的软件库源地址为:http://content.example.com/rhel7.0/x86_64/dvd,将此配置为操作系统的默认软件仓库. 方法一(修改配置文件): v ...
- cesiumjs
官网 https://cesium.com/ https://cesiumjs.org/Cesium/ 论坛 http://cesium.coinidea.com/ 中文网 http://cesium ...
- c#中的gcAllowVeryLargeObjects和OutOfMemoryException
什么是gcAllowVeryLargeObjects 在.net4.5中新增一个配置项 “gcAllowVeryLargeObjects” ,msdn解释如下: 在64位平台上,可以允许总共大于2千兆 ...