Selasa, 25 Oktober 2011

AptMoveHowto

 

http://www.tuxarena.com/static/tut_iso_ubuntu.php

http://www.tuxarena.com/2011/06/iso-master-for-linux-yet-another-gui-iso-creator/

 

 

 

 

 

 

 

 

 

Apt-move is used to move a collection of Debian package files into a
proper archive hierarchy as is used in the official Debian archive. It
is intended as a tool to help manage the apt-get(8) file cache, but
could be configured to work with any collection of Debian packages.

Running apt-move periodically will assist in managing the resulting
partial mirror by optionally removing obsolete packages, and creating
valid local Packages.gz files. It can also build a partial or complete
local mirror of a Debian binary distribution (including an
``installed-packages only'' mirror).




This page will describe how to make a cd which contains packages you have downloaded on one machine using apt or synaptic. The cd will be a repository that you can easily use on another machine using AptCdrom and Synaptic .

For example, I will show how to make a cd which contains all the security updates that has been downloaded.

Except for adding new apt PGP keys, the user of the cd will not need to use the command-line to use it.

 

Step 1: Install the apt-move package


Apt-move is a tool for creating a debian package repository file structure out of packages that have been downloaded to /var/cache/apt/archives. Installed packages are downloded there by apt for installation. Apt-move will create this local repository in /mirrors/debian, by default.

You can install apt-move from the Universe Repository

I change the setting in /etc/apt-move.conf from
COPYONLY=no

to
COPYONLY=yes

So that apt-move doesn't delete file from your /var/cache/apt/archives/.

 

Step 2: Select the packages you want to put on the cd


In this example, we only want to put freshly downloaded packages. We don't want to put old packages or packages that exist in Ubuntu CD.

First, we clean up the /var/cache/apt/archives from old packages.
sudo aptitude autoclean

 

Step 3: Run apt move to create the archive structure


Make sure you have enough disk space first.

Because /mirrors/debian is root owned we must become root to make the steps easier.
sudo -s -H

All the following command run as root. First we clean-up previous mirrors (if exists) then we run apt-move.

 
rm -rf /mirrors/debian
apt-move -d dapper update

Because ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake Packages.gz with the help of apt-ftparchive.

 
cd /mirrors/debian
apt-ftparchive packages pool/main/ \
| gzip -9c > dists/dapper/main/binary-i386/Packages.gz
apt-ftparchive packages pool/restricted/ \
| gzip -9c > dists/dapper/restricted/binary-i386/Packages.gz

We must also remake Release file, to do this we must make an apt configuration file named ~/myapt.conf it contents is like this
APT::FTPArchive::Release {
Origin "APT-Move";
Label "APT-Move";
Suite "dapper";
Codename "dapper";
Architectures "i386";
Components "main restricted";
Description "Ubuntu Updates CD";
};

Next, run the following commands:
rm dists/dapper/Release
apt-ftparchive -c ~/myapt.conf release dists/dapper/ > Release
mv Release dists/dapper/

Then we need to make Release.gpg, to make it you must already have your GPGKey set and ready to sign.

 
gpg -bao dists/dapper/Release.gpg dists/dapper/Release

Next, we delete unwanted .apt-move directory
rm -rf .apt-move

You can identify the cd by making a .disk directory and making an info file in it.

 
mkdir .disk
echo Ubuntu-Updates `date +%Y-%m-%d` > .disk/info

Then we need to put our public keys in it.

 
gpg --export -a "Your Name" > public.key

Offcourse change Your Name with the name that you use in your PGP.

Thats' all

 
exit

 

Step 4: Burn the cd


Copy the contents of what is contained in /mirrors/debian to a cd.

For example you could make an iso by following command:
mkisofs -r -A "Ubuntu Updates `date +%Y%m%d`" -o ubuntu-updates.iso \
/mirrors/debian

Before you could use the CD, you need to add our GPG key to apt GPG keys. Put the CD on CD-ROM Drive, mount it (if it not automatically mounted) then run the following:

 
apt-key add /cdrom/public.key

Then you could use the CD like any other Ubuntu CD. On a non-networked ubuntu machine, you can run synaptic, insert the cd and go into Synaptic -> Edit -> Add Cdrom and it will add the contents of the cd to your repositories.

You can also do it from the command-line with

 
sudo apt-cdrom add


Source: https://help.ubuntu.com/community/AptMoveHowto

 

http://tuxarena.blogspot.com/2010/11/goggles-music-manager-overview-and.html

 
◄ Posting Baru Posting Lama ►
 

Copyright © 2012. informativeonmigraine - All Rights Reserved inovLy media online by inforZa