How to install packages from local storage?

Gregory Orange gregory.orange at calorieking.com
Mon Aug 1 02:11:55 UTC 2016


On 01/08/16 09:49, Manish Jain wrote:
> I have been asked by a friend to move 6 laptops in his company from
> Windows/Ubuntu to FreeBSD. I was wondering if I could save some time by
> not having to download the packages on each laptop. I would ideally like
> to download packages on 1 laptop, and then reuse those packages on the
> other laptops (probably via USB flash media).

For only 6 machines, you could install once, then sync the cache to the 
others before installing there. This means you don't have to invest any 
effort into infrastructure to support it. Updates would either need 
roughly the same process, or just take the hit on download time and 
bandwidth cost on each machine, depending on your requirements. If you 
want the benefits of simpler updates without the download time and 
bandwidth cost, then using 'pkg repo' to create a repo somewhere on your 
network is a very simple step. Poudriere seems like overkill for a 
simple installation of binary packages - I've stopped using it for the 
dozen or more machines where I deploy packages.

This is my suggestion:
* [host1]# pkg install $packages_list
* [host1]# for i in host2-6; do rsync -a --delete /var/cache/pkg 
$i:/var/cache/pkg
* [host2-6]# pkg install $packages_list

clusterssh (cssh) could help you do the final step in a single set of 
keystrokes.

HTH,
Greg.


More information about the freebsd-questions mailing list