A Short Introduction To Apt-Pinning
A Short Introduction To Apt-PinningVersion 1.0 This article is a short overview of how to use apt-pinning on Debian and Debian-based distributions (like Ubuntu). Apt-Pinning allows you to use multiple releases (e.g. stable, testing, and unstable) on your system and to specify when to install a package from which release. That way you can run a system based mostly on the stable release, but also install some newer packages from testing or unstable (or third-party repositories). I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm using a Debian Lenny (stable) system here. I will explain apt-pinning on the basis of the package phpmyadmin which is available in three different versions in the stable, testing, and unstable repositories (at the time of this writing) - see http://packages.debian.org/search?keywords=phpmyadmin&searchon=names&suite=all§ion=all:
2 My sources.listI add the testing and unstable repositories to my /etc/apt/sources.list so that it looks as follows: vi /etc/apt/sources.list
Open /etc/apt/apt.conf... vi /etc/apt/apt.conf ... and put the following line into it:
(Otherwise you might get an error like this one when running apt-get update: E: Dynamic MMap ran out of room ) Then run apt-get update to update the package database. With the current version, apt would always try to install the newest version of a package which usually comes from unstable or testing - this could lead to a messed-up system. With apt-pinning, we can define priorities so that a package gets installed from unstable or testing only if there's no such package from stable. We can check apt priorities as follows: apt-cache policy server1:~# apt-cache policy As you see, stable, testing, and unstable all have the same priority (500) which means that the newest version of a package would be installed. In the case of our phpmyadmin package this is version 4:3.1.3-1 which is from unstable: apt-cache policy phpmyadmin The Candidate: line shows the version that would be installed: server1:~# apt-cache policy phpmyadmin This is how priorities are defined (see man 5 apt_preferences ): P > 1000
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video




print: 

Recent comments
18 hours 34 min ago
23 hours 41 min ago
1 day 6 hours ago
1 day 7 hours ago
1 day 10 hours ago
1 day 10 hours ago
1 day 14 hours ago
1 day 14 hours ago
1 day 14 hours ago
1 day 16 hours ago