Discussion:
How to install packages from local storage?
(too old to reply)
Manish Jain
2016-08-01 01:49:28 UTC
Permalink
Hi,

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).

Is that possible ? If yes, can somebody please give me some useful
how-to information ?

Thanks
Manish Jain
Brian W.
2016-08-01 01:55:01 UTC
Permalink
Building a poudriere repo seems a solution for this.

Brian
Post by Manish Jain
Hi,
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).
Is that possible ? If yes, can somebody please give me some useful
how-to information ?
Thanks
Manish Jain
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
Ultima
2016-08-01 01:59:45 UTC
Permalink
Another solution, though I have not tried this, have the labtops mount a
nfs on /var/cache/pkg they will share the pkg's they download, though it
may not be the best or safest solution.
Post by Brian W.
Building a poudriere repo seems a solution for this.
Brian
Post by Manish Jain
Hi,
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).
Is that possible ? If yes, can somebody please give me some useful
how-to information ?
Thanks
Manish Jain
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
Gregory Orange
2016-08-01 02:11:37 UTC
Permalink
Post by Manish Jain
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.
Manish Jain
2016-08-01 02:15:55 UTC
Permalink
On Mon, Aug 1, 2016 at 7:29 AM, Ultima <***@gmail.com> wrote:
Another solution, though I have not tried this, have the labtops mount a nfs on /var/cache/pkg they will share the pkg's they download, though it may not be the best or safest solution.

Does that mean (presuming /var/cache/pkg on all laptops is mounted via NFS to somewhere on the network), I just have to run 'pkg install gnome3' and the gnome3 pkg will be accessed from /var/cache/pkg rather than being downloaded ?

If that works, then why not just copy local.sqlite (I think this is /var/db/pkg) on the first system, and paste it on the other laptops ?

I also see that pkg has a command 'add'. What is that for ?
Ultima
2016-08-01 02:24:31 UTC
Permalink
When a package is downloaded, it is stored in /var/db/pkg, If all the
labtops have the same mountpoint in /var/db/pkg, when one downloads a
package it will appear there for all the labtops. This dir is checked
before downloading the pkg.
Post by Ultima
Another solution, though I have not tried this, have the labtops mount a
nfs on /var/cache/pkg they will share the pkg's they download, though it
may not be the best or safest solution.
Does that mean (presuming /var/cache/pkg on all laptops is mounted via NFS
to somewhere on the network), I just have to run 'pkg install gnome3' and
the gnome3 pkg will be accessed from /var/cache/pkg rather than being
downloaded ?
If that works, then why not just copy local.sqlite (I think this is
/var/db/pkg) on the first system, and paste it on the other laptops ?
I also see that pkg has a command 'add'. What is that for ?
Ultima
2016-08-01 02:24:54 UTC
Permalink
Sorry, /var/cache/pkg, not db.
Post by Ultima
When a package is downloaded, it is stored in /var/db/pkg, If all the
labtops have the same mountpoint in /var/db/pkg, when one downloads a
package it will appear there for all the labtops. This dir is checked
before downloading the pkg.
Post by Ultima
Another solution, though I have not tried this, have the labtops mount a
nfs on /var/cache/pkg they will share the pkg's they download, though it
may not be the best or safest solution.
Does that mean (presuming /var/cache/pkg on all laptops is mounted via
NFS to somewhere on the network), I just have to run 'pkg install gnome3'
and the gnome3 pkg will be accessed from /var/cache/pkg rather than being
downloaded ?
If that works, then why not just copy local.sqlite (I think this is
/var/db/pkg) on the first system, and paste it on the other laptops ?
I also see that pkg has a command 'add'. What is that for ?
Gregory Orange
2016-08-01 02:29:04 UTC
Permalink
Post by Manish Jain
I also see that pkg has a command 'add'. What is that for ?
Useful for adding an arbitrary package file without using a pkg
repository, but I think less useful than using 'pkg install'. If you
really want to use and maintain your own package files (e.g. created
with 'pkg add', or copied from /var/cache/pkg - perhaps using just 'pkg
fetch -d' instead of 'pkg install') then it's easy to put them all
somewhere then run 'pkg repo' on them, and share that (read-only in my
case) over NFS.
Gregory Orange
2016-08-01 02:36:48 UTC
Permalink
e.g. created with 'pkg add'
Ugh, I mean 'pkg create' - from an installed package.
William A. Mahaffey III
1970-01-01 00:00:00 UTC
Permalink
Post by Manish Jain
Hi,
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).
Is that possible ? If yes, can somebody please give me some useful
how-to information ?
Thanks
Manish Jain
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
Download & burn 1 of the install images to a flash drive & do all boxen
from that. I did that w/ 3 boxen on my LAN, worked AOK. You can add
scripts to automate things to the flash drive once you have burned it.
$0.02, no more, no less ....
--
William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
Loading...