To exclude php for example package when using “yum update”

Open /etc/yum.conf file:
# vi /etc/yum.conf

Append following line under [main] section, enter:
exclude=php*

or

at the command line

# yum –exclude=package* update