Mostrando entradas con la etiqueta Ubuntu. Mostrar todas las entradas
Mostrando entradas con la etiqueta Ubuntu. Mostrar todas las entradas

domingo, 20 de abril de 2014

Repositorios Debian y Ubuntu Offline |Script


Primeramente
apt-get install debmirror

Script para debian, requiere crear la estructura /home/usuario/debian/debian , /home/usuario/debian/updates
#!/bin/sh
ARQUITECTURA=amd64
METODO=http
RAMA=wheezy
RAMAS=wheezy
HOST=ftp.debian.org
HOST_SEGURIDAD=security.debian.org
DIR_MIRROR=/home/gary/debian/debian
DIR_SEGURIDAD=/home/gary/debian/updates

SECCIONES=main,contrib,non-free
SECCION=main

echo "================================================================"
echo "Actualizando los repositorios PRINCIPALES; main, contrib, non-free"
echo "================================================================"
echo ""
debmirror -a ${ARQUITECTURA} \
-s ${SECCIONES} \
-h ${HOST}/debian \
-d ${RAMA} -r / --progress \
-e ${METODO} --ignore-release-gpg --nosource \
${DIR_MIRROR}

echo "=================================================================="
echo "Actualizando repo de SEGURIDAD; main, contrib, non-free"
echo "=================================================================="
echo ""
debmirror -a ${ARQUITECTURA} \
-s ${SECCIONES} \
-h ${HOST_SEGURIDAD} \
-d ${RAMA}/updates -r /debian-security --progress \
-e ${METODO} --ignore-release-gpg --nosource \
${DIR_SEGURIDAD}


Para ubuntu de igual forma se requiere la estructura: /home/usuario/ubuntu/ubuntu

#!/bin/sh
ARQUITECTURA=amd64
METODO=http
RAMA=trusty
RAMAS=trusty
HOST=cc.archive.ubuntu.com
HOST_SEGURIDAD=cc.archive.ubuntu.com
DIR_MIRROR=/home/gary/ubuntu/ubuntu

SECCIONES=main,restricted,universe,multiverse
SECCION=main

echo "================================================================"
echo "Actualizando los repositorios PRINCIPALES                       "
echo "================================================================"
echo ""
debmirror -a ${ARQUITECTURA} \
-s ${SECCIONES} \
-h ${HOST}/ubuntu \
-d ${RAMA} -r / --progress \
-e ${METODO} --ignore-release-gpg --nosource \
${DIR_MIRROR}

Guardan los script's por separados en un archivo .sh  posteriormente corren los archivo desde una terminal, sh archivo.sh y listo!


jueves, 12 de abril de 2012

Google Chrome - Navegador por Defecto

Gnome no reconocia a Chrome como navegador por defecto a pesar que le indicaba que debia setearlo como tal asi que despues de tanta vuelta la solución definitiva es hacer lo siguiente como root.

ln -s /opt/google/chrome/google-chrome.desktop /usr/share/applications/google-chrome.desktop


Esto sirve para Debian Squeeze Wheezy y Ubuntu's por supuesto.

miércoles, 12 de mayo de 2010

De repositorio a DVD |Ubuntu 10.04

Esto es sumamente sencillo si no se comenten error en su procedimiento, yo ya tengo bajados los 43.x GB de ubuntu 10.04 para AMD64 con mi script de descarga y si no lo viste esta acá e Intel a continuación procedemos a la creación de los DVD's a partir del repositorio.
Nota importante: Antes que nada minimamente debemos tener el Doble de espacio del repositorio ya que los DVD's ocuparan el mismo tamaño del repositorio.

1. cd /home

2. wget http://archive.ubuntu.com/ubuntu/pool/universe/d/debpartial/debpartial_0+20030508-0.1_all.deb

3. dpkg -i debpartial_0+20030508-0.1_all.deb

4. cp /usr/share/doc/debpartial/examples/debcopy.gz /home

5. gunzip debcopy.gz

6. debpartial --nosource --dirprefix=ubuntu --section=main,universe,restricted,multiverse --dist=lucid --size=DVD /home/ubuntu/ubuntu /home/ubuntudvd/

7. Con ls -l Verificamos la cantidad de DVD que se crearan.
ls -l /home/ubuntudvd/

total 32
drwxr-xr-x 4 root root 4096 2010-05-12 10:37 ubuntu0
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu1
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu2
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu3
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu4
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu5
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu6
drwxr-xr-x 4 root root 4096 2010-05-12 10:38 ubuntu7


8. Este es tal vez el paso mas importante y no debemos cometer error alguno en la ejecución de la siguientes lineas (mucho mejor si las hacemos de una en una).

ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu0
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu1
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu2
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu3
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu4
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu5
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu6
ruby debcopy -l /home/ubuntu/ubuntu /home/ubuntudvd/ubuntu7



9. Ahora procedemos a crear los ISOS.
mkisofs -f -J -r -V "Ubuntu 1/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd1.iso /home/ubuntudvd/ubuntu0
mkisofs -f -J -r -V "Ubuntu 2/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd2.iso /home/ubuntudvd/ubuntu1
mkisofs -f -J -r -V "Ubuntu 3/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd3.iso /home/ubuntudvd/ubuntu2
mkisofs -f -J -r -V "Ubuntu 4/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd4.iso /home/ubuntudvd/ubuntu3
mkisofs -f -J -r -V "Ubuntu 5/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd5.iso /home/ubuntudvd/ubuntu4
mkisofs -f -J -r -V "Ubuntu 6/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd6.iso /home/ubuntudvd/ubuntu5
mkisofs -f -J -r -V "Ubuntu 7/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd7.iso /home/ubuntudvd/ubuntu6
mkisofs -f -J -r -V "Ubuntu 8/8 i386-amd64" -o ubuntu-complete-i386-amd64-dvd8.iso /home/ubuntudvd/ubuntu7


10. procedemos con la grabación de los DVD's desde consola.
Buscamos el grabador cdrecord -scanbus

scsibus1:
1,0,0 100) *
1,1,0 101) 'TSSTcorp' 'CDDVDW SH-S223B ' 'SB00' Removable CD-ROM
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *


11. Ahora grabamos todos y cada uno de los ISO's con el siguiente comando.
cdrecord -v dev=1,1,0 -driveropts=burnfree -dao /home/ubuntu-complete-i386-amd64-dvd1.iso

Saludos ñ_ñ

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