Usual disclaimer
This article is provided as it and no responsibility will be taken for things going wrong. Tested on Ubuntu 8.10 server.
Using Aptitude
If you’ve ever tried out Ubuntu you’ll probably know what aptitude is and how to manage packages. Updating your system is as simple as
1
| |
This updates the package lists and presents any upgrades.
Automating the process
Wouldn’t it be easier if you could automate this and forget about it? That way your server can stay up to date without you ever having to worry about it.
Create a file called autoupdate.sh and put the following into it:1 2 3 4 5 6 7 8 9 10 11 | |
To run this script daily move it to /etc/cron.daily (making sure it is executable).
1 2 3 | |
The update will run automatically once a day ensuring you stay up-to-date.
Checking logs
You can keep a check on packages that have been installed and removed via the log file that Aptitude generates.
1
| |
If you want to check that an upgrade has been applied you can search for it like this
1
| |
Or you can check the currently installed version using (this example is php5)
1
| |