add cd repo source to ubuntu 5.10
Gabriel M Dragffy
dragffy at yandex.ru
Sun Sep 17 14:59:28 UTC 2006
On Sun, 2006-09-17 at 16:16 +0200, Dimitri Mallis wrote:
> thanks for all the input. i managed to add the cd easily
> as Gabriel explained, i cant do what i want to do. what i want to do
> is say something like this, unplug the network cable
> apt-get dist-upgrade
> so that it will only use the cd as a source, but that didnt work, so i
> want to know if i can setup rsync so that one pc gets a dist-upgrade &
> all other upgrades & paceages get downloaded from the net (my pc) &
> then the other 4 pc's on the network will get all there files from my
> pc first instread of redownload from the net
> i know i should probably start a new thread for this, but have any of
> you sucsessfully set something like this up? i have googled rsync &
> found a lot of how-to's but im not 100% sure they were what i wanted.
> is there a good site with this example that i missed?
> any help
Hi you could probably do it with rsync, but it's going to take quite
some work because that's not what rsync was really designed for. Instead
of going against the grain I'd recommend you setup a PC with apt-cacher:
$ sudo aptitude install apt-cacher -y
(This is from universe).
Then you will need to edit the configuration files:
$ gksudo gedit /etc/default/apt-cacher
and change "AUTOSTART=0" to "AUTOSTART=1" then save and close this file.
Next edit apt.conf:
$ gksudo gedit /etc/apt/apt.conf
And change "Acquire::http::Proxy "false";" to "Acquire::Proxy "false";"
just by deleting six characters in the middle. Then save and close this
Then run the command:
$ sudo /etc/init.d/apt-cacher start
By default all packages you download from now on will be stored
in /var/cache/apt-cacher, if you don't like this you can change it and
many other options in /etc/apt-cacher/apt-cacher.conf .
ONE MORE THING!! You must change your sources.list to use apt-cacher....
$ gksudo gedit /etc/apt/sources.list
Changes all the sources that you want cached like this:
deb http://ru.archive.ubuntu.com/ubuntu dapper-updates universe
CHANGED FOR APT-CACHER:
deb http://localhost:3142/ru.archive.ubuntu.com/ubuntu dapper-updates
So you're just adding in localhost:3142 at the beginning. This is
obviously for the machine the apt-cacher is running on. For the other
computers on the network to use the apt-cacher resources you will need
to replace "localhost" with the IP of the host machine, so it may look
something like this:
deb http://192.168.0.1:3142/ru.archive.ubuntu.com/ubuntu dapper-updates
Also make sure if you are using some kind of firewalling on the host
that access to port 3142 is allowed, if you haven't installed any
firewalling then it should be OK and won't need additional
Just to let you know what it's all about. Next time you download some
packages they will be stored in /var/cache/apt-cacher so you won't need
to download them again in the future. It works very very well for me
indeed and once you've been using it for a while you get a really good
collection of packages. If you want to import the packages that you have
already on your system into apt-cacher you will need to run the import
script by doing:
$ sudo /usr/share/apt-cacher/apt-cacher-import.pl -R
I think that should pretty much cover it for you, need further help just
ask. That concludes the longest email I've EVER written!
PS. If you have your /home on a seperate partition then I would store
the apt-cacher files there so in the event of deletion of the root
partition you will still have all your packages handy for the
reinstallation. Just do the following:
$ sudo mv /var/cache/apt-cacher /home/.apt-cacher
This will make it a hidden directory to keep it from getting in the way.
If you don't want it hidden remove the "." from .apt-cacher. Then you
need to edit the configuration file:
$ gksudo gedit /etc/apt-cacher/apt-cacher.conf
Change "cache_dir=/var/cache/apt-cacher" to
One final word of warning that should probably go at the beginning is to
make backups of all you configuration files BEFORE you mess with them.
As an example:
$ sudo cp /etc/apt/apt.conf /etc/apt/apt.conf.bk
Is good, just replace the path and file with the path and file you are
wanting to edit.
More information about the ubuntu-users