RedHat 网络yum源的配置

在安装heartbeat的时候提示不能找到依赖的包,最后发现是yum源的问题。在网上查了很多资料,终于成功配置了yum网络源,下面分享一下解决的办法。

解决办法:

1.卸载EHEL的yum,并下载CentOS的对应软件包

[[email protected] tools]# rpm -aq|grep yum
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-rhn-plugin-0.9.1-58.el6.noarch
yum-3.2.29-69.el6.noarch
[[email protected] tools]# rpm -aq|grep yum|xargs rpm -e --nodeps
[[email protected] tools]#
[[email protected] tools]# rpm -aq|grep yum|xargs rpm -e --nodeps
rpm: no packages given for erase

2.下载并安装CentOS的对应的软件包

(1)可以通过网站直接下载

http://mirrors.163.com/centos/6/os/x86_64/Packages/

(2)在线下载对应软件包

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/python-urlgrabber-3.9.1-11.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.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-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
[[email protected] ~]# cd /home/linzhongniao/tools/
[[email protected] tools]# ls
yum-3.2.29-81.el6.centos.noarch.rpm  python-iniparse-0.3.1-2.1.el6.noarch.rpm   yum-metadata-parser-1.1.2-16.el6.x86_64.rpmpython-urlgrabber-3.9.1-11.el6.noarch.rpm  yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm

提示:如果不正确执行,网站没有响应,意思这个包找不到了,以为版本更新了老版本删除掉了,我们可以吧按原来的软件名,在上面的那个网站里找这些安装包。

(3)安装对应软件包

[[email protected] tools]# rpm -ivh *

每个人的而系统环境都不一样,安装过程中会遇到各种各样的问题。缺失依赖的软件包rpm安装或者在镜像源网站上下载安装即可,如果提示软件包冲突rpm –e卸载旧版本重新再镜像源网站上下载安装即可。

3.Yum网络源配置

(1)先备份系统.repo文件

[[email protected] ~]# cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.bak

(2)添加下面内容

[[email protected] yum.repos.d]# cat rhel-source.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
gpgcheck=1
enabled=0

(3)清楚原来的源文件

`yum clean all` 

(4)安装yun源,测试新的yum 源有没有安装成功

 yum install yum

(5)获取yum列表

yum list

好,到此yum网络源的配置成功了

原文地址:http://blog.51cto.com/10642812/2072250

时间: 2024-08-01 23:55:28

RedHat 网络yum源的配置的相关文章

rhel7配置网络yum源,配置VNC远程桌面

rhel7配置VNC远程桌面实验环境:安装了图形化界面的redhat7.0,IP是192.168.31.201先配置网络yum源[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo [[email protected] ~]# sed -i 's/$releasever/7/g' /etc/yum.repos.d/CentOS-Ba

CentOS 6.5下本地yum源与网络yum源的配置使用

一.本地yum源 1.系统默认已经安装了可使用yum的软件包,所以可以直接配置: [[email protected] ~]# cd /etc/yum.repos.d/                         yum源配置文件放置目录 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak    先将网络yum源        配置文件更名(让其失效) [[email protected] yum

redhat下yum源的配置

由于Redhat的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件.我们可以借助于centos系统开源包来给我们的yum工具做相应配置就可以使用了. 1.删除redhat原有的yum源 #rpm -aq | grep yum|xargs rpm -e --nodeps 2.下载新的yum安装包  这里我们使用CentOS的yum源 从网络下载一个文件并保存在当前目录 #wgethttp://mirror.centos.org/centos/6.5/os/i386/Pack

centos网络yum源的配置使用

[[email protected] ~]#cd /etc/yum.repos.d/    进入yum配置文件目录 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak     备份配置文件 [[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo     下载网易的配置 [[emai

搭建CnetOS6.5x64最小系统及在线yum源的配置

CentOS系统作为红帽系列的一款linux系统,因为其免费.开源,在中小企业中得到了广泛应用,生产上为了更好的利用资源,都采用最小系统安装,因为一个图形界面都会占去系统资源的30%到40%,生产上一般都是最经济原则,不装图形界面,软件也是需要什么装什么,一般通过ssh连接或者xshell连接即可.本文从以下四个方面给出了CentOS系统的最小化安装及在线yum源的配置. 大纲:一.搭建CnetOS6.5x64最小系统.二.ip,主机名等的相关配置.三.本地和在线yum源的配置.四.快照及克隆.

redhat配置centos网络yum源

方案一: 配置网络yum源rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64service vsftpd restartchkconfig --level 35 vsftpd oncd /var/ftp/pub/mkdir yum把上面的挂载点改成/var/ftp/pub/yumvim /etc/yum.repos.d/rhel-source.repo[server]name=serverbaserul=ftp://pub/yum/Server/  #(注意要挂载光驱)

配置本地和网络yum源

一.配置本地yum源 1.检查自己是否已经安装yum [[email protected] ~]# rpm -qa | grep yum yum-updatesd-0.9-2.el5 yum-security-1.1.16-13.el5 yum-metadata-parser-1.1.2-3.el5 yum-3.2.22-20.el5 yum-rhn-plugin-0.5.4-13.el5 2.把安装光盘挂在到/mnt下 [[email protected] ~]# mount /dev/cdr

CentOS 6.6下配置本地yum源与网络yum源

一.本地yum源 1.系统默认已经安装了可使用yum的软件包,所以可以直接配置: [[email protected] ~]# cd /etc/yum.repos.d/                         yum源配置文件放置目录 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak    先将网络yum源        配置文件更名(让其失效) [[email protected] yum

[Linux] 024 IP 地址配置和网络 yum 源

1. IP 地址配置 (1) 使用 setup 工具 $ setup ps setup 是 RedHat 系列的功能:一般地,Debian系列没有这个功能 Xubuntu 没有这个功能 (2) 启动网卡 step1 $ vi /etc/sysconfig/network-scripts/ifcfg-eth0 step2 把 ONBOOT = "no" 改为 ONBOOT = "yes" step3 重启网络服务 $ service network restart p