红帽子Redhat Linux 6.1/6.2/5.1/5.4/5.6更新源配置方法
2011-08-06 11:25
381 查看
版权声明:对于本博客所有原创文章,允许个人、教育和非商业目的使用,但务必保证文章的完整性且不作任何修改地以超链接形式注明原始作者、出处及本声明。
博客地址:http://blog.csdn.net/shuxiao9058
原始作者:季亚
首先贴出本人使用的更新源网站:http://atrpms.net/,参考方法:http://atrpms.net/documentation/install/
以下英文内容摘自页面http://atrpms.net/documentation/install/,以做参考!!!注意:英文内容均以Fedora 14为范例介绍如何配置的,本文主要讲述Red Hat Enterprise Linux 6.1更新源的配置!本人建议读者事先先把需要修改的系统文件做好备份,以防不备之需。
话不多说,先贴出本人配置更新源后的效果:
图1 系统版本一览
图2 更新视频解码器
图3 更新系统软件包
图4 额,原来更新源添加了
图5 使用更新后的播放器看电影
下面正式开始配置Linux更新源:
This repository can be used in several ways, either you browse through the directories searching for the bits you need, or you can use one of the available package manager tools.
In any case you may first want to import ATrpms’ signing key:
博客地址:http://blog.csdn.net/shuxiao9058
原始作者:季亚
首先贴出本人使用的更新源网站:http://atrpms.net/,参考方法:http://atrpms.net/documentation/install/
以下英文内容摘自页面http://atrpms.net/documentation/install/,以做参考!!!注意:英文内容均以Fedora 14为范例介绍如何配置的,本文主要讲述Red Hat Enterprise Linux 6.1更新源的配置!本人建议读者事先先把需要修改的系统文件做好备份,以防不备之需。
话不多说,先贴出本人配置更新源后的效果:
图1 系统版本一览
图2 更新视频解码器
图3 更新系统软件包
图4 额,原来更新源添加了
图5 使用更新后的播放器看电影
下面正式开始配置Linux更新源:
Install
This repository can be used in several ways, either you browse through the directories searching for the bits you need, or you can use one of the available package manager tools.In any case you may first want to import ATrpms’ signing key:
rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms[/code]
For older rpm versions this may fail, but you can use the following two step approach:wget http://packages.atrpms.net/RPM-GPG-KEY.atrpms rpm --import RPM-GPG-KEY.atrpms
When you have found the rpms you need and want to install them, you have several choices.
The hard way: Download manually the rpms you need and install them with rpm -Uhv.
This is O.K., if you only want to install a couple of packages.
But this method doesn’t scale well. If you want to install packages with multiple dependencies or want to keep your system up to date, you are better of with a package manager.
The easy way: Use a package manager like smart and/or apt and/or yum. This will ease your life with staying up to date with Red Hat erratas, as well as installing rpms from 3rd party packagers like atrpms, freshrpms, dag, dries, ccrma and several others.
There are distribution specific packages with configuration files for various package managers. Install the matching package and use the package manager henceforth.
If you don’t want to install the above package for any reasons, please follow these instructions (examples are for Fedora 14 on i386, modify accordingly for other distributions, for example replace f14-i386 with sl6-x86_64 for Scientific Linux 6 for AMD64):
smart: Make sure the following lines are included in /etc/smart/channels/smart.channel:# # atrpms # Fedora 14 - i386 - ATrpms # [atrpms] name=Fedora 14 - i386 - ATrpms baseurl=http://dl.atrpms.net/f14-i386/atrpms/stable type=rpm-md
apt: Make sure the following lines are included in /etc/apt/sources.list:# # atrpms # Fedora 14 - i386 - ATrpms # repomd http://dl.atrpms.net f14-i386/atrpms/stable
yum: Make sure the following lines are included in /etc/yum.conf:[atrpms] name=Fedora Core $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1
You can then retrieve further rpms with smart, apt-get, yum or synaptic.
Note that there are yet another two sections named ‘testing’ and ‘bleeding’ which are not automatically enabled in the default configuration (this is on purpose).
Now that your system is apt enabled, you will have to runapt-get update
to freshen the lists of available packages, andapt-get dist-upgrade
to update you system to the newest packages. Use for exampleapt-get install synaptic
to install synaptic (a graphical user interface for apt-get) etc.
在进行以下操作前请确保已经完全卸载红帽子自带更新源,有两种方法:
方法1(命令),打开终端,输入“yum remove yum-rhn-plugin”命令,按照向导即可;
方法2(图形),root用户登录系统,依次选择“System-Administration-Add/Remove Software”,在搜索框中输入“subscription”搜索卸载即可。
下面我将介绍如何完成Red Hat Enterprise Linux 6.1更新源的配置的,依照参考方法:
1. 首先,使用如下命令导入导入atrpms.net 的软件包签名rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms[/code]
对于较老的版本,如果上面的命令失败,请使用如下两个命令再次尝试:wget http://packages.atrpms.net/RPM-GPG-KEY.atrpms rpm --import RPM-GPG-KEY.atrpms
如果依旧错误,哥哥也帮不了你了,你还是到google寻找其他配置方法,或者到网站再search一下。
2. 编辑/etc/smart/channels/smart.channel文件(如果系统中没有该文件,请自行创建目录【操作命令:mkdir -p /etc/smart/channels】和文件【操作命令:vi /etc/smart/channels/smart.channel】),按照上面的格式进行修改,本人修改后的smart.channel文件如下所示:# # atrpms # el6Server - i386 - ATrpms # [atrpms] name=el6Server - i386 - ATrpms baseurl=http://dl.atrpms.net/el6Server-i386/atrpms/stable/ type=rpm-md
3. 编辑 /etc/apt/sources.list文件,本人系统/etc/apt/下没有sources.list文件,我是自己创建的这个文件,读者的系统中如无本文件,请自行创建,并将以下内容写到该文件中:# # atrpms # el6Server - i386 - ATrpms # repomd http://dl.atrpms.net/el6Server-i386/atrpms/stable/[/code]
4. 把以下内容添加到/etc/yum.conf文件里面:[atrpms] name=el6Server - $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1笔者修改后的/etc/yum.conf文件内容如下所示:[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[atrpms] name=el6Server - $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1
完成以上内容,便可以更新系统相关软件了,不信你可以自己试试,反正我成功了!
同样的,可以按照以上方式配置rhel 5.1/5.6的更新源,只需要修改部分内容即可,本文在此不再赘述,仅仅贴出操作命令:[root@localhost ~]# rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms [root@localhost ~]# mkdir -p /etc/smart/channels/ [root@localhost ~]# vi /etc/smart/channels/smart.channel # # atrpms # el5Server - i386 - ATrpms # [atrpms] name=el5Server - i386 - ATrpms baseurl=http://dl.atrpms.net/el6Server-i386/atrpms/stable/ type=rpm-md ~ ~ [root@localhost ~]# mkdir -p /etc/apt [root@localhost ~]# vi /etc/apt/sources.list # # atrpms # el5Server - i386 - ATrpms # repomd http://dl.atrpms.net/el5Server-i386/atrpms/stable/ [root@localhost ~]# vi /etc/yum.conf [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 metadata_expire=1800 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d [atrpms] name=el5Server - $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1
在更新的过程中可能会有一些错误,下面这个问题是本人刚刚(2011年10月24日 15:30)遇到的。[root@localhost ~]# Error: yum conflicts with yum-rhn-plugin < 0.5.2-3.el5
由于计算机比较差,不能打开图形界面,只能通过终端进行操作,首先查找yum-rhn-plugin软件包:[root@localhost ~]# rpm -qa | grep 'yum-rhn-plugin-*' yum-rhn-plugin-0.5.2-3.el5 [root@localhost ~]#搜索后使用如下操作命令删除该软件包,记得要加入nodeps选项进行卸载,不然可能会卸载不成功。[root@localhost ~]# rpm -e --nodeps yum-rhn-plugin-0.5.2-3.el5 [root@localhost ~]#
如此,便可以输入相关命令进行更新了。
其他方法:
更新日期:2013年1月23日,RepoForge。
相关文章推荐
- redhat linux 5.6 下安装oracle 11g 时netca报错不能配置监听解决方法
- PHP5.4 for Apache ; php 5.4.0安装过程、方法、配置
- Windows系统中MySQL 5.6的配置文件(my.ini)修改方法
- redhat linux在虚拟机中配置tftp的方法
- centos 5.4中mysql主从同步配置方法
- PHP5.4 for Apache ; php 5.4.0安装过程、方法、配置
- Hacmp 5.1 的配置方法
- redhat linux 5.6安装oracle 10g版本检测不通过解决方法
- Centos5.6下配置jdk(5种方法)
- 红帽子Red Hat Enterprise Linux 6.1/6.2/6.3/6.4问题集锦
- 监控WebSphere 6.1以及WAS6.1生成和配置安全证书的方法
- win7 64位配置mysql 5.6免安装版,初始化配置和Mysql创建新用户方法 .
- 红帽(redhat linux)6.1之负载均衡(Load Balancer)配置实例
- win10安装oracle 11g 报错 要求的结果: 5.0,5.1,5.2,6.0 6.1 之一 实际结果: 6.2
- 搭建PHP5.4+Apache+Mysql 服务器环境配置的方法
- redhat linux 5.4 DNS配置
- centos6.2 RPM安装mysql配置方法
- CentOS 5.4 防火墙配置80端口的方法(适用于centos5.3以上版本)
- Windows 8下MySQL Community Server 5.6安装配置方法图文教程
- RedHat 6.2 中的 samba 服务端配置 方法