How to install server updates
The process of installing updates on an unmanaged server is covered in this article. Keeping your server patched and updated with the most recent changes is one of the most crucial things you can do to increase server security.
Follow the appropriate procedures below for your server’s operating system.
The information in this article only applies to the products listed in the Article Details sidebar. You must have root access to the server to follow the procedures described below.Table of Contents
- CentOS and Fedora
- Debian and Ubuntu
- Other Linux distributions
CentOS and Fedora
To download and install the latest updates immediately, type the following command as the root user:
Copyyum update
The previous command runs in interactive mode, which means you are asked at certain points during the update process whether or not you want to continue. To install updates without any user intervention, type the following command instead:
Copyyum -y update
You can add this command to a cron job to automatically update your server at specific intervals.
Debian and Ubuntu
To search the repositories for updates and then install them immediately, type the following command as the root user:
Copyapt-get update && apt-get upgrade
The previous command runs in interactive mode, which means you are asked at certain points during the update process whether or not you want to continue. To install updates without any user intervention, type the following command instead:
Copyapt-get -y update && apt-get -y upgrade
You can add this command to a cron job to automatically update your server at specific intervals.
Other Linux distributions
For other Linux distributions, consult its documentation for the steps to install updates.