HowTo: Preparar archivo sources.list para uso con repositorio local
8 de diciembre de 2015 Deja un comentario
En un articulo anterior, se dejó claro como crear un repositorio local para la distribución de GNU/Linux Debian en su release estable y con nombre código jessie, en las ramas amd64 y i386.
La ventaja y justificación principal de este laboratorio, es que se ahorra mucho más ancho de banda ya que se centralizaban las descargas por concepto de instalación de paquetes u actualizaciones a un único equipo, y posteriormente desde la red interna LAN se distribuirían los paquetes necesarios y a una velocidad mayor.
Así pues, para poder disfrutar del repositorio antes descrito y descargado sólo hará falta editar el archivo «sources.list» de nuestro equipo cliente para que apunte a este nuevo «servidor-espejo» de actualizaciones para nuestro amado Debian, para ello realizamos el cambio en el siguiente archivo y de la manera acostumbrada:
# nano /etc/apt/sources.list
Agregamos las siguientes líneas:
# MAIN ubicado en: # /var/www/html/debian deb http://localhost/debian/ stable main contrib non-free # MULTIMEDIA ubicado en: # /var/www/html/debian-multimedia deb http://localhost/debian-multimedia/ jessie main non-free # SECURITY ubicado en: # /var/www/html/debian-security deb http://localhost/debian-security/ jessie/updates main contrib non-free # BACKPORTS ubicado en: # /var/www/html/jessie-backports deb http://localhost/jessie-backports/ jessie main non-free
Y este es el hermoso resultado:
~/mirror-debian-8# apt-get update Ign http://localhost stable InRelease Ign http://localhost jessie InRelease Ign http://localhost jessie/updates InRelease Ign http://localhost jessie InRelease Des:1 http://localhost stable Release.gpg [2.373 B] Des:2 http://localhost jessie Release.gpg [819 B] Des:3 http://localhost jessie/updates Release.gpg [1.554 B] Obj http://localhost jessie Release.gpg Des:4 http://localhost stable Release [133 kB] Des:5 http://localhost jessie Release [21,4 kB] Des:6 http://localhost jessie/updates Release [61,5 kB] Obj http://localhost jessie Release Des:7 http://localhost stable/contrib Translation-en [38,4 kB] Des:8 http://localhost stable/main Translation-es [314 kB] Des:9 http://localhost stable/main Translation-en [4.585 kB] Des:10 http://localhost stable/non-free Translation-en [72,2 kB] Des:11 http://localhost stable/main amd64 Packages [9.038 kB] Des:12 http://localhost stable/contrib amd64 Packages [59,5 kB] Des:13 http://localhost stable/non-free amd64 Packages [101 kB] Des:14 http://localhost jessie/main amd64 Packages [156 kB] Des:15 http://localhost jessie/non-free amd64 Packages [3.118 B] Des:16 http://localhost jessie/updates/main amd64 Packages [162 kB] Des:17 http://localhost jessie/updates/contrib amd64 Packages [2.512 B] Des:18 http://localhost jessie/updates/non-free amd64 Packages [14 B] Des:19 http://localhost jessie/updates/contrib Translation-en [1.211 B] Des:20 http://localhost jessie/updates/main Translation-en [87,5 kB] Des:21 http://localhost jessie/updates/non-free Translation-en [14 B] Obj http://localhost jessie/main amd64 Packages Obj http://localhost jessie/non-free amd64 Packages Ign http://localhost jessie/main Translation-es_VE Ign http://localhost jessie/main Translation-es Ign http://localhost jessie/main Translation-en Ign http://localhost jessie/non-free Translation-es_VE Ign http://localhost jessie/non-free Translation-es Ign http://localhost jessie/non-free Translation-en Ign http://localhost jessie/main Translation-es_VE Ign http://localhost jessie/main Translation-es Ign http://localhost jessie/main Translation-en Ign http://localhost jessie/non-free Translation-es_VE Ign http://localhost jessie/non-free Translation-es Ign http://localhost jessie/non-free Translation-en Descargados 14,8 MB en 1s (10,3 MB/s) Leyendo lista de paquetes... Hecho
Como se puede apreciar, la descarga fue realizada a velocidad de mi LAN.
Nota: se colocó localhost en el archivo sources.list ya que estoy realizando las pruebas en el mismo equipo que tengo el repositorio descargado, si desear usarlo desde otro equipo de su misma red, deberá colocar la dirección IP o el nombre NetBios que tenga el equipo cliente.
Dato de Interés: Los lectores que hayan llegado hasta este punto, les extiendo mis felicitaciones y les dejo por acá la info referente al espacio en disco usado, a la fecha.
84G debian/ 1,1G debian-multimedia/ 6,4G debian-security/ 1,1G jessie-backports/