Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What's the best way to automatically apply security updates? Or any updates for that matter?

share|improve this question
1  
There is a package called unattended-upgrades which by default applies security updates automatically, I think it can also do any kind of updates with the right configuration (as long as the package does not need the user to configure anything upon an upgrade). –  Graham Edgecombe Oct 18 '10 at 19:08
add comment

2 Answers 2

up vote 2 down vote accepted

This answer to the desktop upgrade question will apply to servers.

share|improve this answer
add comment

Note that some updates (on a server, it tends to be most updates, from personal experience) require restarting one or more services, or even rebooting the entire server, to take effect. Restarting services, much less rebooting, isn't really a task I feel comfortable automating.

I use cron-apt on my server to automate downloading, but not installing, updates. It does it once a day rather than running as a daemon. It emails me when there are updates waiting to install.

When I receive such an email, I log in when it is convenient and install the updates, then restart whatever services need restarting.

It's not usually obvious which services need to be restarted. For example, an update to libssl usually requires restarting just about every web, mail, SSH etc service there is. Or an update to libpng might require restarting Apache because PHP links to it.

So I use checkrestart to check which services should be restarted after each update. This is provided by the debian-goodies package.

I also know that if the kernel is updated, I always need to reboot.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.