Red Hat products include RedHat Linux (such as redhat8, 9) and Red Hat Enterprise Linux for enterprises. Centos is short for community enterprise operating system. Many of us call it a community enterprise operating system. No matter how you call it, it is a release version of Linux.
Most software packages that constitute RHEL are released based on the GPL protocol, which we often call the open-source software. Because of this, Red Hat also follows this agreement, publish the software package that constitutes RHEL. Anyone who follows the GPL protocol can develop and release the software on the basis of the original software. In this way, centos is a Linux release version that constitutes a clone and reproduction of RHEL on the basis of RHEL release. The clone version of RHEL is not only centos, but also white box Enterprise Linux and Tao Linux and scientific Linux.
Although it is a RHEL clone, it is not exactly the same. The clone is 100% interchangeable (Really ?). However, it is not guaranteed that the software corresponding to RHEL can work normally for 100% of centos. In addition, security vulnerability fixes and software package upgrades correspond to RHEL's paid services and technical support, which also result in latency of Several stars and months.
If the RedHat Enterprise Edition is applicable to Yum sources and so on, it is applicable to Red Hat commercial support and requires paid registration. However, Red Hat Enterprise and centos are essentially the same thing, except that the former will obtain the commercial services provided by RedHat. Then, we only need to configure yum in Red Hat Enterprise to centos. The configuration process is as follows:
Lab environment:
Red Hat Enterprise 5.4, centos 5.4.
- DeleteYum software in Red Hat Enterprise:
Rpm-Qa | grep yum.
Then delete all Yum-related programs listed: rpm-e youryumapp
Cd/etc/yum. repos. d/
Mv CentOS-Base.repo CentOS-Base.repo.bak
Wget http://centos.ustc.edu.cn/CentOS-Base.repo
Better sources include Netease And Sohu:
Wget http://mirrors.163.com/.help/CentOS-Base-163.repo
Wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
Some source configuration files may contain the following content:
- [Base]
- Name = centos-$ releasever-Base
- Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS
- Baseurl = http://developer.centos.org/centos/?releasever/ OS /?basearch/
- Baseurl = http: // mirrors.sohu.com/centos/?releasever/ OS /?basearch/
- Gpgcheck = 1
- Gpgkey = http: // developer.centos.org/centos/rpm-gpg-key-centos-5
Make sure to comment out all the referers in the list (add #), and replace the baseurl with the format in step 5 (for Netease And zhongke da, refer to the modification ).
Now, after the above steps, the source in RedHat has been configured as the centos source. You only need to install the yum component for updates.
Here, you need to find the yum installation component from the CentOS installation package corresponding to your redhat system. For the version of CentOS and Redhat, see another blog:
Http://blog.csdn.net/NEOMc/archive/2011/04/19/6334400.aspx
Find and install the following components in the CentOS installation package:
Sudo rpm-ivh yum-updatesd-0.9-2.el5.noarch.rpm
Sudo rpm-ivh yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
Sudo rpm-ivh yum-3.2.22-20.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
Note: It is best to install the last two packages together because these two rpm packages are mutually dependent. This is also a small trick. You can install it together in the future when there is a dependency package.
Execute Yum makecache to cache local data. Run the yum LIST command to check all locally cached Yum installation package data?
Congratulations, you have successfully replaced the RedHat source to enjoy the fun of Linux!
If you have any questions or suggestions, please feel free to leave a message.