RHEL使用Centos的YUM源

RHEL使用Centos的YUM源
2011年11月04日
  因为 CentOS 是 RHEL 的完整重新编译版本(当然要相互对应一样的版本号),所以 RHEL 是一定可以用 CentOS 的 yum 源的。------------------------------------------------------------------------------------------------------------------------------------一/【删除 RHEL 自带的 yum】# rpm -aq|grep yum|xargs rpm -e --nodeps------------------------------------------------------------------------------------------------------------------------------------二/【下载】以下四个文件:# wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm# wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm# wget http://mirrors.163.com/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm# wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm------------------------------------------------------------------------------------------------------------------------------------三/【安装】# rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm# rpm -ivh yum-metadata-parser-1.1.2-2.el5.i386.rpm# rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpmwarning: yum-3.2.19-18.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897error: Failed dependencies:yum-fastestmirror is needed by yum-3.2.19-18.el5.centos.noarch# wget ftp://ftp.muug.mb.ca/mirror/centos/5.3/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm# rpm -ivh yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpmwarning: yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897error: Failed dependencies:yum >= 3.0 is needed by yum-fastestmirror-1.1.16-13.el5.centos.noarch注意:安装的时候最好几个同时安装,如果单个安装的话可能会出现依赖问题。出现了相互依赖的问题。四/# rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm------------------------------------------------------------------------------------------------------------------------------------五/最后,下载配置文件:# wget http://sudone.com/download/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo这样就可以用 CentOS 的 yum 源来更新系统和安装软件了。因为默认的配置文件中服务器地址用的版本号是变量$releasever,所以需要将其替换为实际的版本号,否则是无法连接到服务器的,当前CentOS最新版是5.3,所以我们修改CentOS-Base.repovi CentOS-Base.repo 在vi编辑器中进行全文件替换:%s/$releasever/5.3/ 最后保存退出即可。------------------------------------------------------------------------------------------------------------------------------------另外,附上 x86_64 系统使用 CentOS 的 yum 源需要下载的四个包:wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpmwget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpmwget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpmwget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm------------------------------------------------------------------------------------------------------------------------------------【自动运行 yum】# chkconfig --list yum# chkconfig --level 3 yum on控制脚本 /etc/rc.d/init.d/yum,这个控制脚本激活了 /etc/cron.daily/yum.cron,而它又会使 cron 服务来在每日凌晨四点时进行自动的系统更新。
  [b]1.CentOS yum使用:[/b]
  1 )包的更新
  1.1)检查可更新包: yum check-update
  1.2)更新所有包: yum update
  1.3)更新指定包: yum update package_name
  1.4)版本升级: yum upgrade
  2 )包安装与删除
  2.1)yum install package_name
  2.2)yum remove package_name
  3 )包搜索
  3.1)搜索特定包: yum search package_name
  3.2)搜索包含特定文件名的包:yum provides name
  4 )包列表
  4.1)列出所有安装或更新的包: yum list
  4.2)列出指定包:yum list name
  4.3)列出可更新包:yum list updates
  4.4)列出已安装包:yum list installed
  4.5)列出已安装但不包含在资源库中的包:yum list extras
  [b]2.CentOS yum源设定[/b]
  2.1)加快yum下载速度: yum -y install yum-fastestmirror,在CentOs 4上名字叫做yum-plugin-fastestmirror
  2.2)yum源文件:/etc/yum.repos.d/CentOS-Base.repo
  2.3)CentOS 5的yum源设为上海交通大学网站
  CentOS-Base.repo
  [base]
  name=CentOS-5 - Base
  #mirrorlist= http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
  repo=os
  #baseurl= http://mirror.centos.org/centos/$releasever/os/$basearch/
  baseurl= http://ftp.sjtu.edu.cn/centos/5.0/os/$basearch/
  gpgcheck=1
  gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
  #released updates
  [update]
  name=CentOS-5 - Updates
  #mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
  baseurl= http://ftp.sjtu.edu.cn/centos/5.0/updates/$basearch/
  gpgcheck=1
  gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
  #packages used/produced in the build but not released
  [addons]
  name=CentOS-5 - Addons
  #mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
  baseurl= http://ftp.sjtu.edu.cn/centos/5.0/addons/$basearch/
  gpgcheck=1
  gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
  #additional packages that may be useful
  [extras]
  name=CentOS-5 - Extras
  #mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
  baseurl= http://ftp.sjtu.edu.cn/centos/5.0/extras/$basearch/
  gpgcheck=1
  gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
  #additional packages that extend functionality of existing packages
  [centosplus]
  name=CentOS-5 - Plus
  #mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
  baseurl= http://ftp.sjtu.edu.cn/centos/5.0/centosplus/$basearch/
  gpgcheck=1
  enabled=0
  gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
  #contrib - packages by Centos Users
  [contrib]
  name=CentOS-5 - Contrib
  #mirrorlist= http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
  baseurl= http://ftp.sjtu.edu.cn/centos/5.0/contrib/$basearch/
  gpgcheck=1
  enabled=0
  gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
  a.执行64位:rpm --import http://ftp.sjtu.edu.cn/centos/5.0/os/x86_64/RPM-GPG-KEY-CentOS-532位:rpm --import http://ftp.sjtu.edu.cn/centos/5.0/os/i386/RPM-GPG-KEY-CentOS-5
  b.执行 yum update.
  [b]设置CentOS yum源为国内服务器[/b]
  # CentOS-Base.repo
  # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
  # 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-5 - Base
  baseurl= http://mirror.be10.com/centos/5/os/i386/
  gpgcheck=1
  #released updates
  [update]
  name=CentOS-5 - Updates
  baseurl= http://mirror.be10.com/centos/5/updates/i386/
  gpgcheck=1
  #packages used/produced in the build but not released
  [addons]
  name=CentOS-5 - Addons
  baseurl= http://mirror.be10.com/centos/5/addons/i386/
  gpgcheck=1
  #additional packages that may be useful
  [extras]
  name=CentOS-5 - Extras
  baseurl= http://mirror.be10.com/centos/5/extras/i386/
  gpgcheck=1
  #additional packages that extend functionality of existing packages
  [centosplus]
  name=CentOS-5 - Plus
  baseurl= http://mirror.be10.com/centos/5/centosplus/i386/
  gpgcheck=1
  enabled=0
  #contrib - packages by Centos Users
  [contrib]
  name=CentOS-5 - Contrib
  baseurl= http://mirror.be10.com/centos/5/contrib/i386/
  gpgcheck=1
  enabled=0
  #packages in testing
  [testing]
  name=CentOS-5 - Testing
  baseurl= http://mirror.be10.com/centos/5/testing/i386/
  gpgcheck=1
  enabled=0
  a.执行:rpm --import http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5
  3.这一篇文章只是就CentOS yum使用的基本进行整理,尚有许多未涉及到的地方。不过基本的CentOS yum使用已经足够。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DNS解析BIND 9(适用于WINDOWS桌面系统) 完全改进: Security Fixes Treat an all zero netmask as invalid when generating the localnets acl to workaround bug on Windows platform. [CVE-2013-6230] [RT #34687] Fix crashes when serving some NSEC3 signed zones. memcpy was incorrectly called with overlapping ranges, resulting in malformed names being generated on some platforms. This could cause INSIST failures. (CVE 2014-0591) [RT #35120] Features Changes Add the ability to specify ndots to "nslookup". [RT #34711] Introduce a new tool "dnssec-importkey" to allow externally-generated DNSKEY to be imported into the DNSKEY management framework. [RT #34698] Check that EDNS subnet client options are well formed. [RT #34718] "named" now preserves the capitalization of names when responding to queries. [RT #34737] Include a comment in .nzf files (used for adding new zones via "rndc"), giving the name of the associated view. [RT #34765] Use separate rate limiting queues for refresh and notify requests. [RT #30589] Adjust when a master server is deemed unreachable to be less aggressive. [RT #27075] Create delegations for all "children" of empty zones except "forward first". [RT #34826] Changed the name of "isc-config.sh" developers script (for outputting compiler and linker flags) to "bind9-config". [RT #23825] Add "dig" option to keep the TCP socket open between successive queries (+[no]keepopen). [RT #34918] Add dns_client_createx2() function to DNS Client API to provide a way to specify the local address for use when sending update packets. [RT #34811] "named-checkconf -z" now checks zones of type hint as well as master. [RT #35046] Update config.guess and config.sub to add support for ppc64le (powerpc 64-bit Little Endian). [RT #35060] Update the Windows build system to support feature selection and WIN64 builds. This is a work in progress. [RT #34160] Add "dnssec-signzone -Q" switch to drop signatures from keys that are still published but no longer active. [RT #34990] Add a more detailed "not found" message to "rndc" commands which specify a zone name. [RT #35059] named will now warn when a zone's configured "key-directory" does not exist or is not a directory. [RT #35108] Added improvements to statistics channel XSL stylesheet: the stylesheet can now be cached by the browser; section headers are omitted from the stats display when there is no data in those sections to be displayed; counters are now right-justified for easier readability. (Only available with ./configure --enable-newstats.) [RT #35117] "named-checkconf" can now obscure shared secrets when printing by specifying '-x'. [RT #34465] "named" can now accept integer timestamps in RRSIG records. [RT #35185] The export-library API call for loading "resolv.conf", irs_resconf_load(), has been modified to return ISC_R_FILENOTFOUND when the file does not exist and initializes the resconf structure as if the file had existed and configured with nameservers at the localhost addresses (127.0.0.1 and ::1). [RT #35194] Bug Fixes Treat type 65533 (KEYDATA) as opaque except when used in a key zone. [RT #34238] Fix "host" and "nslookup" so don't need dot after the domain by checking ndots when searching. Only continue searching on NXDOMAIN responses. [RT #34711] Handle changes to sig-validity-interval settings better. [RT #34625] Fix bug where journal filename string could be set incorrectly, causing garbage in log messages. [RT #34738] Address a race condition when shutting down a zone. [RT #34750] Address race condition with manual notify requests. [RT #34806] Fix nslookup crash where some readline clones don't accept NULL pointers when calling add_history. [RT #34842] Fix Linux compilation issue when libcap-devel is installed. [RT #34838] Fix installation on Solaris -- don't add explicit make dependencies/rules for python programs as make won't use the implicit rules. [RT #34835] Fix hanging server with inline-signed zones by addressing lock order reversal deadlock with inline zones. [RT #34856] Fix "host" failure if a UDP query timed out. [RT #34870] Address bugs in dns_rdata_fromstruct and dns_rdata_tostruct for WKS and ISDN types. [RT #34910] Updated OpenSSL PKCS#11 patches to fix active list locking and other bugs. [RT #34855] Fix a potential hang with failure to release lock on error in receive_secure_db. #34944] Fix cast in lex.c which could see 0xff treated as EOF. This fixes issue with potential bad data in a database used by DLZ or SDB. [RT #34993] Fix build issue on newer FreeBSD needing -lhx509 for GSSAPI build. [RT #35001] Address read after free in server side of lwres_getrrsetbyname. [RT #29075] Fix "nsupdate" memory leak if "realm" was used multiple times. [RT #35073] Fix "dig" for cleaning up TCP sockets still waiting on connect(). [RT #35074] Fix "dnssec-importkey" so imported key won't overwrite an existing non-imported private key. Fix issue where queries covered by a disabled Response Policy Zone (query type was '*') are answered with TTL of 0. [RT #35026] Fix "nsupdate" memory leak if "realm" was used multiple times. [RT #35073] Fix "dig" for cleaning up TCP sockets still waiting on connect(). [RT #35074] Fix issue with "rndc retransfer" with inline-signing replacing NSEC3 with NSEC records. [RT #34745] Fix issue with "rndc refresh" failing to sign slave zones using inline-signing. [RT #35105] Fix potential hang (detected by our inline-signing system test) with null pointer dereference in libdns zone_xfrdone. [RT #35042] Address bug in libdns loadnode function that could return a freed node on out of memory. [RT #35106] Fixed a bug causing an insecure delegation from one "static-stub" zone to another to fail with a broken trust chain. [RT #35081] Fixed problem where iterative responses could be discarded when the "query-source" port for an upstream query was the same as the listener port (53). [RT #34925] Fix crashes in RBTDB implementation. Two calls to dns_db_getoriginnode were fatal if there was no data at the node. [RT #35080] Fix a possible race and crash in the socket_search() function in dispatch.c. [RT #35107] Fix "dig" so it can handle AXFR style IXFR responses which span multiple messages. [RT #35137] Fix a "host" tool problem with converting UTF-8 textname to IDN encoding by handling "." as a search list element when IDN support is enabled. [RT #35133] Fix "queryperf" to prevent a possible integer overflow when printing results. [RT #35182] Prevent a theoretically possible race and crash when obtaining a socket in dispatch.c [RT #35128] Use built-in versions of strptime() and timegm() on all platforms to avoid portability issues. [RT #35183] Fix a bug which could cause a crash when running "rndc reconfig" or "rndc reload" after configuration is changed from regular zones to automatic empty zones. [RT #35177]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值