viernes, 30 de abril de 2010

Sincronizar repositorios de Ubuntu 10.04

Pues para hacerlo debemos crear la siguiente estructura y tener suficiente espacio en disco. unos 60GB libres nos caerán bien.
1.mkdir -p /home/ubuntu/ubuntu
2.cd /home
3.nano ubuntu-all-lucid.sh
4. Dentro escribimos lo siguiente:
ARQUITECTURA=i386,amd64
METODO=http
RAMA=lucid
PRINCIPAL=archive.ubuntu.com
DIR_MIRROR=/home/ubuntu/ubuntu
SECCIONES=main,universe,multiverse,restricted
debmirror -a ${ARQUITECTURA} \
-s ${SECCIONES} \
-h ${PRINCIPAL}/ubuntu \
-d ${RAMA} -r / --progress \
-e ${METODO} --ignore-release-gpg --nosource \
${DIR_MIRROR}


si no quieres amd solamente quita ",amd64" y deja el "i386" o viceversa.

5. Luego corremos como root el script.
sudo sh /home/ubuntu-all-lucid.sh
6. Finalmente comenzara a sincronizar todos los GB's que hay en el repo de ubuntu 10.04.

sh ubuntu-all-lucid.sh
Mirroring to /home/ubuntu/ubuntu from http://archive.ubuntu.com/ubuntu///
Arches: i386,amd64
Dists: lucid
Sections: main,universe,multiverse,restricted
Will clean up AFTER mirroring.
Pdiff mode: use.
Attempting to get lock, this might take 2 minutes before it fails.
Get Release files.
[0%] Getting: dists/lucid/Release... ok
[0%] Getting: dists/lucid/Release.gpg... ok
Get Packages and Sources files and other miscellany.
dists/lucid/main/binary-i386/Packages.gz needs fetch
[ 0%] Getting: dists/lucid/main/binary-i386/Packages.gz... ok
dists/lucid/main/binary-i386/Release needs fetch
[ 11%] Getting: dists/lucid/main/binary-i386/Release... ok
dists/lucid/main/binary-amd64/Packages.gz needs fetch
[ 11%] Getting: dists/lucid/main/binary-amd64/Packages.gz... ok
dists/lucid/main/binary-amd64/Release needs fetch
[ 23%] Getting: dists/lucid/main/binary-amd64/Release... ok
dists/lucid/universe/binary-i386/Packages.gz needs fetch
[ 23%] Getting: dists/lucid/universe/binary-i386/Packages.gz...
dists/lucid/universe/binary-i386/Release needs fetch
[ 60%] Getting: dists/lucid/universe/binary-i386/Release... ok
dists/lucid/universe/binary-amd64/Packages.gz needs fetch
[ 60%] Getting: dists/lucid/universe/binary-amd64/Packages.gz... ok
dists/lucid/universe/binary-amd64/Release needs fetch
[ 98%] Getting: dists/lucid/universe/binary-amd64/Release... ok
dists/lucid/multiverse/binary-i386/Packages.gz needs fetch
[ 98%] Getting: dists/lucid/multiverse/binary-i386/Packages.gz... ok
dists/lucid/multiverse/binary-i386/Release needs fetch
[ 99%] Getting: dists/lucid/multiverse/binary-i386/Release... ok
dists/lucid/multiverse/binary-amd64/Packages.gz needs fetch
[ 99%] Getting: dists/lucid/multiverse/binary-amd64/Packages.gz... ok
dists/lucid/multiverse/binary-amd64/Release needs fetch
[100%] Getting: dists/lucid/multiverse/binary-amd64/Release... ok
dists/lucid/restricted/binary-i386/Packages.gz needs fetch
[100%] Getting: dists/lucid/restricted/binary-i386/Packages.gz... ok
dists/lucid/restricted/binary-i386/Release needs fetch
[100%] Getting: dists/lucid/restricted/binary-i386/Release... ok
dists/lucid/restricted/binary-amd64/Packages.gz needs fetch
[100%] Getting: dists/lucid/restricted/binary-amd64/Packages.gz... ok
dists/lucid/restricted/binary-amd64/Release needs fetch
[100%] Getting: dists/lucid/restricted/binary-amd64/Release... ok
Parse Packages and Sources files and add to the file list everything therein.
Download all files that we need to get (43355 MiB).


Luego de unos días de descarga tendrán el repo sincronizado. y para actualizarlo bastara con correr nuevamente:
sudo sh /home/ubuntu-all-lucid.sh y el repo se actualizara al día en que se hace el comando.

Salu2

No hay comentarios:

Publicar un comentario