Friday, April 9, 2010

Ubuntu Apt Update With Cron-Apt On Ubuntu

I'm using cron-apt to do automatic apt update on my server. These are very simple steps on how to do it

1. Installing Cron-Apt from repository
# sudo apt-get install cron-apt
2. Edit config file
# sudo vi /etc/cron-apt/config
LOG="/var/log/cron-apt/log"
MAIL="/var/log/cron-apt/mail"
MAILON="always"
3. Make the cron-apt run on 8 am everyday
# sudo vi /etc/cron.d/cron-apt
0 8 * * * root test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt
Please notice that this cron-apt is not running apt-get upgrade. But I'd prefer that way, so I can examine the available updates and choose when to run it. You can execute it using this command:
# sudo apt-get dist-upgrade

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)