RedHat configuration yum from centos5 source and CD source update software

  

YUM As its name suggests, Yellow Dog Updater, Modified.Yum does the same for RPM-based systems. It provides a simple command to automate the installation or update of a package, similar to the apt-get tool for Debian, after first installing and updating any other necessary packages to meet the required package dependencies. Br>

YUM features: You can configure multiple repository (Repository) configuration files at the same time (/etc/yum.conf automatically solves the problem of relying on adding or removing rpm packages. Easy to use and keep with RPM database Consistency

RHEL AS5 can upgrade the system through Yum, but the default rhel-debuginfo.repo setting is to upgrade the system from RedHat's Yum source. If you have not purchased Redhat service, Redhat5 will be upgraded later. It is a charge, you need a key to upgrade, then you can't upgrade with Yum. Fortunately, since centos is a free enterprise version, you can use the centos yum source to update the RHEL AS5 system.

Configure YUM to update from centos5 source Software

[root@clinet ~]# rpm –import http://ftp.twaren.net/Linux/CentOS/RPM-GPG-KEY-CentOS-5 Install the GPG of ftp.twaren.net , you can also add other resource libraries, Have chosen a location close to your location [root@clinet ~]# rpm -qa gpg-pubkey*Check GPG Keygpg-pubkey-e8562897-459f07a4 If you want to delete Key, use the following command: [root@clinet ~]# rpm - e gpg-pubkey-e8562897-459f07a4

[root@clinet ~]# vi /etc/yum.repos.d/rhel-debuginfo.repo[rhel-debuginfo]name=Red Hat Enterprise Linux $releasever &ndash $basearch – Debugbaseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/baseurl is your YUM source address enabled=0 whether this is enabled Warehouse, 1 is enabled, 0 is disabled gpgcheck=1 setting gpgcheck=1 will let yum check the GnuPG signature of each downloaded RPM. This is done because you need the appropriate GnuPG key to register with your RPM database. Can prevent being spoofed, such as: illegally invading the distribution site, the Trojan importing the package, so that the uninformed user downloads the storage address of gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releaseGPGKEY

The above defaults, copy the following update points and insert them into the rhel-debuginfo.repo text. [base]name=Red Hat Enterprise Linux $releasever -Basebaseurl=http://ftp.twaren.net/Linux/CentOS/5/os/$basearch/gpgcheck=1[update]name=Red Hat Enterprise Linux $releasever -Updatesbaseurl=http://ftp.twaren.net/Linux/CentOS/5/updates/$basearch/gpgcheck =1[extras]name=Red Hat Enterprise Linux $releasever -Extrasbaseurl=http://ftp.twaren.net/Linux/CentOS/5/extras/$basearch/gpgcheck=1[addons]name=Red Hat Enterprise Linux $ Releasever -Addonsbaseurl=http://ftp.twaren.net/Linux/CentOS/5/addons/$basearch/gpgcheck=1[root@clinet ~]#yum clean all Clear cache and old packages [root@clinet ~] # yum install httpd Test if you can update the software

Note: When the yum or yum repository is updated for the first time, yum will automatically download all The required headers are placed in the /var/cache/yum directory and may take a long time. Please be patient, so a series of data will be displayed later. Configure YUM to update the software from the local CD [root@clinet ~]# mkdir /mnt/Cdrom create mount point [root@clinet ~]# mount /dev/cdrom /mnt/cdrom mount disc mount: block device /dev/cdrom is write-protected, mounting read-only

[root@ Clinet /]# ll /etc/yum.repos.d/total 4-rw-r–r– 1 root root 781 Feb 24 03:19 rhel-debuginfo.repo[root@clinet /]# cd /etc/yum. Repos.d/[root@clinet yum.repos.d]# cp rhel-debuginfo.repo rhel-debuginfo.repo.bak copy for rhel-debuginfo.repo.bak backup [root@clinet yum.repos.d]# Lllotal 8-rw-r–r– 1 root root 781 Feb 24 03:19 rhel-debuginfo.repo-rw-r–r– 1 root root 781 Feb 25 00:34 rhel-debuginfo.repo.bak[root@clinet Yum.repos.d]# vi rhel-debuginfo.repoEdit rhel-debuginfo.repo, insert the following code

[rhel-debuginfo]name=Red Hat Enterprise Linux $releasever – $basearch – Debugbaseurl= File:///mnt/cdr Om/Serverenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Copyright © Windows knowledge All Rights Reserved