Debian Sarge: APT Setup & HowTo

Want to support HowtoForge? Become a subscriber!
 
Submitted by papa (Contact Author) (Forums) on Wed, 2005-12-14 17:41. :: Debian

Debian Sarge: APT Setup & HowTo

Version 1.0
Author: L.P.H. van Belle < thcnbl [at] rushcompany [dot] com >
Last edited: 12/06/2005

Preparing apt for online packages.

After installing from CD or DVD adjust your apt config.

This setup makes sure your are using stable packages, that you are using Debian Sarge.

In the /etc/apt/apt.conf we defined the default release of Debian, in this case stable (Sarge 3.1r0).
The
Show-Upgraded "true" is used for showing us the packages which are going to be installed, I like to see what I’m installing.

The /etc/apt/sources.list: if you used a CD/DVD for installing you can leave this line in the sources.list. This can save you bandwidth. My server is on a remote location and I don’t use the cd anymore.
I added the ClamAV as stable because I want a new ClamAV for virus scanning
More info: http://www.clamav.net/binary.html

The testing and unstable sources are also unmarked, that if you really need a newer version of a program then you can try to create it from Debian source.

You can get the source install programs and search by using the following commands:

apt-get install package = get & install package
apt-get remove package = remove package
apt-get remove --purge package = remove and purge all files of package
dpkg --purge package = purge all files of package

apt-cache search package = search for package or part of package name
apt-cache show package = get info over package
dpkg-reconfigure -plow package = reconfigure with priority low (most options)

For this first cd /usr/src.
apt-get source package = get source files of packaged

Files from /etc/apt:

/etc/apt/apt.conf:

APT::Default-Release "stable";
APT::Get::Show-Upgraded "true";
// 16 MB Limit
APT::Cache-limit 16777216;
// if you have /tmp with no mounted with noexec, you need this.
#DPkg::Pre-Install-Pkgs {"mount -o remount,exec /tmp";};
#DPkg::Post-Invoke {"mount -o remount /tmp";};

/etc/apt/preferences:

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

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

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

Package: *
Pin: release a=sarge,l=debian-volatile
Pin-Priority: 990

/etc/apt/sources.list:

# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
#-----------------------------------------------------------------
# We definect the PIN which sets the prioratie of packages selects
# see also the apt-howto
# http://www.debian.org/doc/manuals/apt-howto/index.en.html
# and a nice howto for apt-pinning for beginners.
# http://jaqque.sbih.org/kplug/apt-pinning.html
#-----------------------------------------------------------------
#-----------------------------------------------------------------
# Stable PIN 990 PRODUCTION TREE
deb ftp://ftp.nl.debian.org/debian stable main contrib non-free
deb-src ftp://ftp.nl.debian.org/debian stable main contrib non-free
deb http://http.us.debian.org/debian stable main contrib non-free
# Stable Security updates
deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://security.debian.org/ stable/updates main contrib non-free
#------------------------------------------------------------------
## Debian VOLATILE , used for clamav PINNED 990
deb http://ftp.nl.debian.org/debian-volatile sarge/volatile main
#-----------------------------------------------------------------
#-----------------------------------------------------------------
# WARNING USE BELOW AT OWN RISK
# Testing ( PIN 500 )
#deb ftp://ftp.nl.debian.org/debian testing main contrib non-free
#deb-src ftp://ftp.nl.debian.org/debian testing main contrib non-free
#deb http://http.us.debian.org/debian testing main contrib non-free
# Testing Security updates
#deb http://security.debian.org/ testing/updates main contrib non-free
#deb-src http://security.debian.org/ testing/updates main contrib non-free
#-----------------------------------------------------------------
#-----------------------------------------------------------------
# WARNING USE BELOW AT OWN RISK
# Unstable ( PIN 050 )
#deb ftp://ftp.nl.debian.org/debian unstable main contrib non-free
#deb-src http://ftp.nl.debian.org/debian unstable main contrib non-free
#deb http://http.us.debian.org/debian unstable main contrib non-free
# unstable Security updates
#deb http://security.debian.org/ unstable/updates main contrib non-free
#deb-src http://security.debian.org/ unstable/updates main contrib non-free
#-----------------------------------------------------------------
#-----------------------------------------------------------------
#### BACKPORTS to STABLE ( Debian Sarge 3.1r0 )
## Laatest Samba from samba.org
#deb http://us4.samba.org/samba/ftp/Binary_Packages/Debian sarge samba
#deb-src http://us2.samba.org/samba/ftp/Binary_Packages/Debian sarge samba

#------------------------------------------------------------------
## MPEG/AVI addons +W32CODECS With MPlayer
#deb ftp://ftp.nerim.net/debian-marillat/ sarge main
#------------------------------------------------------------------
## www.dotdeb.org, updated php4/php5 mysql-41 mysql-50 qmail clamav etc etc.
## check the site for the packages list. if you want only 1 package ( preferred )
## change the line to #deb http://packages.dotdeb.org stable php5 for example
#deb http://packages.dotdeb.org stable all
#deb-src http://packages.dotdeb.org stable all
#------------------------------------------------------------------
## BootSplash ( does not work on every kernel ) www.bootsplash.de
## http://www.planamente.ch/emidio/pages/linux_howto_bootsplash.php
deb http://debian.bootsplash.de unstable main
deb-src http://debian.bootsplash.de unstable main

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Wed, 2005-12-14 17:59.

I understand what you are doing here but to me this reads more like crib notes than a useful howtoforge article give an more detailed introduction to what you are doing and explain why you are doing what you doing.

Peace Jim