“UbuntuHelp:AutomaticSecurityUpdates”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/AutomaticSecurityUpdates}} | {{From|https://help.ubuntu.com/community/AutomaticSecurityUpdates}} | ||
− | {{Languages| | + | {{Languages|UbuntuHelp:AutomaticSecurityUpdates}} |
=== Information === | === 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. | 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. | ||
第7行: | 第7行: | ||
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: | 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: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | |||
echo "**************" >> /var/log/apt-security-updates | echo "**************" >> /var/log/apt-security-updates | ||
date >> /var/log/apt-security-updates | date >> /var/log/apt-security-updates | ||
第25行: | 第24行: | ||
---- | ---- | ||
− | CategorySecurity CategoryCleanup | + | [[category:CategorySecurity]] [[category:CategoryCleanup]] |
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年5月14日 (一) 11:14的版本
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:
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.