Solved Installing packages offline

Hi all,

I will soon be in the process of installing a number of FreeBSD workstations in an environment with no Internet access. My challenge is that I am looking for a way to install packages locally from an external hard drive to which I've already downloaded a package repository to be used for this purpose.

I am using FreeBSD 10.0, which would be installed from either a USB .img or DVD-ROM and the packages from the following site:

http://pkg.freebsd.org/freebsd:10:x86:64/release_0/

My question is what should I add to /etc/pkg/FreeBSD.conf in order to get an installed system to use the external disk as its package repository instead of looking for one via the Internet?

Any suggestions would be greatly appreciated.
 
Code:
local: {
   url: "file:///path/to/your/repo/All",
   enabled: yes
}
More details check pkg.conf(5) manual.

Edit: please don't change /etc/FreeBSD.conf! You can add repositories into /usr/local/etc/pkg/, and can disable the FreeBSD repository too.
 
Don't modify /etc/pkg/FreeBSD.conf, changes will get overwritten on the next update. Instead create /usr/local/etc/pkg/repos/FreeBSD.conf with this content:
Code:
FreeBSD: {
  enabled: no
}
This will disable the default FreeBSD repository. Then create /usr/local/etc/pkg/repos/my-repo.conf (name can be anything you want as long as it ends in .conf).
Code:
my-repo: {
  url: http://my.server.local/packages
  enabled: yes
}
Instead of an http:// URL you can also use file://:
Code:
my-repo: {
  url: file:///where/you/stored/your/packages/
  enabled: yes
}
 
I don't even do that. I build all my packages with ports-mgmt/portmaster and throw the contents of the /usr/ports/packages/All directory on a USB stick. Insert it, mount it, cd to it, and pkg add <package files>. Meta-ports work great for the big stuff (e.g. x11/xorg). I delete all the ports/packages and start from scratch when it is time to upgrade.
 
I don't even do that. I build all my packages with ports-mgmt/portmaster and throw the contents of the /usr/ports/packages/All directory on a USB stick. Insert it, mount it, cd to it, and pkg add <package files>. Meta-ports work great for the big stuff (e.g. x11/xorg). I delete all the ports/packages and start from scratch when it is time to upgrade.
can you tell me how you do that in detail
 
Back
Top