Configuring apt repositories in debian

From Notes_Wiki

Home > Debian > Configuring apt-repositories

One can use apt to install packages in debian (similar to yum in Cent-OS). To configure repositories for apt use following steps:

  • Visit http://wiki.debian.org/DebianReleases to find out about latest stable release of debian. Please note that unlike many other distributions in debian we can configure newer version of repository for older version of server. For example if installed version of OS is 5.0 (Lenny), we can configure repository for 6.0 (Squeeze) and it still works properly.
  • Choose debian mirror to use from http://www.debian.org/distrib/ftplist
  • Configure apt sources by editing file '/etc/apt/sources.list' and adding line, similar to
deb http://ftp.cn.debian.org/debian/ squeeze main contrib non-free

after replacing mirror URL appropriately

  • Configure proxy using "export http_proxy='http://<proxy_server>_<proxy_port>'", if necessary
  • Use 'apt-get update' to update local information on packages
  • Use 'apt-get install <package-name>' to install desired package.


Home > Debian > Configuring apt-repositories