CentOS 7 is one of the most popular Linux distribution used in a large amount of web servers around the world. It is critical you keep your system up-to-date and ensure that you have the latest security patches and updates to reduce the vulnerabilities.
In this tutorial, we will show you how to update CentOS 7 step-by-step.
Before we begin, it is a good idea to make a backup of your system in case something goes wrong during the update process.
- First, you need to check which version of CentOS you are currently running. You can do this by typing the following command:
cat /etc/centos-release
- Next, you need to update the package manager’s package list by typing the following command:
yum update
This may take some time, depending on the number of packages that need to be updated.
- Once the package list has been updated, you can upgrade your system by typing the following command:
yum upgrade
This command will upgrade all of the packages on your system to the latest version.
- If you want to upgrade just a single package, you can use the following command:
yum update <package_name>
Replace <package_name> with the name of the package you want to update.
- After the upgrade is complete, you should reboot your system to apply the changes. You can do this by typing the following command:
reboot
- After the system has rebooted, you can check that the update was successful by typing the following command:
cat /etc/centos-release
This should display the new version of CentOS that you are running.
That’s it! You have successfully updated CentOS 7.