Reproduced Redhat Enterprise 6.1 How to use the free CentOS yum source

Source: Internet
Author: User
Tags gpg mirror website


Redhat Enterprise 6.1 How to use the free CentOS yum source GraybullPosted @ February 18, 2013 22:29 in unix/linux with tags CentOS free redhat Source yum, 3938 read





Redhat Enterprise Linux 6.1 x86_64 uses the official Yum source for a fee, this article explains how to use the free CentOS source to install/update the software. Divided into the following steps:


    • Uninstall existing Yum
    • Download the Yum package for CentOS
    • Install the CentOS package in Yum
    • Update Repo file
    • Clear Old Cache
    • Using Tests


1. Uninstall existing Yum



See what the installed Yum packages are:



#rpm-aq|grep Yum



To uninstall an installed Yum package:



#rpm-aq|grep Yum | Xargs rpm-e--nodeps



From here, Xargs Ben was found dead.



2. Download the CentOS Yum package



Download the following packages from the 163 image (Http://mirrors.163.com/centos/6/os/x86_64/Packages/) (the version of the download package may be different at different times):





Python-iniparse-0.3.1-2.1.el6.noarch.rpmyum-3.2.29-30.el6.centos.noarch.rpmyum-metadata-parser-1.1.2-16.el6.x86 _64.rpmyum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm Download method: Can download directly from the mirror website, or use wget download:

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-30.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

3. Install the CentOS package Yum



#rpm-IVH *.rpm



4. Update the Repo file



Enter the configuration directory:



#cd/ETC/YUM.REPOS.D



If there is no Rhel-debuginfo.repo file in the directory, create a new one with the following modifications:



[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
gpgcheck=1
enabled=0


5. Clear the old cache



#yum Clean All



6. Using the test



List Yum Packages:



#yum List



Installing g++



What is g++? g++ can be used to compile C + + code. Linux installs GCC by default, but often does not install g++.



Find g++ First:



#yum List gcc-c++



The information that is returned contains:



Gcc-c++.x86_64



Therefore, the command to install g++ is:



#yum Install gcc-c++.x86_64



During the installation process, if you are prompted to install certain dependent packages, follow the instructions to install them.



To verify that you have successfully installed g++, check the version:



#g + V






Reproduced Redhat Enterprise 6.1 How to use the free CentOS yum source


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.