Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
server-administration:upgrade-centos-4-to-5 [2010-11-01 18:39:07]
garrett.plasky Approved
server-administration:upgrade-centos-4-to-5 [2012-10-01 21:19:55]
shaun.reitan
Line 1: Line 1:
-===== Upgrading CentOS 4.x to 5.x =====+===== Upgrading CentOS 32bit 4.x to 32bit 5.x =====
  
 We have found the following guide very useful in this process. This works for both dedicated servers as well as VPS nodes: We have found the following guide very useful in this process. This works for both dedicated servers as well as VPS nodes:
  
-[[http://planet.admon.org/howto/update-centos-4-to-centos-5-remotely/|CentOS Upgrade Guide]]+==== Setting file attributes ====
  
-Notes: +<code console> 
-  VPS nodes do not need to be restarted after the process is complete unless you are running a PV-grub kernel (pvgrub-* in your Kernel Options inside the VPS Manager). +chattr -Ria /bin 
-  As of the time of writing, [[http://rpm.pbone.net|pbone.net]] has all of the RPMs necessary for this upgrade. +chattr -Ria /etc 
-  cPanel servers can be successfully upgraded in this fashion, however third-party RPMs may need to be removed first.+chattr -Ria /etc 
 +chattr -Ria /include 
 +chattr -Ria /lib 
 +chattr -Ria /sbin 
 +chattr -Ria /usr/bin 
 +chattr -Ria /usr/include 
 +chattr -Ria /usr/lib 
 +chattr -Ria /usr/libexec 
 +chattr -Ria /usr/local/bin 
 +chattr -Ria /usr/local/include 
 +chattr -Ria /usr/local/lib 
 +chattr -Ria /usr/local/sbin 
 +chattr -Ria /usr/sbin 
 +chattr -Ria /usr/share 
 +chattr -Ria /var/lib 
 +chattr -Ria /var/lock 
 +chattr -Ria /var/log 
 +chattr -Ria /var/run 
 +chattr -Ria /var/spool/repackage 
 +</code>
  
-{{tag>centos guide vps cpanel kernel}}+==== Ensure CentOS 4.x is up-to-date ==== 
 + 
 +<code console> 
 +rpm --rebuilddb 
 +yum clean all 
 +yum update 
 +rm -f /var/lib/rpm/__db.00* 
 +rpm --rebuilddb 
 +</code> 
 + 
 +==== Remove and Install Packages ==== 
 + 
 +<code console> 
 +rpm -e lftp syslinux mkbootdisk 
 +rpm -Uvh http://vault.centos.org/5.0/os/i386/CentOS/centos-release-5-0.0.el5.centos.2.i386.rpm http://vault.centos.org/5.0/os/i386/CentOS/centos-release-notes-5.0.0-2.i386.rpm 
 +mv /etc/yum.repos.d/CentOS-Base.repo.rpmnew /etc/yum.repos.d/CentOS-Base.repo 
 +</code> 
 + 
 +==== Install CentOS5 Kernel ==== 
 + 
 +<code console> 
 +rpm -ivh --nodeps http://vault.centos.org/5.0/os/i386/CentOS/kernel-2.6.18-8.el5.i686.rpm http://vault.centos.org/5.0/os/i386/CentOS/kernel-devel-2.6.18-8.el5.i686.rpm 
 +</code> 
 + 
 + 
 +==== Remove Old Kernels ==== 
 +<code console> 
 +rpm -e $(rpm -qa | grep kernel | grep -v 2.6.18 | tr '\n' ' ') --nodeps 
 +</code> 
 + 
 +==== Remaining Packages Upgrade ==== 
 + 
 +<code console> 
 +rpm -e --justdb python-elementtree --nodeps 
 +yum clean all 
 +yum upgrade 
 +</code> 
 + 
 +==== Fix RPM System ==== 
 + 
 +<code console> 
 +rm -f /var/lib/rpm/__db.00* 
 +rpm --rebuilddb 
 +rpm -Uvh --force http://vault.centos.org/5.0/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm http://vault.centos.org/5.0/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm 
 +yum clean all 
 +</code> 
 + 
 +==== One Last Upgrade ==== 
 + 
 +<code console> 
 +yum upgrade 
 +</code> 
 + 
 +==== cPanel Servers Only ==== 
 + 
 +<code console> 
 +rm -f /var/cpanel/sysinfo.config 
 +/scripts/gensysinfo 
 +/scripts/upcp --force 
 +/scripts/mysqlup --force 
 +/scripts/easyapache --build 
 +</code> 
 + 
 + 
 + 
 + 
 + 
 +{{tag>centos guide cpanel}}