“UbuntuHelp:AutomaticSecurityUpdates”的版本间的差异
来自Ubuntu中文
小 (New page: {{From|https://help.ubuntu.com/community/AutomaticSecurityUpdates}} {{Languages|php5}} === Information === This is a simple instructional that will teach you to create a script/cron job to...) |
小 |
||
第13行: | 第13行: | ||
aptitude upgrade -o Aptitude::Delete-Unused=false --assume-yes --target-release dapper-security >> /var/log/apt-security-updates | aptitude upgrade -o Aptitude::Delete-Unused=false --assume-yes --target-release dapper-security >> /var/log/apt-security-updates | ||
echo "Security updates (if any) installed" | echo "Security updates (if any) installed" | ||
− | </nowiki></ | + | </nowiki></pre> |
Depending on your Ubuntu release, replace "dapper" with your release, for example "edgy". | Depending on your Ubuntu release, replace "dapper" with your release, for example "edgy". | ||
第19行: | 第19行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo chmod u=rwx,g=rx,o=rx /etc/cron.weekly/apt-security-updates | sudo chmod u=rwx,g=rx,o=rx /etc/cron.weekly/apt-security-updates | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Post Install/Setup/Execution Information === | === Post Install/Setup/Execution Information === |
2007年5月13日 (日) 12:43的版本
Information
This is a simple instructional that will teach you to create a script/cron job to go out and locate security updates and install them automatically in the background. There is always some security risks involved in running software upgrades without supervision, but if you consider those irrelevant for you, then you could follow this simple tutorial.
Instructions
Create a new file by using your favorite text editor. For Ubuntu/Gnome users you can use gedit, and for Kubuntu/KDE users you can use Kate. Also available via the command line are various other text editors that you can use. The file you create, name it ~-apt-security-updates-~ and place it in the directory ~-/etc/cron.weekly/-~. Enter the following text into the ~-apt-security-updates-~ files:
#! /bin/sh echo "**************" >> /var/log/apt-security-updates date >> /var/log/apt-security-updates aptitude update >> /var/log/apt-security-updates aptitude upgrade -o Aptitude::Delete-Unused=false --assume-yes --target-release dapper-security >> /var/log/apt-security-updates echo "Security updates (if any) installed"
Depending on your Ubuntu release, replace "dapper" with your release, for example "edgy".
Once you are complete, you want to make the file executable for root. So via the command line/terminal type the following line:
sudo chmod u=rwx,g=rx,o=rx /etc/cron.weekly/apt-security-updates
Post Install/Setup/Execution Information
This script will run weekly and it installs all available packages from the security repository. It also generates a log in ~-/var/log/apt-security-updates-~ for later inspection in case something goes wrong.
CategorySecurity CategoryCleanup