Configure yum in RedHat Linux 5

Source: Internet
Author: User

Configure yum in RedHat Linux 5

1. Check the current Linux operating system RedHat version and 32/64-bit operating system.

[Root @ localhost CentOS5] # more/etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[Root @ localhost centos5] # uname-
Linux localhost. localdomain 2.6.18-308. el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

2. Delete the yum service that comes with RedHat.

[Root @ localhost centos5] # & nbsp; rpm-qa | grep yum | xargs rpm-e -- nodeps

3. download and install the corresponding yum installation package (the number of installation packages varies depending on the operating system version)

[Root @ localhost centos5] # & nbsp; wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
[Root @ localhost centos5] # & nbsp; wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
[Root @ localhost centos5] # & nbsp; wget secret;
[Root @ localhost centos5] # & nbsp; rpm-ivh yum *. rpm

4. Configure the yum source (163 images are recommended)

[Root @ localhost centos5] # & nbsp; vi/etc/yum. repos. d/CenOS-Base.repo

Add the following content:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and
# Update status of each mirror to pick mirrors that are updated to and
# Geographically close to the client. You shoshould use this for CentOS updates
# Unless you are manually picking other mirrors.
#
# If the specified list = does not work for you, as a fall back you can try
# Remarked out baseurl = line instead.
#
#

[Base]
Name = CentOS-$ releasever-Base
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS
Base url = http://mirrors.163.com/centos/5/ OS /x86_64/
Gpgcheck = 1
Gpgkey = http://mirrors.163.com/centos/5/ OS /x86_64/RPM-GPG-KEY-CentOS-5

# Released updates
[Updates]
Name = CentOS-$ releasever-Updates
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = updates
Base url = http://mirrors.163.com/centos/5/updates/x86_64/
Gpgcheck = 1
Gpgkey = http://mirrors.163.com/centos/5/ OS /x86_64/RPM-GPG-KEY-CentOS-5

# Additional packages that may be useful
[Extras]
Name = CentOS-$ releasever-Extras
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = extras
Base url = http://mirrors.163.com/centos/5/extras/x86_64/
Gpgcheck = 1
Gpgkey = http://mirrors.163.com/centos/5/ OS /x86_64/RPM-GPG-KEY-CentOS-5

# Additional packages that extend functionality of existing packages
[Centosplus]
Name = CentOS-$ releasever-Plus
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = centosplus
Base url = http://mirrors.163.com/centos/5/centosplus/x86_64/
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirrors.163.com/centos/5/ OS /x86_64/RPM-GPG-KEY-CentOS-5

# Contrib-packages by Centos Users
[Contrib]
Name = CentOS-$ releasever-Contrib
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = contrib
Base url = http://mirrors.163.com/centos/5/contrib/x86_64/
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirrors.163.com/centos/5/ OS /x86_64/RPM-GPG-KEY-CentOS-5

5. Clear the cache and download the new image cache.

[Root @ localhost centos5] # & nbsp; yum clean all
[Root @ localhost centos5] # & nbsp; yum makecache

6. Test (view the current subversion version and check the server subversion Version)

[Root @ localhost yum. repos. d] # rpm-qa | grep subversion
Subversion-1.6.11-7.el5_6.4
Subversion-1.6.11-7.el5_6.4 [root @ localhost yum. repos. d] # yum check-update subversion
Loaded plugins: fastestmirror, katello, product-id, subrole-manager
Updating certificate-based repositories.
Unable to read consumer identity
Loading mirror speeds from cached hostfile

Subversion. i386 1.6.11-12. el5_10 base
Subversion. x86_64 1.6.11-12. el5_10 base
Obsoleting Packages
Centos-release.x86_64 10: 5-11. el5.centos base
Redhat-release.x86_64 5Server-5.8.0.3 installed
Firefox. i386 31.3.0-4. el5.centos updates
Firefox. i386 3.6.26-1. el5_7 installed
Firefox. x86_64 31.3.0-4. el5.centos updates
Firefox. x86_64 3.6.26-1. el5_7 installed

7. Precautions for installing yum

Install the corresponding CentOS according to the Linux version number and reference the CenOS-Base.repo file corresponding to the CentOS version number,

(1) If the yun of CentOS 5 is installed but the source yum makecache of CentOS6 is referenced, an error is reported.

(2) If the operating system is RedHat 5, but CentOS6 yum is installed, a large number of dependent packages need to be manually installed and upgraded during installation.

8. Attachment: CentOS China image website

Asia China Zhejiang University Co., http://mirrors.zju.edu.cn/centos/.
Asia China Alibaba Cloud Computing http://mirrors.aliyun.com/centos/
Asia China Beijing Institute of Technology http://mirror.bit.edu.cn/centos/
Asia China BitComm Ltd. http://mirrors.pubyun.com/centos/
Asia China CDS China http://mirrors.yun-idc.com/centos/ ftp://mirrors.yun-idc.com/centos/ rsync: // mirrors.yun-idc.com/centos/
Asia China University of Geosciences http://mirrors.cug.edu.cn/centos/
Asia China Dalian Neusoft University of Information http://mirrors.neusoft.edu.cn/centos/ Co., ftp://mirrors.neusoft.edu.cn/centos/.
Asia China Huazhong University of Science and Technology http://mirrors.hust.edu.cn/centos/ rsync: // mirrors.hust.edu.cn/centos/
Asia China NetEase http://mirrors.163.com/centos/
Asia China Northeastern University, Shenyang Liaoni http://mirror.neu.edu.cn/centos/
Asia China Northwest A & F University http://mirrors.nwsuaf.edu.cn/centos/
Asia China Qiming College of Huazhong University of Science and Technology Co., http://mirrors.hustunique.com/centos/. rsync: // mirrors.hustunique.com/centos/
Asia China Shanghai Jiao Tong University Co., http://ftp.sjtu.edu.cn/centos/.
Asia China Sohu Inc, Beijing P. R. China http://mirrors.sohu.com/centos/
Asia China University of Science and Tech of China http://centos.ustc.edu.cn/centos/
Asia China-Hong Kong Asia Web Services Ltd. http://mirror.vpshosting.com.hk/pub/linux/centos/ ftp://mirror.vpshosting.com.hk/pub/linux/centos/

How to Set DVD as the default yum source in CentOS

RedHat 6.2 modify yum source in Linux use CentOS source for free

Configure the epel yum Source

Redhat local yum source configuration

Description of yum configuration file

Install yum in RedHat 6.1)

YUM installation and cleaning

Build yum local source on CentOS 6.4

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.