Applies to: This article is educational guidance for self-managed VPS customers and readers researching Linux server administration on OneNet Servers.
INTRODUCTION
it's a great idea to update your server on a regular time for security and stability. use this manual to hold your centos server up to date.
SUPPORTED VERSION
This guide applies to the below version, each with and without SELinux enabled.
Centos 8
Centos 7
Centos 6
Make a backup
Always make a backup earlier before updating your system.
Use yum check-update to update the package database from the enabled repositories.
$ sudo yum check-update
Use yum update to upgrade the packages.
$ sudo yum update
$ sudo reboot
If you want to accept all the defaults and perform the upgrade without intervention:
$ sudo yum check-update && sudo yum update -y
Regular updates keep your server secure and stable. Make sure you have a snapshot or backup strategy in place before updating.