How to Update and Upgrade Packages in CentOS 7: A Step-by-Step Guide.
Open up a terminal application or log in using the ssh command. Run the yum command to upgrade all installed packages on the CentOS Linux system:
sudo yum update
One can only apply security-related updates to the server, running:
sudo yum --security update
How to update a single package? Run the following command (as an example):
sudo yum update pkg_name
sudo yum update nginx
sudo yum update php
sudo yum update httpd
It is also possible to install all updates except kernel and php packages as follows:
sudo yum -x 'kernel' -x 'php' update
The -x option excludes packages specified given name. See “Force yum update Command To Exclude Certain Packages” for more info.
Reboot the Linux system
sudo reboot
You must reboot the system when the CentOS Linux kernel gets updated
Verify Linux kernel version and list updates:
uname -mrs
sudo yum check-update