Redhat6 install software online using CentOS yum Source
Introduction: Because RHEL's yum online update is charged, it cannot be used without registration, that is, it cannot install software online. In this case, do you want to use the RHEL system and yum source to install software online? There is a solution. Please read it down!
1. Delete the original yum of RHEL.
Rpm-aq | grep yum | xargs rpm-e -- nodeps # Delete
2. download the new yum installation package # Here we use the CentOS yum Source
Wgethttp: // vault.centos.org/6.0/ OS /x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
Wgethttp: // response
Wgethttp: // vault.centos.org/6.0/ OS /x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
Wgethttp: // response
3. Install the yum Software Package
Rpm-ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
Rpm-ivh yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
Rpm-ivh yum-3.2.27-14.el6.centos.noarch.rpm
Rpm-ivh yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
Note: The last two installation packages must be installed together. Otherwise, the system prompts mutual dependency and installation fails.
4. Change yum source # Use the CentOS image source of Netease
Cd/etc/yum. repos. d/
Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
Vi CentOS6-Base-163.repo # editing files
Replace all $ releasever in the file with the version number, that is, 6 is saved!
Or directly copy the following memory to the CentOS6-Base-163.repo file (modified)
#CentOS-Base.repo##ThemirrorsystemusestheconnectingIPaddressoftheclientandthe#updatestatusofeachmirrortopickmirrorsthatareupdatedtoand#geographicallyclosetotheclient.YoushouldusethisforCentOSupdates#unlessyouaremanuallypickingothermirrors.##Ifthemirrorlist=doesnotworkforyou,asafallbackyoucantrythe#remarkedoutbaseurl=lineinstead.##[base]name=CentOS-6-Base-163.combaseurl=http://mirrors.163.com/centos/6/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#releasedupdates[updates]name=CentOS-6-Updates-163.combaseurl=http://mirrors.163.com/centos/6/updates/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additionalpackagesthatmaybeuseful[extras]name=CentOS-6-Extras-163.combaseurl=http://mirrors.163.com/centos/6/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additionalpackagesthatextendfunctionalityofexistingpackages[centosplus]name=CentOS-6-Plus-163.combaseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib-packagesbyCentosUsers[contrib]name=CentOS-6-Contrib-163.combaseurl=http://mirrors.163.com/centos/6/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
5. yum clean all # Clear yum Cache
Yum makecache # cache the software package information on the server to the local machine to speed up searching and installing software
Yum install vim * # test whether yum is available
Now, Redhat6 can use CentOS yum source to install software online!