Artigos‎ > ‎Instalação do Sistema‎ > ‎Aptitude‎ > ‎

Debian Releases


Primeiramente gostaria de salientar que não sou o autor principal do conteúdo deste artigo. A minha intenção é de mostrar o que outros autores tem realizado (referenciando links para o conteúdo original) neste blog até como um guia pessoal para uso próprio e ainda compartilhar minhas anotações e pequenas modificações que realizo no conteúdo, desejando que possa ajudar mais alguém em algum lugar.
First and foremost, I take no credit for any of this post’s content. I am really just taking what others have done (which I have links to bellow) and am putting it on my blog for a personal reference and hopefully the small changes that I made to their guides will help someone somewhere.

link: http://jaqque.sbih.org/kplug/apt-pinning.html
link: https://wiki.debian.org/pt_BR/AptConf

Alguns exemplos para configuração do Debian apt

nano /etc/apt/sources.list


#Stable 
deb http://ftp.br.debian.org/debian/ stable main non-free contrib

#stable-updates
#deb http://ftp.br.debian.org/debian/ stable-updates main non-free contrib

#Testing 
#deb http://ftp.br.debian.org/debian/ testing main non-free contrib

#testing-updates
#deb http://ftp.br.debian.org/debian/ testing-updates main non-free contrib

#testing-proposed-updates
#deb http://ftp.br.debian.org/debian/ testing-proposed-updates main non-free contrib

#Unstable 
#deb http://ftp.br.debian.org/debian/ unstable main non-free contrib

#Experimental
#deb http://ftp.br.debian.org/debian/ experimental main non-free contrib



nano /etc/apt/sources.list.d/crosstools.list
deb http://emdebian.org/tools/debian/ unstable main

curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -


nano /etc/apt/preferences.d/main

Package: * 
Pin: release a=stable 
Pin-Priority: 1100

Package: *
Pin: release a=stable-updates
Pin-Priority: 600

Package: * 
Pin: release a=testing 
Pin-Priority: 400

Package: * 
Pin: release a=testing-updates
Pin-Priority: 300

Package: * 
Pin: release a=testing-proposed-updates
Pin-Priority: 200

Package: * 
Pin: release a=unstable 
Pin-Priority: 100

Package: * 
Pin: release a=experimental 
Pin-Priority: 50

nano /etc/apt/apt.conf.d/20defaultrelease
APT::Default-Release "stable"; 


nano /etc/apt/apt.conf.d/70debconf
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
Apt::Get::Purge; 
Acquire::http::Timeout "2"; 
Acquire::ftp::Timeout "2";


nano /etc/apt/apt.conf.d/20archive
APT::Archives::MaxAge "30";
APT::Archives::MinAge "7";
APT::Archives::MaxSize "500";
//APT::Cache-Limit "25165824";



nano /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "7";
APT::Periodic::AutocleanInterval "1";
APT::Periodic::Unattended-Upgrade "1";



Uma outra abordagem mais atual:

Crie os seguintes arquivos em:
/etc/apt/preferences.d

nano /etc/apt/preferences.d/security.pref
Package: * 
Pin: release l=Debian-Security 
Pin-Priority: 1000 

nano /etc/apt/preferences.d/stable.pref
Package: * 
Pin: release a=stable 
Pin-Priority: 900

nano /etc/apt/preferences.d/testing.pref
Package: * 
Pin: release a=testing 
Pin-Priority: 750

nano /etc/apt/preferences.d/unstable.pref:
Package: * 
Pin: release a=unstable 
Pin-Priority: 50

nano /etc/apt/preferences.d/experimental.pref
Package: * 
Pin: release a=experimental 
Pin-Priority: 1

nano /etc/apt/preferences.d/oldstable.pref
Package: * 
Pin: release a=oldstable 
Pin-Priority: 1

Crie os seguintes arquivos em:
/etc/apt/sources.list.d

nano /etc/apt/sources.list.d/security.list
deb http://security.debian.org/ stable/updates main contrib non-free 
deb http://security.debian.org/ testing/updates main contrib non-free

nano /etc/apt/sources.list.d/stable.list
deb http://sft.if.usp.br/debian/ stable main contrib non-free 
deb-src http://sft.if.usp.br/debian/ stable main contrib non-free 
deb http://ftp.br.debian.org/debian/ stable main contrib non-free 
deb-src http://ftp.br.debian.org/debian/  stable main contrib non-free

nano /etc/apt/sources.list.d/testing.list
deb http://sft.if.usp.br/debian/ testing main contrib non-free 
deb-src http://sft.if.usp.br/debian/ testing main contrib non-free 
deb http://ftp.br.debian.org/debian/ testing main contrib non-free 
deb-src http://ftp.br.debian.org/debian/ testing main contrib non-free 

nano /etc/apt/sources.list.d/unstable.list
deb http://sft.if.usp.br/debian/ unstable main contrib non-free 
deb-src http://sft.if.usp.br/debian/ unstable main contrib non-free 
deb http://ftp.br.debian.org/debian/  unstable main contrib non-free 
deb-src http://ftp.br.debian.org/debian/  unstable main contrib non-free 

nano /etc/apt/sources.list.d/experimental.list
deb http://sft.if.usp.br/debian/ experimental main contrib non-free 
deb-src http://sft.if.usp.br/debian/ experimental main contrib non-free 
deb http://ftp.br.debian.org/debian/  experimental main contrib non-free 
deb-src http://ftp.br.debian.org/debian/ experimental main contrib non-free 

nano /etc/apt/sources.list.d/oldstable.list
deb http://sft.if.usp.br/debian/ oldstable main contrib non-free 
deb-src http://sft.if.usp.br/debian/ oldstable main contrib non-free 
deb http://ftp.br.debian.org/debian/ oldstable main contrib non-free 
deb-src http://ftp.br.debian.org/debian/ oldstable main contrib non-free

Voce pode trocar o mirror por um mais rapido usando o comando:
apt-get install netselect-apt
netselect-apt




Comments