Many servers in the Organization are RedHatAS4 and AS5 machines. You often need to install and compile software packages. upgrading to the CentOS system is much more convenient! I checked the relevant materials online, but they were not satisfactory. I finally found out the following methods and shared them with you! Check the current system version # less/etc/redhat-release and check whether Redhat's yum series package exists in the installed package # suroot # rpm-
Many servers in the Organization are RedHat AS4 and AS5 machines. You often need to install and compile software packages. upgrading to the CentOS system is much more convenient!
I checked the relevant materials online, but they were not satisfactory. I finally found out the following methods and shared them with you!
Check the current system version # less/etc/redhat-release check whether the Redhat yum series package exists in the installed package # su root # rpm-qa | grep if yum exists, delete it all one by one # rpm-e -- nodeps component package name to create a dedicated Centos directory, then download and install the yum series package of the Centos system # su webuser # cd/home/webuser # mkdir centos to download the Centos upgrade package (Note: perform operations based on RedHat AS4 or RedHat AS5) redHat AS4: # wget http://centos.ustc.edu.cn/centos/4.7/os/ I386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm # wget http://centos.ustc.edu.cn/centos/4.7/os/ I386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm # wget http://centos.ustc.edu.cn/centos/4.7/os/ I386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm # wget http://centos.ustc.edu.cn/centos/4.7/os/ I386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm # wget http://centos.ustc.edu.cn/centos/4.7/os/ I386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm # wget http://centos.ustc.edu.cn/centos/4.7/os/ I386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm # wget http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4RedHat AS5: # wget http://centos.ustc.edu.cn/centos/5.3/os/ I386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm # wget http://centos.ustc.edu.cn/centos/5.3/os/ I386/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm # wget http://centos.ustc.edu.cn/centos/5.3/os/ I386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm # wget http://centos.ustc.edu.cn/centos/5.3/os/ I386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm # wget http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 Install the Centos upgrade package # su root # rpm-Uvh -- nodeps/home/webuser/centos /*. rpm import Centos Upgrade Component authorization (Note: According to RedHat AS4 or RedHat AS5 respectively) RedHat AS4: # rpm -- import/home/webuser/centos/RPM-GPG-KEY-CentOS-4RedHat AS5: # rpm -- import/home/webuser/centos/RPM-GPG-KEY-CentOS-5 create and edit the yum upgrade source configuration file # su root # mkdir-p/etc/yum. repos. d/# vi/etc/yum. repos. d/CentOS-Base.repo paste the following content to overwrite the file: RedHat AS4: [base] name = CentOS-$ releasever-Basebaseurl = http://centos.ustc.edu.cn/centos/4.7/os/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4#released Updates [update] name = CentOS-$ releasever-Updatesbaseurl = http://centos.ustc.edu.cn/centos/4.7/updates/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4#packages Used/produced in the build but not released [addons] name = CentOS-$ releasever-Addonsbaseurl = http://centos.ustc.edu.cn/centos/4.7/addons/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4#additional Packages that may be useful [extras] name = CentOS-$ releasever-Extrasbaseurl = http://centos.ustc.edu.cn/centos/4.7/extras/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4#additional Packages that extend functionality of existing packages [centosplus] name = CentOS-$ releasever-Plusbaseurl = http://centos.ustc.edu.cn/centos/4.7/centosplus/ $ Basearch/gpgcheck = 1 enabled = 0 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4#contrib -Packages by Centos Users [contrib] name = CentOS-$ releasever-Contribbaseurl = http://centos.ustc.edu.cn/centos/4.7/contrib/ $ Basearch/gpgcheck = 1 enabled = 0 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-4RedHat AS5: [base] name = CentOS-$ releasever-Basebaseurl = http://centos.ustc.edu.cn/centos/5.3/os/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 # Released updates [update] name = CentOS-$ releasever-Updatesbaseurl = http://centos.ustc.edu.cn/centos/5.3/updates/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 # Packages used/produced in the build but not released [addons] name = CentOS-$ releasever-Addonsbaseurl = http://centos.ustc.edu.cn/centos/5.3/addons/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 # Additional packages that may be useful [extras] name = CentOS-$ releasever-Extrasbaseurl = http://centos.ustc.edu.cn/centos/5.3/extras/ $ Basearch/gpgcheck = 1 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 # Additional packages that extend functionality of existing packages [centosplus] name = CentOS-$ releasever-Plusbaseurl = http://centos.ustc.edu.cn/centos/5.3/centosplus/ $ Basearch/gpgcheck = 1 enabled = 0 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 # Contrib-packages by Centos Users [contrib] name = CentOS-$ releasever-Contribbaseurl = http://centos.ustc.edu.cn/centos/5.3/contrib/ $ Basearch/gpgcheck = 1 enabled = 0 gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 After checking, save and exit to start upgrading the system # yum update waits for the system to list the components to be upgraded and press "y" to confirm Total download size: 334 MIs this OK [y/n]: y... Complete! After downloading all components, restart the server and upgrade the operating system!