With CentOS 6.0 now available on mirrors, many sysadmins face the dilemma of choosing between fresh installs and in-place upgrades. Having worked extensively with both RHEL 5.6 and 6.x in test environments, I've gathered some insights worth sharing.
Consider in-place upgrades when:
- Maintaining existing configurations is critical
- Downtime windows are extremely limited
- Complex application dependencies exist
The major upgrade hurdles include:
Package Compatibility Issues
# Check for obsolete packages
rpm -qa --qf '%{NAME}\n' | sort > installed-packages.txt
# Compare with CentOS 6 package list
comm -23 installed-packages.txt centos6-packages.txt
Configuration File Migration
Use rpmconf
to handle config file changes:
yum install rpmconf
rpmconf -a
Service Compatibility
Test critical services before upgrade:
for service in httpd mysqld postfix; do
service $service condrestart
done
- Create complete system backup
- Update all existing packages
- Install preupgrade package:
yum install preupgrade
preupgrade-cli "CentOS 6"
Essential checks after upgrade:
# Verify kernel version
uname -r
# Check SELinux status
sestatus
# Validate repository configuration
yum repolist
For critical systems, consider:
# Set up new CentOS 6 server
virt-install --name centos6-mig \
--ram 2048 --disk path=/var/lib/libvirt/images/centos6-mig.qcow2 \
--location http://mirror.centos.org/centos/6/os/x86_64/
This approach allows gradual service migration while maintaining the old system as fallback.
With CentOS 6.0 now available on mirrors, many sysadmins face the critical decision between fresh installation and in-place upgrade. Having worked extensively with both RHEL 5.6 and 6.x in production environments, I've compiled practical insights for this migration.
Consider in-place upgrades when:
- Maintaining existing configurations is critical
- Downtime windows are extremely limited
- Complex application dependencies exist
# Verify current OS version
cat /etc/redhat-release
# Check disk space (minimum 10GB free)
df -h
# Backup critical data
tar -czvf /backup/centos5_backup.tar.gz /etc /home /var/www
# List installed packages
rpm -qa > installed_packages.txt
Official documentation recommends using preupgrade
tool:
# Install preupgrade utility
yum install preupgrade
# Run preupgrade check
preupgrade
# Download CentOS 6 packages
preupgrade-cli "CentOS 6.0"
Package Conflicts: Many CentOS 5 packages won't work on CentOS 6. Solution:
# Clean problematic packages
package-cleanup --problems
package-cleanup --orphans
Service Compatibility: Init scripts may need updating. Check critical services:
# Verify service status
service --status-all | grep running
# Example Apache config migration
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.rhel5backup
# Verify OS version
cat /etc/redhat-release
# Check for failed services
systemctl --failed
# Test key functionality
curl -I localhost
mysql -V
For systems with:
- Custom kernel modules
- Proprietary hardware drivers
- Complex SELinux policies
Always document your upgrade process and have rollback plans ready. Test in staging environments before production upgrades.