Ubuntu/Ubuntuサーバーで自動アップデートを有効・無効にする方法
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* 追記 [#b47421f7]
&color(red){''Ubuntu18.04, Ubuntu16.04の自動アップデート...
-[[Ubuntu18.04,Ubuntu16.04の自動アップデートを有効・無効...
* Ubuntuサーバーで自動アップデートを有効・無効にする方法 ...
Ubuntu Serverをインストールした時、自動アップデートの有効...
本記事は自動アップデートの設置方法を記しています。~
使用したUbuntuサーバーは12.04になります。
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* unattended-upgradesパッケージ [#e168e47c]
unattended-upgradesがインストールされているか確認します。~
以下、dpkgコマンドでインストールされているか確認した時の...
sakura@ubuntu:~$ dpkg -l | grep unattended
ii unattended-upgrades 0.76ubuntu1 ...
インストールされていれば、自動アップデートが有効になって...
unattended-upgradesは以下のコマンドでインストールすること...
apt-get install unattended-upgrades
* 自動アップデートの設定ファイルの在処 [#le429e8b]
自動アップデートの設定ファイルは以下の場所にあります。
/etc/apt/apt.conf.d/50unattended-upgrades
以下、catで設定ファイルを出力しました。~
内容を確認するとわかるのように、以下の設定が有効になって...
"${distro_id}:${distro_codename}-security";
また、アップデートしたくないパッケージは以下の場所以降に...
Unattended-Upgrade::Package-Blacklist
アップデートによるメール送信も設定できます。
Unattended-Upgrade::Mail "root@localhost";
-''/etc/apt/apt.conf.d/50unattended-upgrades''
sakura@ubuntu:~$ cat /etc/apt/apt.conf.d/50unattended-up...
// Automatically upgrade packages from these (origin:arc...
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// This option allows you to control if on a unclean dpk...
// unattended-upgrades will automatically run
// dpkg --force-confold --configure -a
// The default is true, to ensure updates keep getting i...
//Unattended-Upgrade::AutoFixInterruptedDpkg "false";
// Split the upgrade into the smallest possible chunks s...
// they can be interrupted with SIGUSR1. This makes the ...
// a bit slower but it has the benefit that shutdown whi...
// is running is possible (with a small delay)
//Unattended-Upgrade::MinimalSteps "true";
// Install all unattended-upgrades when the machine is s...
// instead of doing it in the background while the machi...
// This will (obviously) make shutdown slower
//Unattended-Upgrade::InstallOnShutdown "true";
// Send email to this address for problems or packages u...
// If empty or unset then no email is sent, make sure th...
// have a working mail setup on your system. A package t...
// 'mailx' must be installed.
//Unattended-Upgrade::Mail "root@localhost";
// Set this value to "true" to get emails only on errors...
// is to always send a mail if Unattended-Upgrade::Mail ...
//Unattended-Upgrade::MailOnlyOnError "true";
// Do automatic removal of new unused dependencies after...
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the ...
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits ...
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
以上、Ubuntuサーバーで自動アップデートを有効・無効にする...
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
終了行:
#navi(../)
* 追記 [#b47421f7]
&color(red){''Ubuntu18.04, Ubuntu16.04の自動アップデート...
-[[Ubuntu18.04,Ubuntu16.04の自動アップデートを有効・無効...
* Ubuntuサーバーで自動アップデートを有効・無効にする方法 ...
Ubuntu Serverをインストールした時、自動アップデートの有効...
本記事は自動アップデートの設置方法を記しています。~
使用したUbuntuサーバーは12.04になります。
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* unattended-upgradesパッケージ [#e168e47c]
unattended-upgradesがインストールされているか確認します。~
以下、dpkgコマンドでインストールされているか確認した時の...
sakura@ubuntu:~$ dpkg -l | grep unattended
ii unattended-upgrades 0.76ubuntu1 ...
インストールされていれば、自動アップデートが有効になって...
unattended-upgradesは以下のコマンドでインストールすること...
apt-get install unattended-upgrades
* 自動アップデートの設定ファイルの在処 [#le429e8b]
自動アップデートの設定ファイルは以下の場所にあります。
/etc/apt/apt.conf.d/50unattended-upgrades
以下、catで設定ファイルを出力しました。~
内容を確認するとわかるのように、以下の設定が有効になって...
"${distro_id}:${distro_codename}-security";
また、アップデートしたくないパッケージは以下の場所以降に...
Unattended-Upgrade::Package-Blacklist
アップデートによるメール送信も設定できます。
Unattended-Upgrade::Mail "root@localhost";
-''/etc/apt/apt.conf.d/50unattended-upgrades''
sakura@ubuntu:~$ cat /etc/apt/apt.conf.d/50unattended-up...
// Automatically upgrade packages from these (origin:arc...
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// This option allows you to control if on a unclean dpk...
// unattended-upgrades will automatically run
// dpkg --force-confold --configure -a
// The default is true, to ensure updates keep getting i...
//Unattended-Upgrade::AutoFixInterruptedDpkg "false";
// Split the upgrade into the smallest possible chunks s...
// they can be interrupted with SIGUSR1. This makes the ...
// a bit slower but it has the benefit that shutdown whi...
// is running is possible (with a small delay)
//Unattended-Upgrade::MinimalSteps "true";
// Install all unattended-upgrades when the machine is s...
// instead of doing it in the background while the machi...
// This will (obviously) make shutdown slower
//Unattended-Upgrade::InstallOnShutdown "true";
// Send email to this address for problems or packages u...
// If empty or unset then no email is sent, make sure th...
// have a working mail setup on your system. A package t...
// 'mailx' must be installed.
//Unattended-Upgrade::Mail "root@localhost";
// Set this value to "true" to get emails only on errors...
// is to always send a mail if Unattended-Upgrade::Mail ...
//Unattended-Upgrade::MailOnlyOnError "true";
// Do automatic removal of new unused dependencies after...
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the ...
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits ...
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
以上、Ubuntuサーバーで自動アップデートを有効・無効にする...
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
ページ名: