Difference between revisions of "Apt"
(Created page with "{{WIP}} == Configure == === sources.list === Here is the <code>/etc/apt/sources.list</code> for a Debian Jessie distribution. The file is referencing versions names instea...") |
(Add link to instal mail server) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
== Configure == | == Configure == | ||
Line 47: | Line 45: | ||
After a successful upgrade, needrestart will check if any daemon need to be restarted. If so, it will show a dialog where you can choose which ones should be restarted automatically. | After a successful upgrade, needrestart will check if any daemon need to be restarted. If so, it will show a dialog where you can choose which ones should be restarted automatically. | ||
− | It will also warn you in case the system need to be restarted.<syntaxhighlight lang="console"> | + | It will also warn you in case the system need to be restarted. |
+ | <syntaxhighlight lang="console"> | ||
# apt install needrestart | # apt install needrestart | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== reboot-notifier === | === reboot-notifier === | ||
− | Sends you a daily email in case your server need to be restarted<syntaxhighlight lang="console"> | + | Sends you a daily email in case your server need to be restarted |
+ | |||
+ | '''Important:''' Your server needs be able to [[Emails|send Emails]] before you install this. | ||
+ | |||
+ | <syntaxhighlight lang="console"> | ||
# apt install reboot-notifier | # apt install reboot-notifier | ||
− | </syntaxhighlight>You can configure the destination email address in <code>/etc/default/reboot-notifier</code>. | + | </syntaxhighlight> |
+ | You can configure the destination email address in <code>/etc/default/reboot-notifier</code>. | ||
=== apt-listchanges === | === apt-listchanges === | ||
Line 62: | Line 66: | ||
=== apticron === | === apticron === | ||
− | Apticron will check for updates and send you emails with changelogs<syntaxhighlight lang="console"> | + | Apticron will check for updates and send you emails with changelogs |
+ | |||
+ | '''Important:''' Your server needs be able to [[Emails|send Emails]] before you install this. | ||
+ | |||
+ | <syntaxhighlight lang="console"> | ||
# apt install apticron | # apt install apticron | ||
− | </syntaxhighlight>To configure apticron, edit /etc/apticron/apticron.conf and changes the following settings<syntaxhighlight lang="ini"> | + | </syntaxhighlight> |
+ | To configure apticron, edit <code>/etc/apticron/apticron.conf</code> and changes the following settings<syntaxhighlight lang="ini"> | ||
EMAIL="youremail@example.org" | EMAIL="youremail@example.org" | ||
NOTIFY_HOLDS="0" | NOTIFY_HOLDS="0" |
Revision as of 07:37, 6 March 2016
Configure
sources.list
Here is the /etc/apt/sources.list
for a Debian Jessie distribution.
The file is referencing versions names instead of the stable and testing aliases. The reason is that we don't want a massive uncontrolled upgrade on the day of the release of the next stable.
deb http://httpredir.debian.org/debian jessie main contrib non-free
deb-src http://httpredir.debian.org/debian jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://httpredir.debian.org/debian jessie-updates main contrib non-free
deb-src http://httpredir.debian.org/debian jessie-updates main contrib non-free
deb http://httpredir.debian.org/debian jessie-backports main contrib non-free
deb-src http://httpredir.debian.org/debian jessie-backports main contrib non-free
# testing
deb http://httpredir.debian.org/debian stretch main contrib non-free
deb-src http://httpredir.debian.org/debian stretch main contrib non-free
apt.conf
The file /etc/apt/apt.conf
stores settings of apt. You can create the file if it doesn't exist.
APT::Default-Release "jessie";
APT::Cache-Limit "100000000";
aptitude "";
aptitude::Keep-Unused-Pattern "";
aptitude::Delete-Unused-Pattern "";
aptitude::UI "";
aptitude::UI::Menubar-Autohide "true";
aptitude::UI::Minibuf-Download-Bar "false";
aptitude::UI::InfoAreaTabs "true";
aptitude::UI::Package-Header-Format "%N %n #%B %u %o";
aptitude::UI::Package-Status-Format "%d #%D %I";
aptitude::UI::Package-Display-Format "%c%a%M%S %p #%t %Z %r %D %v %V";
Tools
needrestart
After a successful upgrade, needrestart will check if any daemon need to be restarted. If so, it will show a dialog where you can choose which ones should be restarted automatically.
It will also warn you in case the system need to be restarted.
# apt install needrestart
reboot-notifier
Sends you a daily email in case your server need to be restarted
Important: Your server needs be able to send Emails before you install this.
# apt install reboot-notifier
You can configure the destination email address in /etc/default/reboot-notifier
.
apt-listchanges
Parse changelogs when you upgrade a package and display it. It will also send a copy by email so you can have a look latter in case you missed something.
# apt install apt-listchanges
apticron
Apticron will check for updates and send you emails with changelogs
Important: Your server needs be able to send Emails before you install this.
# apt install apticron
To configure apticron, edit /etc/apticron/apticron.conf
and changes the following settings
EMAIL="youremail@example.org"
NOTIFY_HOLDS="0"
NOTIFY_NEW="0"