Hrvatska akademska i istraživačka mreža
  NASLOVNICA MAPA WEBA TRAŽILICA KONTAKTI CARNET WEB
Hrvatska akademska i istraživačka mreža
 
menu 4
Sigurnost
menu 4
Distribucija
menu 4
Pomoć
menu 4
Dokumenti
menu 4
menu 4

 

 

14-12-04 02:24
Unapređenje Debian GNU/linuxa kod kuće

piše IVICA ICO RAKO

apt-zip ili upgrade Debian GNU/Linuxa kod kuce

 

Mene je uvijek mučilo kako elegantno unaprijediti strojeve kod kuće. Imam spori link (ISDN), a upgrade nerijetko bude i veći od 100 MB (koristim Debian Sid (unstable).
Uvijek je bilo dvojbi koje točno pakete skinuti, a koje zanemariti.

Najbolji način koji sam nasao je apt-zip koji se nalazi u stablu Debiana.

Zamišljeno je da se nekim prijenosnim medijem (ZIP drive, USB flash disk,

i sl.) kući prenesu paketi s računala pod brzom linkom (npr. na poslu).

Prvo, u /etc/fstab dodamo sljedeću liniju (pretpostavljamo da prenosimo USB flash diskom kao /dev/sda):

/dev/sda1 /mnt/usbkey vfat user,noauto 0 0

Zatim u konfiguraciji od apt-zip paketa (/etc/apt/apt-zip.conf) konfiguriramo sljedeće linije:

# MEDIUM should be defined in /etc/fstab with option `noauto'.

MEDIUM=/mnt/usbkey

# DEFAULT_APTGETACTION is the action taken by apt-get when neither

# the --aptgetaction nor the --packages options are given.

# Possible actions include: dselect-upgrade(default), upgrade and dist-upgrade

DEFAULT_APTGETACTION=dist-upgrade

Naravno, možete sami odabrati neki drugi način upgradea umjesto dist-upgradea.

Zatim osvježite lokalnu bazu paketa (ovo obično traje 7-8 minuta preko ISDN-a):

# apt-get update

Get:1 http://ftp.carnet.hr sarge/main Packages [3170kB]
Hit http://security.debian.org sarge/updates/main Packages
Get:2 http://security.debian.org sarge/updates/main Release [111B]
Hit http://security.debian.org sarge/updates/contrib Packages
Get:3 http://security.debian.org sarge/updates/contrib Release [114B]
Hit http://security.debian.org sarge/updates/non-free Packages
Get:4 http://security.debian.org sarge/updates/non-free Release [115B]
Get:5 http://ftp.carnet.hr sarge/main Release [81B]
Get:6 http://ftp.carnet.hr sarge/contrib Packages [56.4kB]
Get:7 http://ftp.carnet.hr sarge/contrib Release [84B]
Get:8 http://ftp.carnet.hr sarge/non-free Packages [60.6kB]
Get:9 http://ftp.carnet.hr sarge/non-free Release [85B]
Hit http://ftp.carnet.hr sarge/non-US/main Packages
Hit http://ftp.carnet.hr sarge/non-US/main Release
Hit http://ftp.carnet.hr sarge/non-US/contrib Packages
Hit http://ftp.carnet.hr sarge/non-US/contrib Release
Hit http://ftp.carnet.hr sarge/non-US/non-free Packages
Hit http://ftp.carnet.hr sarge/non-US/non-free Release
Get:10 http://ftp.carnet.hr carnet-sarge/main Packages [25.9kB]
Hit http://ftp.carnet.hr carnet-sarge/main Release
Get:11 http://ftp.carnet.hr carnet-sarge/non-free Packages [1212B]
Ign http://ftp.carnet.hr carnet-sarge/non-free Release
Fetched 3315kB in 4m52s (11.3 kB/s)
Reading Package Lists...

Zatim na USB flash disk stavite popis razlike paketa:

# apt-zip-list
Mounting /mnt/usbkey
UnMounting /mnt/usbkey

Na USB flash disku smo dobili dvije datoteke:
- apt-zip.options koja služi kao konfiguracija
- fetch-script-wget-<ime stroja> koja služi za download potrebnih paketa

Sad odnesemo USB stick na posao, na neki UNIX s brzim linkom, mountamo ga, te pokrenemo:

# sh fetch-script-wget-ico-notebook
09:58:25 URL:http://ftp.carnet.hr/pub/debian/pool/main/f/fontconfig/fontconfig_2.2.3-4_i386.deb [62174/62174] -> "fontconfig_2.2.3-4_i386.deb" [1]
09:58:34 URL:http://ftp.carnet.hr/pub/debian/pool/main/a/atk1.0/libatk1.0-0_1.8.0-3_i386.deb [68196/68196] -> "libatk1.0-0_1.8.0-3_i386.deb" [1]

[sniiiiiiiiiiip]

09:58:46 URL:http://ftp.carnet.hr/pub/debian/pool/main/g/gconf2/libgconf2-4_2.8.1-4_i386.deb [67506/67506] -> "libgconf2-4_2.8.1-4_i386.deb" [1]

Time je ta skripta downloadala sve potrebne pakete. Kod kuće stavimo stick u USB port, te napišemo:

# apt-zip-inst
Mounting /mnt/usbkey
Reading Package Lists...
Building Dependency Tree...

The following NEW packages will be installed:
liboil0.2 libswfdec0.3

The following packages will be upgraded:
arj base-files binutils dialog dpkg dpkg-dev dselect elinks findutils
fontconfig gconf2 gdm-themes gnome-desktop-data gnome-icon-theme
gnome-keyring gnome-session gnome-terminal grep groff-base kernel-doc-2.6.8
kernel-headers-2.6.8-1 kernel-headers-2.6.8-1-686 kernel-image-2.6.8-1-686
kernel-source-2.6.8 libatk1.0-0 libaudio2 libbonobo2-0 libbonobo2-common
libbonoboui2-0 libbonoboui2-common libeel2-2 libeel2-data libexif10
libfltk1.1c102 libfontconfig1 libfreetype6 libgail-common libgail17
libgconf2-4 libgnome-desktop-2 libgnome-keyring0 libgnome2-0 libgnome2-common
libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common
libgnomevfs2-0 libgnomevfs2-common libgsf-1 libgtkhtml2-0 libhtml-clean-perl
liblircclient0 libmetacity0 libnautilus2-2 libnewt0.51 libpango1.0-0
libpango1.0-common libpng12-0 libruby1.8 libselinux1 libsmbclient libssl0.9.7
libxml-simple-perl libxml1 libxosd2 lilo login module-init-tools
mozilla-firefox mozilla-plugin-vlc netcat openoffice.org openoffice.org-bin
openoffice.org-l10n-en passwd python-gtk2 python2.3-gtk2 ruby1.8 samba-common
smbclient ssh sudo swf-player ttf-opensymbol unarj vlc whiptail wxvlc zip zsh
91 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/167MB of archives.
After unpacking 1960kB disk space will be freed.

Do you want to continue? [Y/n]

Preconfiguring packages ...
(Reading database ... 65574 files and directories currently installed.)
Preparing to replace dpkg 1.10.23 (using .../usbkey/dpkg_1.10.25_i386.deb) ...
Unpacking replacement dpkg ...
Setting up dpkg (1.10.25) ...

[sniiiip]

Setting up libpango1.0-common (1.6.0-3) ...
Setting up mozilla-firefox (1.0-4) ...
Setting up openoffice.org (1.1.2dfsg1-3) ...

Time nam je stroj kod kuće uredno naprijeđen.





[Lista]
Ovu uslugu CARNeta realizira Sveučilišni računski centar Sveučilišta u Zagrebu
  Copyright ©2005. CARNet. Sva prava zadržana. Impressum.
Mail to
sys-portal@CARNet.hr