redhat上添加yum源
来源:互联网 发布:算法加密芯片 编辑:程序博客网 时间:2024/05/04 10:34
Redhat下yum安装
首先要确定自己的操作系统版本,使用 lsb_release -a 命令查看,例如:
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release6.0 (Santiago)
Release: 6.0
Codename: Santiago
由于 RedHat 是商业版本,没有注册的操作系统是无法是 yum 在线安装功能的。解决的办法是卸载 RedHat 的 yum, 替换成 CentOs 的 yum。
1.删除redhat原有的yum
rpm -aq|grep yum|xargs rpm -e --nodeps
2.下载yum安装文件
注意,如果下载时找不到文件,就登录到:http://mirrors.sohu.com/centos/6/os/x86_64/上查找相应的文件。然后再下载。
3.进行安装yum
rpm -ivhpython-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivhyum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpmum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
注意最后两个包必需同时安装,否则会相互依赖
4.更新repo文件/etc/yum.repos.d/xxxx.repo
http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
下面是搜狐的:
# CentOS-Base.repo
#
# This file uses a new mirrorlist systemdeveloped by Lance Davis for CentOS.
# The mirror system uses the connecting IPaddress of the client and the
# update status of each mirror to pickmirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking othermirrors.
#
# If the mirrorlist= does not work for you,as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.sohu.com/centos/6.0/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.sohu.com/centos/6.0/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build butnot released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.sohu.com/centos/6.0/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionalityof existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.sohu.com/centos/6.0/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
注意要将baseurl中的 6.0改成 6,例如
baseurl=http://mirrors.ustc.edu.cn/centos/6.0/os/$basearch/
改成
baseurl=http://mirrors.ustc.edu.cn/centos/6/os/$basearch/
5、yum clean all
6、yum install vim #测试一下可不可以用
http://myceo.blog.51cto.com/2340655/755896常见错误解答
- redhat上添加yum源
- RedHat yum 添加sohu源
- redhat 添加DVD作为yum本地源
- redhat上配置yum源简介
- 在RedHat 6.2中安装yum并添加163源
- redhat linux 5上创建本地yum源
- redhat yum 源配置
- RedHat yum 源配置
- redhat 配置yum源
- RedHat yum 源配置
- RedHat设置Yum源
- Redhat更新yum源
- redhat yum 源配置
- 配置redhat yum源
- RedHat配置YUM源
- RedHat设置Yum源
- RedHat 换 yum 源
- redhat配置yum源
- oracle建表的问题
- ELF 文件的 加载 运行 和 进程映射
- Google c++编程规范-----注释
- 在你的Android应用中使用Material Design
- R语言数据分析基础
- redhat上添加yum源
- R语言之回归分析篇
- Java中的标示符和关键字
- magento新闻邮件发送一直处于“正在发送”状态问题解决
- JAVA学习 day01
- 【C++ 学习笔记小程序01】 输入输出
- R语言之功效分析篇
- Hdu4771(杭州赛区)
- ListView中getView的原理+如何在ListView中放置多个item