FreeBSD Installation – How to Install and Configure FreeBSD Without Internet Access

freebsdsystem-installation

After installing FreeBSD we would like to use following commands to install additional packages.

pkg
pkg install nano
pkg install xorg
pkg install mate-desktop mate
pkg install slim

The above commands require an Internet connection to install packages. But how can we install those packages without an Internet connection by using CD/DVD/USB?

Best Answer

I'm not sure what release you're using, but I'm assuming 10.1, currently the latest. The installation process is described in the 10.1-RELEASE errata:

  1. Create a /dist directory and mount the DVD.

    # mkdir -p /dist
    # mount -t cd9660 /dev/cd0 /dist
    
  2. Make sure REPOS_DIR is correctly pointing to your local repository.

    # export REPOS_DIR=/dist/packages/repos
    

    or for csh:

    # setenv REPOS_DIR /dist/packages/repos
    
  3. Bootstrap pkg and install packages.

    # pkg bootstrap
    # pkg install xorg-server xorg gnome2 [...]
    
Related Question