If you manage a CentOS 6 server yourself, it is necessary to ensure that all software and security updates are up to date at all times. This ensures that you are not susceptible to a hack/vulnerability.
Before you start, it is always extremely important that you have backups that are stored externally – so not on your server itself. This is important because if your server has any errors or has crashed, it won’t be possible to access your backup.
To update your CentOS 6 server you need SSH access. On Windows, you can use putty to do this. Mac and Linux users can use the terminal.
Step 1: Check CentOS version
Once you are logged in, we will first check whether you are indeed running CentOS 7.
Run the command below to see which CentOS version you are using:
cat /etc/redhat-release
You should get the following result:
CentOS release 6.10 (Final)
Now that we are sure that the correct CentOS version is running, we can get started.
Step 2: Clear cache
We will first ensure that all caches are emptied and that we have the most recent repos (software servers and lists),
yum clean all -y
Now that all caches have been cleared, we can start with the updates.
Step 3: Update CentOS
If you want to use the recommended settings for any upgrades, you can run the following command:
yum update -y
If you want to control which settings are used in an upgrade, you can omit -y
yum update
If all updates have been performed successfully, all you have to do is to perform a server reboot so that everything is completed properly.
reboot
If you have any questions or need help, you can always contact our support team click here
Also check out our other posts on topics such as “the best ways to secure your server”, “how to create an external backup server” and a lot more! Click here
Update: CentOS 6 is currently no longer supported and is End Of Life we recommend that you upgrade your server to AlmaLinux. Read our knowledgebase article on ‘Why to use AlmaLinux instead of CentOS’.