How to set up the Redhat using a CentOS source, you can install all the required packages with the Yum tool and perform a system upgrade.
Here is the redhat6.0 corresponding to the CentOS version is also the 6.0 kernel version is 2.6.32-71.el6.x86_64
Here the base source is set to 163 of the mirror station
The Epel extension source uses the Sohu mirror station
1. First confirm the Yum-related RPM package and uninstall
Rpm-aq|grep Yum|xargs rpm-e--nodeps
2. Download 163 related RPM packages
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastetmirror-1.1.30-30.el6.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/python-iniparse-0.3.1-2.1.el6.noarch.rpm
python-iniparse-0.3.1-2.1.el6.noarch.rpm
yum-3.2.29-69.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
It is important to note that yum-3.2.29-69.el6.centos.noarch.rpm and yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm both packages need to be installed together.
3. Download the 163 source configuration file
If you/etc/yum.repos.d/a different file, it is best to perform a backup operation first
If there is no direct
wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
Edit this file:
Comment out mirrorlist, add BaseURL
Change all $releasever to your version number 6 (Note: Here this is so to change 6, is redhat6.0 and centos6.0 kernel version consistent) Save exit
If this is a 64 system, change $basearch to x86_64.
[Base]
name=centos-$releasever-base-163.com
baseurl=http://mirrors.163.com/centos/6/os/x86_64/
#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=os
Gpgcheck=1
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
#released Updates
[Updates]
name=centos-$releasever-updates-163.com
baseurl=http://mirrors.163.com/centos/6/updates/x86_64/
#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=updates
Gpgcheck=1
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
#additional packages that could be useful
[Extras]
name=centos-$releasever-extras-163.com
baseurl=http://mirrors.163.com/centos/6/extras/x86_64/
#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=extras
Gpgcheck=1
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
#additional packages that extend functionality of existing packages
[Centosplus]
name=centos-$releasever-plus-163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/x86_64/
#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=centosplus
Gpgcheck=1
Enabled=0
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
#contrib-packages by Centos Users
[Contrib]
name=centos-$releasever-contrib-163.com
baseurl=http://mirrors.163.com/centos/6/contrib/x86_64/
#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=contrib
Gpgcheck=1
Enabled=0
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
5 test, empty the Yum cache first
Yum Clean All
6. Regenerate into a new cache
Yum Makecache
Then use Yum list to look at the package, and if there is no problem, you can use the common network CentOS source installed.
Configuring the Epel Source
1. First, install the Epel source
Yum List |grep Epel
or download directly:
wget http://mirrors.sohu.com/fedora-epel/epel-release-latest-6.noarch.rpm
2. After the installation is complete, edit the Epel.repo
Similar to the base source configuration file, the new BaseURL is added and the default BaseURL fedoraproject.org commented out
What needs to be determined is to find the exact directory of the mirror station
The specific configuration file is as follows:
[Epel]
Name=extra Packages for Enterprise Linux 6-$basearch
#baseurl =http://download.fedoraproject.org/pub/epel/6/$basearch
baseurl=http://mirrors.sohu.com/fedora-epel/6/x86_64/
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch= $basearch
Failovermethod=priority
Enabled=1
Gpgcheck=1
#gpgkey =file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
#gpgkey =http://mirror.centos.org/centos/rpm-gpg-key-centos-6
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
[Epel-debuginfo]
Name=extra Packages for Enterprise Linux 6-$basearch-debug
#baseurl =http://download.fedoraproject.org/pub/epel/6/$basearch/debug
baseurl=http://mirrors.sohu.com/fedora-epel/6/x86_64/
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch= $basearch
Failovermethod=priority
Enabled=0
#gpgkey =file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
#gpgkey =http://mirror.centos.org/centos/rpm-gpg-key-centos-6
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
Gpgcheck=1
[Epel-source]
Name=extra Packages for Enterprise Linux 6-$basearch-source
#baseurl =http://download.fedoraproject.org/pub/epel/6/srpms
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch= $basearch
baseurl=http://mirrors.sohu.com/fedora-epel/6/x86_64/
Failovermethod=priority
Enabled=0
#gpgkey =http://mirror.centos.org/centos/rpm-gpg-key-centos-6
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
Gpgcheck=1
Then edit another file Epel-testing.repo
Similarly, we comment out the default, Mirrolist, and BaseURL in the file, changing to the exact path of the mirror station that we are using.
[Epel-testing]
Name=extra Packages for Enterprise Linux 6-testing-$basearch
#baseurl =http://download.fedoraproject.org/pub/epel/testing/6/$basearch
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch= $basearch
baseurl=http://mirrors.sohu.com/fedora-epel/testing/6/x86_64/
Failovermethod=priority
Enabled=0
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
[Epel-testing-debuginfo]
Name=extra Packages for Enterprise Linux 6-testing-$basearch-debug
#baseurl =http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch= $basearch
Baseurl=http://mirrors.sohu.com/fedora-epel/testing/6/x86_64/debug
Failovermethod=priority
Enabled=0
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
Gpgcheck=1
[Epel-testing-source]
Name=extra Packages for Enterprise Linux 6-testing-$basearch-source
#baseurl =http://download.fedoraproject.org/pub/epel/testing/6/srpms
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch= $basearch
baseurl=http://mirrors.sohu.com/fedora-epel/testing/6/x86_64/
Failovermethod=priority
Enabled=0
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
Gpgcheck=1
After the configuration is complete, you can see if the source has been added:
Yum Repolist
Yum Clean all && yum Makecache
Then you can yum zabbix20-agented
Redhat How to configure Yum installation and upgrade using a CentOS source