Previous Section  < Day Day Up >  Next Section

Recipe 3.2. Getting Software for a Debian System

3.2.1 Problem

You need some software for your Debian system. There are gigabytes of software out there, waiting for you—but where do you find software that's packaged for Debian? How do you decide which software archives to use?

3.2.2 Solution

Debian packages come from official Debian package repositories, unofficial repositories, and CD-ROMs. You must specify these sources in /etc/apt/sources.list, then use Debian's packaging tools to install software from these sources.

Visit these sites to find the addresses for download sites:


Official Debian mirror

http://www.debian.org/mirror/


Unofficial APT repositories

http://www.apt-get.org

Visit this site for a worldwide list of CD vendors:


Vendors of Debian CDs

http://www.debian.org/CD/vendors/

Use the Debian package search page to find individual packages:


Debian packages search page and information

http://www.debian.org/distrib/packages/

The next step is to edit /etc/apt/sources.list with your selected sources. See the Discussion for some sample configurations.

3.2.3 Discussion

Here are three sources.list examples. Run apt-get update every time you change sources.list, and run it periodically to keep your package lists up-to-date.

sources.list for Woody:

# See sources.list(5) for more information

# Remember that you can only use http, ftp, or file URIs

# CD-ROMs are managed through the apt-cdrom tool.

deb http://http.us.debian.org/debian stable main contrib non-free

deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

deb http://security.debian.org stable/updates main contrib non-free

# Uncomment if you want the apt-get source function to work

#deb-src http://http.us.debian.org/debian stable main contrib non-free

#deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

sources.list for Sarge:

deb http://http.us.debian.org/debian testing main contrib non-free

deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

deb http://security.debian.org testing/updates main contrib non-free

# Uncomment if you want the apt-get source function to work

#deb-src http://http.us.debian.org/debian testing main contrib non-free

#deb-src http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

sources.list for Sid:

deb ftp://ftp.us.debian.org/debian unstable main contrib non-free

deb ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

# Sources

deb-src ftp://ftp.us.debian.org/debian unstable main contrib non-free

deb-src ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

apt-get always takes the newest package version, if it finds multiple sources. List your sources in order of preference, because apt-get starts at the top and works its way down.

Editing your sources.list a lot is perfectly acceptable, and it's a simple way to control installations. Put in all the lines you think you might ever want to use, and comment out the lines that are unneeded for specific installations.

A nice thing to do is to select official Debian mirrors for your sources.list, to take the load off the servers at Debian.org. A complete list of the official mirrors is at http://www.debian.org/mirror/.

Security updates are available only from http://www.debian.org/security/. Security updates are not mirrored. See the appropiate sources.list above to get the correct lines for Stable and Testing. And remember while that Stable receives swift, timely security updates, they are issued much more slowly for Testing and Unstable.


3.2.4 See Also

    Previous Section  < Day Day Up >  Next Section