Before upgrading CentOS 5.6 to 5.7 it cannot be stressed enough how important it is to make a backup of your system before you do this. Actions listed in this post are written with the assumption that they will be executed by the root user running the bash or any other modern shell.
Clean All Packages
# yum clean all
The following command will get a list of packages that are going to be updated.
# yum list updates
Upgrade CentOS 5.6 to 5.7
# yum update
Finally reboot the server for Kernel changes to take effect
Verify that CentOS 5.7 is working:
# cat /etc/redhat-release
CentOS release 5.7 (Final)
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.7 (Final)
# rpm -q centos-release