Linux/apt: Difference between revisions
< Linux
(Die Seite wurde neu angelegt: „== unattended upgrades == <pre> apt install unattended-upgrades dpkg-reconfigure --priority=low unattended-upgrades </pre> Category:Linux/System Categ…“) |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
</pre> | </pre> | ||
* /etc/apt/apt.conf.d/50unattended-upgrades | |||
<pre> | |||
# Ubuntu | |||
Unattended-Upgrade::Allowed-Origins { | |||
"Docker:${distro_codename}"; | |||
} | |||
or | |||
# Debian | |||
Unattended-Upgrade::Origins-Pattern { | |||
"origin=Docker,label=Docker CE"; | |||
"origin=Proxmox,label=Proxmox Debian Repository"; | |||
} | |||
</pre> | |||
** <code> | |||
* /etc/apt/apt.conf.d/ | |||
* manually run/test unattended upgrades | |||
<code>sudo unattended-upgrade -d</code> | |||
== Find package for file == | |||
<pre>dpkg -S /bin/ls</pre> | |||
== compare mirrors == | |||
<pre> | |||
http://mirrors.ubuntu.com/DE.txt | |||
curl -s http://mirrors.ubuntu.com/DE.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-1024000 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' |sort -gr | |||
</pre> | |||
== apt cacher with docker == | |||
* docker-compose.yml | |||
<pre> | |||
version: '3' | |||
services: | |||
aptcacher: | |||
image: sameersbn/apt-cacher-ng | |||
restart: always | |||
container_name: aptcacher | |||
ports: | |||
- "3142:3142" | |||
volumes: | |||
- /srv/docker-data/aptcacher:/var/cache/apt-cacher-ng | |||
</pre> | |||
* add proxxy to apt | |||
<pre> | |||
touch /etc/apt/apt.conf.d/00aptproxy | |||
echo 'Acquire::http::Proxy "http://192.168.111.11:3142";' > /etc/apt/apt.conf.d/00aptproxy | |||
</pre> | |||
[[Category:Linux/System]] | [[Category:Linux/System]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 10:51, 9 November 2024
unattended upgrades
apt install unattended-upgrades dpkg-reconfigure --priority=low unattended-upgrades
- /etc/apt/apt.conf.d/50unattended-upgrades
# Ubuntu Unattended-Upgrade::Allowed-Origins { "Docker:${distro_codename}"; } or # Debian Unattended-Upgrade::Origins-Pattern { "origin=Docker,label=Docker CE"; "origin=Proxmox,label=Proxmox Debian Repository"; }
- /etc/apt/apt.conf.d/
- manually run/test unattended upgrades
sudo unattended-upgrade -d
Find package for file
dpkg -S /bin/ls
compare mirrors
http://mirrors.ubuntu.com/DE.txt
curl -s http://mirrors.ubuntu.com/DE.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-1024000 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' |sort -gr
apt cacher with docker
- docker-compose.yml
version: '3'
services:
aptcacher:
image: sameersbn/apt-cacher-ng
restart: always
container_name: aptcacher
ports:
- "3142:3142"
volumes:
- /srv/docker-data/aptcacher:/var/cache/apt-cacher-ng
- add proxxy to apt
touch /etc/apt/apt.conf.d/00aptproxy
echo 'Acquire::http::Proxy "http://192.168.111.11:3142";' > /etc/apt/apt.conf.d/00aptproxy