22 августа 2011 г.

debian enable add testing repository

I have VPS with, well, an old Debian 5 (Lenny) template installed where default (stable) packages repository has old versions. For example, phpmyadmin is 2.* when at the moment of writing 3.* is available. This is important since there was a major vulnerability reported in old phpmyadmin version. So in order to make apt searching new versions of packages just edit your /etc/apt/sources.list as following:
deb http://ftp.de.debian.org/debian testing main contrib non-free

This is for Debian Lenny. You may want to change de to your country code.
UPD: 'Lazy Mode': one-line command for editing sources.list:
sed -i 's/lenny/testing/g' /etc/apt/sources.list && sed -i 's/deb http:\/\/ftp.de.debian.org\/debian-volatile/#deb http:\/\/ftp.de.debian.org\/debian-volatile/g' /etc/apt/sources.list && sed -i 's/deb http:\/\/ftp.de.debian.org\/debian-security/#deb http:\/\/ftp.de.debian.org\/debian-security/g' /etc/apt/sources.list

Run apt-get update to get an error.

Then add the corresponding GPG Pub Key:
apt-get install debian-archive-keyring


Now you can check the available version of %packagename%:
apt-cache policy %packagename%

Комментариев нет: