Differences
This shows you the differences between two versions of the page.
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:38:37] garrett.plasky Approved |
server-administration:upgrade-centos-4-to-5 [2012-10-25 03:31:43] shaun.reitan [cPanel Servers Only] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Upgrading CentOS 4.x to 5.x ===== | + | ===== Upgrading CentOS |
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:// | + | ==== 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 |
- | - As of the time of writing, [[http://rpm.pbone.net/pbone.net]] has all of the RPMs necessary for this upgrade. | + | chattr |
- | - cPanel servers can be successfully upgraded in this fashion, however third-party RPMs may need to be removed first. | + | chattr |
+ | chattr | ||
+ | chattr -Ria /lib | ||
+ | chattr -Ria /sbin | ||
+ | chattr | ||
+ | chattr | ||
+ | chattr -Ria /usr/lib | ||
+ | chattr -Ria / | ||
+ | chattr -Ria / | ||
+ | chattr -Ria / | ||
+ | chattr -Ria / | ||
+ | chattr -Ria / | ||
+ | chattr -Ria /usr/sbin | ||
+ | chattr -Ria / | ||
+ | chattr -Ria /var/lib | ||
+ | chattr -Ria /var/lock | ||
+ | chattr -Ria /var/log | ||
+ | chattr -Ria /var/run | ||
+ | chattr -Ria / | ||
+ | </ | ||
- | {{tag> | + | ==== Ensure CentOS 4.x is up-to-date ==== |
+ | |||
+ | <code console> | ||
+ | rpm --rebuilddb | ||
+ | yum clean all | ||
+ | yum update | ||
+ | rm -f / | ||
+ | rpm --rebuilddb | ||
+ | </ | ||
+ | |||
+ | ==== Remove and Install Packages ==== | ||
+ | |||
+ | <code console> | ||
+ | rpm -e lftp syslinux mkbootdisk | ||
+ | rpm -Uvh http:// | ||
+ | mv / | ||
+ | </ | ||
+ | |||
+ | ==== Install CentOS5 Kernel ==== | ||
+ | |||
+ | <code console> | ||
+ | rpm -ivh --nodeps http:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Remove Old Kernels ==== | ||
+ | <code console> | ||
+ | rpm -e $(rpm -qa | grep kernel | grep -v 2.6.18 | tr ' | ||
+ | </ | ||
+ | |||
+ | ==== Remaining Packages Upgrade ==== | ||
+ | |||
+ | <code console> | ||
+ | rpm -e --justdb python-elementtree --nodeps | ||
+ | yum clean all | ||
+ | yum upgrade | ||
+ | </ | ||
+ | |||
+ | ==== Fix RPM System ==== | ||
+ | |||
+ | <code console> | ||
+ | rm -f / | ||
+ | rpm --rebuilddb | ||
+ | rpm -Uvh --force http:// | ||
+ | yum clean all | ||
+ | </ | ||
+ | |||
+ | ==== One Last Upgrade ==== | ||
+ | |||
+ | <code console> | ||
+ | yum upgrade | ||
+ | </ | ||
+ | |||
+ | ==== cPanel Servers Only ==== | ||
+ | |||
+ | You must remove the filesystem package from the excludes line in / | ||
+ | |||
+ | <code console> | ||
+ | rm -f / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | {{tag> |