Ferramentas de Usuário

Ferramentas de Site


en:squeeze:config:software:repositories

2.2.3 Software Repositories

Objectives

In addition to the main repository, Debian also provides a contrib and a non-free repositories. These are note set up during the installation, mainly because of licensing reasons, but they can be added at any time:

Repository list

To make future installation easier, the contrib and non-free repositories should be added to the list of available repositories. And because we will not compile packages from the sources, these references (deb-src) can be deactivated (commented):

The list of available repositories is stored in the configuration file /etc/apt/sources.list:

/etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official amd64 NETINST Binary-1 20110205-14:31]/ squeeze main

#deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official amd64 NETINST Binary-1 20110205-14:31]/ squeeze main

deb http://ftp.pt.debian.org/debian/ squeeze main contrib non-free
#deb-src http://ftp.pt.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main contrib non-free
#deb-src http://security.debian.org/ squeeze/updates main

deb http://ftp.pt.debian.org/debian/ squeeze-updates main contrib non-free
#deb-src http://ftp.pt.debian.org/debian/ squeeze-updates main

Update the local package database with the new sources:

root@server:~# aptitude update
Hit http://ftp.pt.debian.org squeeze Release.gpg
Ign http://ftp.pt.debian.org/debian/ squeeze/contrib Translation-en
Ign http://ftp.pt.debian.org/debian/ squeeze/contrib Translation-en_US
Ign http://ftp.pt.debian.org/debian/ squeeze/main Translation-en
Ign http://ftp.pt.debian.org/debian/ squeeze/main Translation-en_US
Ign http://ftp.pt.debian.org/debian/ squeeze/non-free Translation-en
Ign http://ftp.pt.debian.org/debian/ squeeze/non-free Translation-en_US
Hit http://ftp.pt.debian.org squeeze-updates Release.gpg
Ign http://ftp.pt.debian.org/debian/ squeeze-updates/contrib Translation-en
Ign http://ftp.pt.debian.org/debian/ squeeze-updates/contrib Translation-en_US
Ign http://ftp.pt.debian.org/debian/ squeeze-updates/main Translation-en
Ign http://ftp.pt.debian.org/debian/ squeeze-updates/main Translation-en_US
Ign http://ftp.pt.debian.org/debian/ squeeze-updates/non-free Translation-en
Ign http://ftp.pt.debian.org/debian/ squeeze-updates/non-free Translation-en_US
Hit http://ftp.pt.debian.org squeeze Release
Hit http://ftp.pt.debian.org squeeze-updates Release
Hit http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en_US
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_US
Hit http://ftp.pt.debian.org squeeze/main amd64 Packages
Hit http://security.debian.org squeeze/updates Release
Get:1 http://ftp.pt.debian.org squeeze/contrib amd64 Packages [64.1 kB]
Hit http://security.debian.org squeeze/updates/main amd64 Packages
Get:2 http://ftp.pt.debian.org squeeze/non-free amd64 Packages [124 kB]
Get:3 http://security.debian.org squeeze/updates/contrib amd64 Packages [20 B]
Get:4 http://security.debian.org squeeze/updates/non-free amd64 Packages [20 B]
Hit http://ftp.pt.debian.org squeeze-updates/main amd64 Packages
Get:5 http://ftp.pt.debian.org squeeze-updates/contrib amd64 Packages [20 B]
Get:6 http://ftp.pt.debian.org squeeze-updates/non-free amd64 Packages [20 B]
Fetched 188 kB in 0s (252 kB/s)

Current status: 566 new [+566].

Using a proxy

In some cases, Internet must pass through proxy. apt and aptitude can be configured to use a proxy in two ways:

  • Temporarily, by setting an environment variable http_proxy or ftp_poxy with the proxy's URL:
root@server:~# export http_proxy="http://proxy.example.com:3128/"

O aptitude terá em conta esta variável quando se ligar à Internet.

  • Permanently, by changing the apt configuration in the /etc/apt/apt.conf configuration file:
/etc/apt/apt.conf
Acquire::http::Proxy "http://proxy.example.com:3128/";

The syntacx of the http_proxy is “http://[[user][:pass]@]xxx.xxx.xxx.xxx[:port]/”, where:

  • user:pass : username and password, in case proxy needs authentication and/or authorization;
  • xxx.xxx.xxx.xxx : the address of the proxy server;
  • port : the proxy's port number;

References

en/squeeze/config/software/repositories.txt · Última modificação em: 2024-02-15 01:05 por 127.0.0.1