`
asgab
  • 浏览: 42515 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

linux安装yum

 
阅读更多

使用redhat6.0 系统在线安装时提示This system is not registered with RHN.如下:

[root@localhost ~]# yum install gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package httpd available.
Nothing to do
解决方案:

1.卸载redhat自带的yum组件

[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps

2.安装centos的yum包

# wget http://mirror.centos.org/centos/6/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

# wget http://mirror.centos.org/centos/6/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm

# wget http://mirror.centos.org/centos/6/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm

# wget http://mirror.centos.org/centos/6/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

 

#rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
#rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm
#rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm  
注意最后两个包必需同时安装,否则会相互依赖 

 

3. 下载更新源,并存放在系统目录中
[root@localhost ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

[root@localhost ~]#mv CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

 

4.生成缓存并进行安装

[root@localhost ~]# yum makecache
至此可以使用yum了。

 

补充更改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

 

#########################################################################

清理yum缓存

# yum clean all

# yum makecache     #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度

# yum install vim*    #测试域名是否可用

分享到:
评论

相关推荐

    linux安装yum对应python2.7.5包

    linux安装yum对应python2.7.5包

    Linux安装yum的依赖包及说明(python2.7.5)

    linux安装yum用到包,网上的都是老版本的,且有些包不容易找,我包包整合一起了,根据提示依赖的先后顺序安装即可,亲测有效

    RHEL Linux 安装yum源详细步骤(包含源包链接).txt

    RHEL Linux 安装yum源详细步骤(包含源包链接),非常详细。

    Linux安装yum(最全依赖包)

    Linux安装yum起因过程完全卸载自带的python、yum下载依赖安装依赖更新yum源 起因 之前安装了python3,不小心执行了标题1的卸载命令,没想到yum是用python2做的,python3解析不了python2的语法。导致yum用不了了。没...

    Linux Yum安装配置与安装命令应用

    Yum是什么,Yum安装,Yum配置,Yum安装应用,Yum指令详解.

    oracle安装教程之Linux更换yum源

    "Oracle安装教程之Linux更换yum源" 在 Linux 环境中安装 Oracle 数据库之前,需要更换 yum 源,以便安装 Oracle 所需的依赖项。本文将指导您如何更换 yum 源,包括查看原有 yum 源、下载阿里云 yum 源、备份原有...

    centos 和 linux 6.5 yum包

    centos 和 linux 6.5 yum包,支持在linux6.5上安装下列三个包。

    红帽 7 版本的 Linux 安装yum软件 依赖rpm包

    有可能有的依赖解决不了,可以去另一个人那里看看,他的资源比较好用,本资源不需要积分也可以自行去https://vault.centos.org网站下载,各种版本的都有...这是我以前使用的别人的rpm包我是7版本的红帽Linux,亲测可用

    Linux 安装 yum 指定源 源代码 lnmp环境搭建

    此包包含centOs相关知识的4天整套课程,yum源生源 yum制定源以及原代码搭建lamp,lnmp环境的搭建和Nginx的安装

    redhat linux 配置yum详解

    在 Red Hat Linux 系统中,YUM 已经是默认安装的,但是在安装过程中,系统并不会自动配置 YUM,以便与 Red Hat 官方网站同步更新软件包。因此,需要手动配置 YUM,以便使用开源的更新地址。 配置 YUM 的关键步骤是...

    Oracle Linux更新Yum源

    Oracle Linux更新Yum源还是挺方便的,比Red Hat省事很多,而且在6.3的版本中,默认已经有重新编译可用的Yum了。

    linux下如何彻底卸载RPM或yum安装的mysql_linux的yum命令

    linux下如何彻底卸载RPM或yum安装的mysql

    Linux-yum安装配置

    Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置

    Linux中用yum在本地装软件.pdf

    Linux操作系统中,yum是非常重要的工具,用于安装和管理软件包。但是,在没有网络连接的情况下,如何使用yum来安装软件成了一个挑战。这个问题的解决方案可以分为两种:使用光盘直接挂载到本地的方式和使用Nginx或...

    linux yum安装文件

    Linux yum安装所需各种软件,完整。供yum安装使用。。

    Linux更换yum源

    Linux更换yum源的图文完整教程,及其更换yum源所需要使用到的所有包。yum源就是一个软件集合地,你只需要搜索并安装你想要的软件,它会帮你解决大部分软件的依赖问题。

    linux搭建yum仓库+gcc

    空的linux环境下如何搭建本地yum源以及编译环境gcc的详细步骤 有了它才可以使用yum、make、install命令

    安装yum源文件

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。...yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。

    LINUX安装32位运行库【LINUX配置YUM源的几种办法】

    LINUX安装32位运行库【LINUX配置YUM源的几种办法】

Global site tag (gtag.js) - Google Analytics