Applications (installing and using)

Keeping your server up to date.

Manual Updates

To manually update your system, do the following from the command line:

#install new updates
[root@server ~]# apt-get update
[root@server ~]# apt-get upgrade

Automatic Updates

Modern installs can have over a thousand packages installed, which can be hard to track by hand, often some automation is helpful

As I mentioned, it's best to stay on top of updates as frequently as possible.  One way to do this is to configure your system to automatically update itself via a cron job.

Place the following in a file called 'apt-upgrade' located in /etc/cron.daily

#!/bin/bash
apt-get update
apt-get -y upgrade > /var/log/apt-upgrade.log

Change the permissions to make it executable:

[root@server ~]# chmod +x /etc/cron.daily/apt-upgrade

This will automatically run each day and log any automatic upgrades in a log file so you can inspect it at a later date to see what was done.

There are a few tools available in some distros which will take care of the above, and some include email notifications as well. For example check out apticron